diff options
Diffstat (limited to 'indra/newview')
357 files changed, 8602 insertions, 4044 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 72630cc413..9f7b782320 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -200,6 +200,7 @@ set(viewer_SOURCE_FILES llfloaterregioninfo.cpp llfloaterreporter.cpp llfloaterscriptdebug.cpp + llfloaterscriptlimits.cpp llfloatersearch.cpp llfloatersellland.cpp llfloatersettingsdebug.cpp @@ -228,7 +229,6 @@ set(viewer_SOURCE_FILES llgroupactions.cpp llgrouplist.cpp llgroupmgr.cpp - llgroupnotify.cpp llhomelocationresponder.cpp llhudeffect.cpp llhudeffectbeam.cpp @@ -299,7 +299,6 @@ set(viewer_SOURCE_FILES llnotificationofferhandler.cpp llnotificationscripthandler.cpp llnotificationtiphandler.cpp - llnotify.cpp lloutputmonitorctrl.cpp lloverlaybar.cpp llpanelavatar.cpp @@ -698,7 +697,7 @@ set(viewer_HEADER_FILES llfloatermediasettings.h llfloatermemleak.h llfloaternamedesc.h - llfloaternearbymedia.h + llfloaternearbymedia.h llfloaternotificationsconsole.h llfloateropenobject.h llfloaterparcel.h @@ -711,6 +710,7 @@ set(viewer_HEADER_FILES llfloaterregioninfo.h llfloaterreporter.h llfloaterscriptdebug.h + llfloaterscriptlimits.h llfloatersearch.h llfloatersellland.h llfloatersettingsdebug.h @@ -738,7 +738,6 @@ set(viewer_HEADER_FILES llgroupactions.h llgrouplist.h llgroupmgr.h - llgroupnotify.h llhomelocationresponder.h llhudeffect.h llhudeffectbeam.h @@ -804,7 +803,6 @@ set(viewer_HEADER_FILES llnetmap.h llnotificationhandler.h llnotificationmanager.h - llnotify.h lloutputmonitorctrl.h lloverlaybar.h llpanelavatar.h @@ -1357,7 +1355,6 @@ add_executable(${VIEWER_BINARY_NAME} MACOSX_BUNDLE ${viewer_SOURCE_FILES} ) -check_message_template(${VIEWER_BINARY_NAME}) if (LLKDU_LIBRARY) add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY}) @@ -1394,45 +1391,84 @@ if (WINDOWS) ) endif(USE_PRECOMPILED_HEADERS) - # sets the 'working directory' for debugging from visual studio. - if (NOT UNATTENDED) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe - ARGS - --solution - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln - --workingdir - ${VIEWER_BINARY_NAME} - "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." - ) - endif (NOT UNATTENDED) - - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/messages/message_template.msg - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message_template.msg - COMMENT "Copying message_template.msg to the runtime folder." - ) - - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/../../etc/message.xml - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml - COMMENT "Copying message.xml to the runtime folder." + # If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency + # here. + # *NOTE:Mani - This is a crappy hack to have important dependecies for the viewer_manifest copy action + # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing. + # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py + # and have the build deps get tracked *please* tell me about it. + set(COPY_INPUT_DEPENDECIES + # The following commented dependencies are determined at variably at build time. Can't do this here. + #llkdu.dll => llkdu.dll + #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll + ${CMAKE_SOURCE_DIR}/../etc/message.xml + ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll + ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll + ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll + ${SHARED_LIB_STAGING_DIR}/Release/msvcr80.dll + ${SHARED_LIB_STAGING_DIR}/Release/msvcp80.dll + ${SHARED_LIB_STAGING_DIR}/Release/Microsoft.VC80.CRT.manifest + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcr80.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp80.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest + ${SHARED_LIB_STAGING_DIR}/Debug/msvcr80d.dll + ${SHARED_LIB_STAGING_DIR}/Debug/msvcp80d.dll + ${SHARED_LIB_STAGING_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/zlib1.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll + ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt + ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt + ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll + ${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll + ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll + ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtnetwork4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtopengl4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtwebkit4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/qtxmlpatterns4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qgif4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qico4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qjpeg4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qmng4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qsvg4.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qtiff4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtcored4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtguid4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtnetworkd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtopengld4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtwebkitd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/qtxmlpatternsd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qgifd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qicod4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qjpegd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qmngd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qsvgd4.dll + ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qtiffd4.dll + SLPlugin + media_plugin_quicktime + media_plugin_webkit + windows-crash-logger + windows-updater ) - + add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD + OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -1443,11 +1479,17 @@ if (WINDOWS) --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + stage_third_party_libs + ${COPY_INPUT_DEPENDECIES} COMMENT "Performing viewer_manifest copy" ) + + add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat) - add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon) + add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest) if(LLKDU_LIBRARY) # kdu may not exist! @@ -1466,6 +1508,21 @@ if (WINDOWS) windows-crash-logger ) + # sets the 'working directory' for debugging from visual studio. + if (NOT UNATTENDED) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe + ARGS + --solution + ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln + --workingdir + ${VIEWER_BINARY_NAME} + "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." + ) + endif (NOT UNATTENDED) + if (PACKAGE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2 @@ -1480,7 +1537,7 @@ if (WINDOWS) ${EVENT_HOST_SCRIPTS} ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py ) - + add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat COMMAND ${PYTHON_EXECUTABLE} @@ -1503,6 +1560,8 @@ if (WINDOWS) # sorted out on the parabuild cluster... #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2) + check_message_template(package) + endif (PACKAGE) endif (WINDOWS) @@ -1584,6 +1643,7 @@ if (LINUX) add_custom_target(package ALL DEPENDS ${product}.tar.bz2) add_dependencies(package linux-crash-logger-strip-target) add_dependencies(package linux-updater-strip-target) + check_message_template(package) endif (NOT INSTALL) endif (LINUX) @@ -1622,6 +1682,7 @@ if (DARWIN) if (PACKAGE) add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) + check_message_template(package) add_dependencies(package mac-updater mac-crash-logger) add_custom_command( @@ -1725,119 +1786,3 @@ if (LL_TESTS) endif (LL_TESTS) -# Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py -if (WINDOWS) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - make_directory - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin - COMMENT "Creating llplugin dir." - ) - - get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${BUILT_SLPLUGIN} - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} - COMMENT "Copying SLPlugin executable to the runtime folder." - ) - - get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${BUILT_WEBKIT_PLUGIN} - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin - COMMENT "Copying WebKit Plugin to the runtime folder." - ) - - get_target_property(BUILT_QUICKTIME_PLUGIN media_plugin_quicktime LOCATION) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${BUILT_QUICKTIME_PLUGIN} - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin - COMMENT "Copying Quicktime Plugin to the runtime folder." - ) - - #******************************* - # Copy media plugin support dlls - # Debug config runtime files required for the plugins - set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") - set(plugins_debug_files - libeay32.dll - qtcored4.dll - qtguid4.dll - qtnetworkd4.dll - qtopengld4.dll - qtwebkitd4.dll - ssleay32.dll - ) - copy_if_different( - ${plugins_debug_src_dir} - "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin" - out_targets - ${plugins_debug_files} - ) - set(media_plugin_targets ${media_plugin_targets} ${out_targets}) - - # Release & ReleaseDebInfo config runtime files required for the plugins - set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") - set(plugins_release_files - libeay32.dll - qtcore4.dll - qtgui4.dll - qtnetwork4.dll - qtopengl4.dll - qtwebkit4.dll - ssleay32.dll - ) - copy_if_different( - ${plugins_release_src_dir} - "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin" - out_targets - ${plugins_release_files} - ) - set(media_plugin_targets ${media_plugin_targets} ${out_targets}) - - copy_if_different( - ${plugins_release_src_dir} - "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin" - out_targets - ${plugins_release_files} - ) - set(media_plugin_targets ${media_plugin_targets} ${out_targets}) - - add_custom_target(copy_media_plugin_libs ALL - DEPENDS - ${media_plugin_targets} - ) - - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_directory - ${CMAKE_BINARY_DIR}/test_apps/llplugintest/${CMAKE_CFG_INTDIR}/imageformats - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin/imageformats - COMMENT "Copying llpluging imageformat libs." - ) - - add_dependencies(${VIEWER_BINARY_NAME} llmediaplugintest copy_media_plugin_libs) - -endif (WINDOWS) - diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eed84671c1..455c3587ff 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8,7 +8,7 @@ <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>F32</string> + <string>S32</string> <key>Value</key> <real>300.0</real> </map> @@ -45,17 +45,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>AllowIdleAFK</key> - <map> - <key>Comment</key> - <string>Automatically set AFK (away from keyboard) mode when idle</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>AllowMultipleViewers</key> <map> <key>Comment</key> @@ -1068,17 +1057,6 @@ <key>Value</key> <integer>23</integer> </map> - <key>ButtonVPad</key> - <map> - <key>Comment</key> - <string>Default vertical spacing between buttons (pixels)</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>1</integer> - </map> <key>CacheLocation</key> <map> <key>Comment</key> @@ -3596,7 +3574,18 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://www.secondlife.com/</string> + <string>http://lecs.viewer-sidebar.secondlife.com.s3.amazonaws.com/sidebar.html</string> + </map> + <key>SearchURL</key> + <map> + <key>Comment</key> + <string>URL for Search website, displayed in the Find floater</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]</string> </map> <key>HighResSnapshot</key> <map> @@ -5471,6 +5460,17 @@ <key>Value</key> <integer>13</integer> </map> + <key>PrimMediaMasterEnabled</key> + <map> + <key>Comment</key> + <string>Whether or not Media on a Prim is enabled.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>PrimMediaControlsUseHoverControlSet</key> <map> <key>Comment</key> @@ -5823,17 +5823,6 @@ <key>Value</key> <integer>35</integer> </map> - <key>RenderAvatarInvisible</key> - <map> - <key>Comment</key> - <string>Set your avatar as Invisible</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>RenderAvatarVP</key> <map> <key>Comment</key> @@ -7550,45 +7539,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>SearchURLDefault</key> - <map> - <key>Comment</key> - <string>URL to load for empty searches</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>http://search.secondlife.com/client_search.php?</string> - </map> - <key>SearchURLQuery</key> - <map> - <key>Comment</key> - <string>URL to use for searches</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>http://search.secondlife.com/client_search.php?q=[QUERY]&s=[COLLECTION]&</string> - </map> - <key>SearchURLSuffix2</key> - <map> - <key>Comment</key> - <string>Parameters added to end of search queries</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>lang=[LANG]&mat=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]</string> - </map> <key>SelectMovableOnly</key> <map> <key>Comment</key> @@ -7820,6 +7770,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowDebugAppearanceEditor</key> + <map> + <key>Comment</key> + <string>Show debugging appearance editor</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowEmptyFoldersWhenSearching</key> <map> <key>Comment</key> @@ -7918,7 +7879,18 @@ <string>Boolean</string> <key>Value</key> <integer>1</integer> - </map> + </map> + <key>ShowObjectRenderingCost</key> + <map> + <key>Comment</key> + <string>Show the object rendering cost in build tools</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowNavbarFavoritesPanel</key> <map> <key>Comment</key> @@ -9314,7 +9286,7 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>4</integer> + <integer>5</integer> </map> <key>UIMaxComboWidth</key> <map> diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt index 23a42f484b..bfefdf3471 100644 --- a/indra/newview/linux_tools/client-readme-voice.txt +++ b/indra/newview/linux_tools/client-readme-voice.txt @@ -4,36 +4,31 @@ Second Life - Linux Voice Support README WHAT IS IT? -=-=-=-=-=- -Linux Voice Support is a new feature in testing which allows users -of the Linux Second Life client to participate in voice-chat with other -residents and groups inside Second Life, with an appropriate -headset/microphone. - -Linux Voice Support is currently EXPERIMENTAL and is known to still -have some compatibility issues. +Linux Voice Support is a feature in testing which allows users of the Linux +Second Life client to participate in voice-chat with other residents and +groups inside Second Life, with an appropriate headset/microphone. REQUIREMENTS -=-=-=-=-=-= * A headset/microphone supported by your chosen version of Linux -* The ALSA sound system (you probably already have this - - i.e. the alsa-base and alsa-utils packages on Ubuntu) +* At this time, the PulseAudio audio system is recommended; this software + is already part of most modern (2009+) Linux desktop systems. Alternatively, + the ALSA audio system may be used on systems installed from around + 2007 onwards (again this is likely already installed on your system). + +TESTING YOUR SETTINGS +-=-=-=-=-=-=-=-=-=-=- -Success with Linux Voice support has been reported on the following -systems: -* Ubuntu 6.06 (Dapper) with Intel ICH5/CMI9761A+ audio chipset -* Ubuntu 6.06 (Dapper) with SigmaTel STAC2997 audio chipset -* Ubuntu 6.06 (Dapper) with Creative EMU10K1 audio chipset -* Ubuntu 7.04 (Feisty) with USB Plantronics headset -* Ubuntu 7.04 (Feisty) with Intel HDA audio chipset -* Fedora Core 6 with (unknown) audio chipset -* Ubuntu 8.04 (Hardy) with (unknown) audio chipset +* The Second Life region 'Voice Echo Canyon' is a great place for testing +your hardware settings and quality - it will 'echo' your voice back to you +when you speak. KNOWN PROBLEMS -=-=-=-=-=-=-= -* The 'Input Level' meter in the Voice Chat Device Settings dialog - does not respond to audio input. +* Compatibility with old ALSA-based audio systems (such as Ubuntu Dapper + from 2006) is poor. TROUBLESHOOTING -=-=-=-=-=-=-=- @@ -41,12 +36,11 @@ TROUBLESHOOTING PROBLEM 1: I don't see a white dot over the head of my avatar or other Voice-using avatars. SOLUTION: -a. Ensure that 'Enable voice chat' is enabled in the Voice Chat - preferences window and that you are in a voice-enabled area (you - will see a blue headphone icon in the SL menu-bar). +a. Ensure that 'Enable voice' is enabled in the 'Sound' section of the + Preferences window, and that you are in a voice-enabled area. b. If the above does not help, exit Second Life and ensure that any remaining 'SLVoice' processes (as reported by 'ps', 'top' or similar) - are killed. + are killed before restarting. PROBLEM 2: I have a white dot over my head but I never see (or hear!) anyone except myself listed in the Active Speakers dialog when I'm sure that other @@ -65,12 +59,13 @@ c. Update to the latest version of ALSA manually. For a guide, see the PROBLEM 3: I can hear other people, but they cannot hear me. SOLUTION: -a. Ensure that you have the 'Talk' button activated while you are trying to - speak. +a. Ensure that you have the 'Speak' button (at the bottom of the Second Life + window) activated while you are trying to speak. b. Ensure that your microphone jack is inserted into the correct socket of your sound card, where appropriate. -c. Use your system mixer-setting program or the 'alsamixer' program to ensure - that microphone input is set as the active input source and is not muted. +c. Use your system mixer-setting program (such as the PulseAudio 'volume + control' applet or the ALSA 'alsamixer' program) to ensure that microphone + input is set as the active input source and is not muted. d. Verify that audio input works in other applications, i.e. Audacity PROBLEM 4: Other people just hear bursts of loud noise when I speak. diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt index 07a8f951ee..92d321d8c0 100644 --- a/indra/newview/linux_tools/client-readme.txt +++ b/indra/newview/linux_tools/client-readme.txt @@ -55,10 +55,13 @@ Minimum requirements: is required. If you are running a 64-bit Linux distribution then you will need its 32-bit compatibility environment installed, but this configuration is not currently supported. + * PulseAudio or ALSA Linux system sound software. A recent PulseAudio + is the recommended configuration; see README-linux-voice.txt for more + information. * Video/Graphics Card: o nVidia GeForce 2, GeForce 4mx, or better (recommend one of the following: 6700, 6800, 7600, 7800, 7900, 8400, 8500, 8600, - 8800, Go 7400, Go 7600, Go 7800, Go 7900) + 8800, Go 7400, Go 7600, Go 7800, Go 7900, +) o OR ATI Radeon 8500, 9250, or better (nVidia cards are recommended for the Linux client) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2b582c90f0..628982973c 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -38,7 +38,6 @@ #include "llagentlistener.h" #include "llagentwearables.h" #include "llagentui.h" - #include "llanimationstates.h" #include "llbottomtray.h" #include "llcallingcard.h" @@ -65,6 +64,7 @@ #include "llsky.h" #include "llsmoothstep.h" #include "llstatusbar.h" +#include "llteleportflags.h" #include "lltool.h" #include "lltoolmgr.h" #include "lltrans.h" diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3114a37ada..454e547155 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -41,7 +41,6 @@ #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llviewerregion.h" #include "llvoavatarself.h" #include "llwearable.h" @@ -876,6 +875,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); + const BOOL is_first_time_in_viewer2_0 = (gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) == LLUUID::null); + + LLVOAvatar* avatar = gAgent.getAvatarObject(); if (avatar && (agent_id == avatar->getID())) { @@ -955,7 +957,8 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs gInventory.addObserver(outfit); } - gAgentWearables.populateMyOutfitsFolder(); + if (is_first_time_in_viewer2_0) + gAgentWearables.populateMyOutfitsFolder(); } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c06098689d..43b2f34ecd 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit LLViewerInventoryItem *item = items.get(i); if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER)) continue; - gInventory.purgeObject(item->getUUID()); + if (item->getIsLinkType()) + { + gInventory.purgeObject(item->getUUID()); + } } } @@ -871,10 +874,48 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor (a->getWearableType() == b->getWearableType())); } +class LLDeferredCOFLinkObserver: public LLInventoryObserver +{ +public: + LLDeferredCOFLinkObserver(const LLUUID& item_id, bool do_update): + mItemID(item_id), + mDoUpdate(do_update) + { + } + + ~LLDeferredCOFLinkObserver() + { + } + + /* virtual */ void changed(U32 mask) + { + const LLInventoryItem *item = gInventory.getItem(mItemID); + if (item) + { + gInventory.removeObserver(this); + LLAppearanceManager::instance().addCOFItemLink(item,mDoUpdate); + delete this; + } + } + +private: + const LLUUID mItemID; + bool mDoUpdate; +}; + + void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update ) { const LLInventoryItem *item = gInventory.getItem(item_id); - addCOFItemLink(item, do_update); + if (!item) + { + LLDeferredCOFLinkObserver *observer = new LLDeferredCOFLinkObserver(item_id, do_update); + gInventory.addObserver(observer); + } + else + { + addCOFItemLink(item, do_update); + } } void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update ) @@ -909,7 +950,10 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up else if (areMatchingWearables(vitem,inv_item)) { gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); - gInventory.purgeObject(inv_item->getUUID()); + if (inv_item->getIsLinkType()) + { + gInventory.purgeObject(inv_item->getUUID()); + } } } if (linked_already) @@ -958,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda for (S32 i=0; i<item_array.count(); i++) { const LLInventoryItem* item = item_array.get(i).get(); - if (item->getLinkedUUID() == item_id) + if (item->getIsLinkType() && item->getLinkedUUID() == item_id) { - const LLUUID& item_id = item_array.get(i)->getUUID(); - gInventory.purgeObject(item_id); + gInventory.purgeObject(item->getUUID()); } } if (do_update) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3250343b25..becc30832d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -39,7 +39,6 @@ #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" -#include "llalertdialog.h" #include "llerrorcontrol.h" #include "llviewertexturelist.h" #include "llgroupmgr.h" @@ -85,11 +84,14 @@ #include "llsecondlifeurls.h" // Linden library includes +#include "llimagej2c.h" #include "llmemory.h" #include "llprimitive.h" #include "llurlaction.h" +#include "llvfile.h" #include "llvfsthread.h" #include "llvolumemgr.h" +#include "llxfermanager.h" #include "llnotificationmanager.h" #include "llnotifications.h" @@ -109,7 +111,6 @@ #include "apr_dso.h" #include <boost/lexical_cast.hpp> -#include "llnotify.h" #include "llviewerkeyboard.h" #include "lllfsthread.h" #include "llworkerthread.h" @@ -332,7 +333,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; void idle_afk_check() { // check idle timers - if (gSavedSettings.getBOOL("AllowIdleAFK") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout"))) + if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout"))) { gAgent.setAFK(); } @@ -391,7 +392,6 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue) static void settings_to_globals() { LLBUTTON_H_PAD = gSavedSettings.getS32("ButtonHPad"); - LLBUTTON_V_PAD = gSavedSettings.getS32("ButtonVPad"); BTN_HEIGHT_SMALL = gSavedSettings.getS32("ButtonHeightSmall"); BTN_HEIGHT = gSavedSettings.getS32("ButtonHeight"); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index c1bfbca868..40e74061b5 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -325,6 +325,7 @@ extern BOOL gUseWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer // it has pre-cache data like the UI .TGAs +class LLVFS; extern LLVFS *gStaticVFS; extern LLMemoryInfo gSysMemory; diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 1d03cc8823..a2322e28b4 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -39,7 +39,6 @@ #include "llcompilequeue.h" #include "llfloaterbuycurrency.h" #include "llfilepicker.h" -#include "llnotify.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llpermissionsflags.h" diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5f90a7627f..c5a1ffdcb3 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -61,6 +61,7 @@ #include "llviewerregion.h" #include "llimfloater.h" #include "lltrans.h" +#include "llcallingcard.h" // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -210,11 +211,9 @@ void LLAvatarActions::startCall(const LLUUID& id) std::string name; gCacheName->getFullName(id, name); - LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id, true); if (session_id != LLUUID::null) { - // always open IM window when connecting to voice - LLIMFloater::show(session_id); gIMMgr->startCall(session_id); } make_ui_sound("UISndStartIM"); @@ -238,15 +237,12 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) // create the new ad hoc voice session const std::string title = LLTrans::getString("conference-title"); LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, - ids[0], id_array); + ids[0], id_array, true); if (session_id == LLUUID::null) { return; } - // always open IM window when connecting to voice - LLIMFloater::show(session_id); - // start the call once the session has fully initialized gIMMgr->autoStartCallOnStartup(session_id); @@ -265,6 +261,21 @@ bool LLAvatarActions::isCalling(const LLUUID &id) return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); } +//static +bool LLAvatarActions::canCall(const LLUUID &id) +{ + // For now we do not need to check whether passed UUID is ID of agent's friend. + // Use common check of Voice Client state. + { + // don't need to check online/offline status because "usual resident" (resident that is not a friend) + // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual + // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident" + // we need to check only that "our" voice is enabled. + return LLVoiceClient::voiceEnabled(); + } + +} + // static void LLAvatarActions::startConference(const std::vector<LLUUID>& ids) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 2dd2a4c4b1..01c18d4228 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -129,6 +129,11 @@ public: static bool isCalling(const LLUUID &id); /** + * @return true if call to the resident can be made (resident is online and voice is enabled) + */ + + static bool canCall(const LLUUID &id); + /** * Invite avatar to a group. */ static void inviteToGroup(const LLUUID& id); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 3bd4f898c8..71b23e1383 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llavatarlist.h" +#include "llagent.h" // for comparator // newview #include "llcallingcard.h" // for LLAvatarTracker @@ -420,3 +421,17 @@ bool LLAvatarItemNameComparator::doCompare(const LLAvatarListItem* avatar_item1, return name1 < name2; } +bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const +{ + //keep agent on top, if first is agent, + //then we need to return true to elevate this id, otherwise false. + if(avatar_item1->getAvatarId() == gAgent.getID()) + { + return true; + } + else if (avatar_item2->getAvatarId() == gAgent.getID()) + { + return false; + } + return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2); +} diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 9058fec540..e913be0f62 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -155,4 +155,16 @@ protected: virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; }; +class LLAvatarItemAgentOnTopComparator : public LLAvatarItemNameComparator +{ + LOG_CLASS(LLAvatarItemAgentOnTopComparator); + +public: + LLAvatarItemAgentOnTopComparator() {}; + virtual ~LLAvatarItemAgentOnTopComparator() {}; + +protected: + virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; +}; + #endif // LL_LLAVATARLIST_H diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8c793873f4..ab657e0e99 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -67,6 +67,10 @@ LLBottomTray::LLBottomTray(const LLSD&) , mGesturePanel(NULL) , mCamButton(NULL) { + // Firstly add ourself to IMSession observers, so we catch session events + // before chiclets do that. + LLIMMgr::getInstance()->addSessionObserver(this); + mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); @@ -76,7 +80,9 @@ LLBottomTray::LLBottomTray(const LLSD&) mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1)); LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2)); - LLIMMgr::getInstance()->addSessionObserver(this); + + //managing chiclets for voice calls + LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLBottomTray::onNewIM, this, _1)); //this is to fix a crash that occurs because LLBottomTray is a singleton //and thus is deleted at the end of the viewers lifetime, but to be cleanly @@ -143,25 +149,22 @@ LLIMChiclet* LLBottomTray::createIMChiclet(const LLUUID& session_id) //virtual void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if(getChicletPanel()) - { - if(getChicletPanel()->findChiclet<LLChiclet>(session_id)) - { + if (!getChicletPanel()) return; - } - else - { - LLIMChiclet* chiclet = createIMChiclet(session_id); - if(chiclet) - { - chiclet->setIMSessionName(name); - chiclet->setOtherParticipantId(other_participant_id); - } - else - { - llerrs << "Could not create chiclet" << llendl; - } - } + if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return; + + // For im sessions started as voice call chiclet gets created on the first incoming message + if (gIMMgr->isVoiceCall(session_id)) return; + + LLIMChiclet* chiclet = createIMChiclet(session_id); + if(chiclet) + { + chiclet->setIMSessionName(name); + chiclet->setOtherParticipantId(other_participant_id); + } + else + { + llerrs << "Could not create chiclet" << llendl; } } @@ -194,6 +197,32 @@ void LLBottomTray::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& } } +void LLBottomTray::onNewIM(const LLSD& data) +{ + LLUUID from_id = data["from_id"]; + if (from_id.isNull() || gAgentID == from_id) return; + + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + if (!gIMMgr->isVoiceCall(session_id)) return; + + if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return; + + //first real message, time to create chiclet + LLIMChiclet* chiclet = createIMChiclet(session_id); + if(chiclet) + { + chiclet->setIMSessionName(LLIMModel::getInstance()->getName(session_id)); + chiclet->setOtherParticipantId(LLIMModel::getInstance()->getOtherParticipantID(session_id)); + } +} + +S32 LLBottomTray::getTotalUnreadIMCount() +{ + return getChicletPanel()->getTotalUnreadIMCount(); +} + // virtual void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal) { diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index fa204ee9ea..5cd3f15746 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -75,6 +75,10 @@ public: virtual void sessionRemoved(const LLUUID& session_id); void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + void onNewIM(const LLSD& data); + + S32 getTotalUnreadIMCount(); + virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual void onFocusLost(); @@ -90,6 +94,11 @@ public: void showMoveButton(BOOL visible); void showCameraButton(BOOL visible); void showSnapshotButton(BOOL visible); + + /** + * Creates IM Chiclet based on session type (IM chat or Group chat) + */ + LLIMChiclet* createIMChiclet(const LLUUID& session_id); private: typedef enum e_resize_status_type @@ -182,11 +191,6 @@ protected: void onContextMenuItemClicked(const LLSD& userdata); bool onContextMenuItemEnabled(const LLSD& userdata); - /** - * Creates IM Chiclet based on session type (IM chat or Group chat) - */ - LLIMChiclet* createIMChiclet(const LLUUID& session_id); - LLChicletPanel* mChicletPanel; LLPanel* mSpeakPanel; LLSpeakButton* mSpeakBtn; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 895b4ed80e..20739d2401 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -33,13 +33,20 @@ #include "llviewerprecompiledheaders.h" +#include "llnotificationsutil.h" +#include "lltrans.h" + #include "llcallfloater.h" +#include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavatarlist.h" #include "llbottomtray.h" +#include "llimfloater.h" +#include "llfloaterreg.h" #include "llparticipantlist.h" #include "llspeakers.h" +#include "lltransientfloatermgr.h" class LLNonAvatarCaller : public LLAvatarListItem @@ -73,21 +80,33 @@ static void* create_non_avatar_caller(void*) } LLCallFloater::LLCallFloater(const LLSD& key) -: LLDockableFloater(NULL, key) +: LLDockableFloater(NULL, false, key) , mSpeakerManager(NULL) , mPaticipants(NULL) , mAvatarList(NULL) , mNonAvatarCaller(NULL) , mVoiceType(VC_LOCAL_CHAT) +, mAgentPanel(NULL) +, mSpeakingIndicator(NULL) +, mIsModeratorMutedVoice(false) { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); + LLVoiceClient::getInstance()->addObserver(this); + LLTransientFloaterMgr::getInstance()->addControlView(this); } LLCallFloater::~LLCallFloater() { - mChannelChangedConnection.disconnect(); delete mPaticipants; mPaticipants = NULL; + + // Don't use LLVoiceClient::getInstance() here + // singleton MAY have already been destroyed. + if(gVoiceClient) + { + gVoiceClient->removeObserver(this); + } + LLTransientFloaterMgr::getInstance()->removeControlView(this); } // virtual @@ -110,8 +129,6 @@ BOOL LLCallFloater::postBuild() // update list for current session updateSession(); - // subscribe to to be notified Voice Channel is changed - mChannelChangedConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::onCurrentChannelChanged, this, _1)); return TRUE; } @@ -120,6 +137,34 @@ void LLCallFloater::onOpen(const LLSD& /*key*/) { } +// virtual +void LLCallFloater::draw() +{ + // we have to refresh participants to display ones not in voice as disabled. + // It should be done only when she joins or leaves voice chat. + // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. + // *TODO: mantipov: remove from draw() + onChange(); + + bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); + + if (mIsModeratorMutedVoice != is_moderator_muted) + { + setModeratorMutedVoice(is_moderator_muted); + } + + LLDockableFloater::draw(); +} + +// virtual +void LLCallFloater::onChange() +{ + if (NULL == mPaticipants) return; + + mPaticipants->refreshVoiceState(); +} + + ////////////////////////////////////////////////////////////////////////// /// PRIVATE SECTION ////////////////////////////////////////////////////////////////////////// @@ -165,9 +210,19 @@ void LLCallFloater::updateSession() mVoiceType = VC_PEER_TO_PEER; break; case IM_SESSION_CONFERENCE_START: - mVoiceType = VC_AD_HOC_CHAT; + case IM_SESSION_GROUP_START: + case IM_SESSION_INVITE: + if (gAgent.isInGroup(session_id)) + { + mVoiceType = VC_GROUP_CHAT; + } + else + { + mVoiceType = VC_AD_HOC_CHAT; + } break; default: + llwarning("Failed to determine voice call IM type", 0); mVoiceType = VC_GROUP_CHAT; break; } @@ -185,9 +240,21 @@ void LLCallFloater::updateSession() //hide "Leave Call" button for nearby chat bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; - childSetVisible("leave_btn_panel", !is_local_chat); + childSetVisible("leave_call_btn", !is_local_chat); refreshPartisipantList(); + updateModeratorState(); + + //show floater for voice calls + if (!is_local_chat) + { + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + bool show_me = !(im_floater && im_floater->getVisible()); + if (show_me) + { + setVisible(true); + } + } } void LLCallFloater::refreshPartisipantList() @@ -213,21 +280,31 @@ void LLCallFloater::refreshPartisipantList() if (!non_avatar_caller) { - bool do_not_use_context_menu_in_local_chat = LLLocalSpeakerMgr::getInstance() != mSpeakerManager; - mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, do_not_use_context_menu_in_local_chat); + mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList); - if (!do_not_use_context_menu_in_local_chat) + if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager) { mAvatarList->setNoItemsCommentText(getString("no_one_near")); } + mPaticipants->refreshVoiceState(); } } -void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) +void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) { + // Don't update participant list if no channel info is available. + // Fix for ticket EXT-3427 + // @see LLParticipantList::~LLParticipantList() + if(LLVoiceChannel::getCurrentVoiceChannel() && + LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState()) + { + return; + } + LLCallFloater* call_floater = LLFloaterReg::getTypedInstance<LLCallFloater>("voice_controls"); + // Forget speaker manager from the previous session to avoid using it after session was destroyed. - mSpeakerManager = NULL; - updateSession(); + call_floater->mSpeakerManager = NULL; + call_floater->updateSession(); } void LLCallFloater::updateTitle() @@ -263,13 +340,52 @@ void LLCallFloater::updateTitle() void LLCallFloater::initAgentData() { - childSetValue("user_icon", gAgentID); + mAgentPanel = getChild<LLPanel> ("my_panel"); + + if ( mAgentPanel ) + { + mAgentPanel->childSetValue("user_icon", gAgentID); + + std::string name; + gCacheName->getFullName(gAgentID, name); + mAgentPanel->childSetValue("user_text", name); + + mSpeakingIndicator = mAgentPanel->getChild<LLOutputMonitorCtrl>("speaking_indicator"); + mSpeakingIndicator->setSpeakerId(gAgentID); + } +} +void LLCallFloater::setModeratorMutedVoice(bool moderator_muted) +{ + mIsModeratorMutedVoice = moderator_muted; + + if (moderator_muted) + { + LLNotificationsUtil::add("VoiceIsMutedByModerator"); + } + mSpeakingIndicator->setIsMuted(moderator_muted); +} + +void LLCallFloater::updateModeratorState() +{ std::string name; gCacheName->getFullName(gAgentID, name); - childSetValue("user_text", name); - LLOutputMonitorCtrl* speaking_indicator = getChild<LLOutputMonitorCtrl>("speaking_indicator"); - speaking_indicator->setSpeakerId(gAgentID); + if(gAgent.isInGroup(mSpeakerManager->getSessionID())) + { + // This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO + // in this case there are no any speakers yet. + if (mSpeakerManager->findSpeaker(gAgentID)) + { + // Agent is Moderator + if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + + { + const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); + name += " " + moderator_indicator; + } + } + } + mAgentPanel->childSetValue("user_text", name); } //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index b615f57d5b..f9c9149085 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -35,12 +35,13 @@ #define LL_LLCALLFLOATER_H #include "lldockablefloater.h" +#include "llvoiceclient.h" class LLAvatarList; class LLNonAvatarCaller; +class LLOutputMonitorCtrl; class LLParticipantList; class LLSpeakerMgr; - /** * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. * It can be torn-off and freely positioned onscreen. @@ -52,7 +53,7 @@ class LLSpeakerMgr; * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel also provides an * 'Leave Call' button to allow the Resident to leave that voice channel. */ -class LLCallFloater : public LLDockableFloater +class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver { public: LLCallFloater(const LLSD& key); @@ -60,6 +61,16 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void draw(); + + /** + * Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed. + * + * Refreshes list to display participants not in voice as disabled. + */ + /*virtual*/ void onChange(); + + static void sOnCurrentChannelChanged(const LLUUID& session_id); private: typedef enum e_voice_controls_type @@ -84,9 +95,13 @@ private: * Refreshes participant list according to current Voice Channel */ void refreshPartisipantList(); - void onCurrentChannelChanged(const LLUUID& session_id); + + + void updateTitle(); void initAgentData(); + void setModeratorMutedVoice(bool moderator_muted); + void updateModeratorState(); private: LLSpeakerMgr* mSpeakerManager; @@ -94,8 +109,9 @@ private: LLAvatarList* mAvatarList; LLNonAvatarCaller* mNonAvatarCaller; EVoiceControls mVoiceType; - - boost::signals2::connection mChannelChangedConnection; + LLPanel* mAgentPanel; + LLOutputMonitorCtrl* mSpeakingIndicator; + bool mIsModeratorMutedVoice; }; diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 714bd20ab8..82413878ad 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -55,7 +55,6 @@ #include "llinventorymodel.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "llimview.h" #include "llviewercontrol.h" diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 415c118ff1..cbb566b3a7 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -228,3 +228,14 @@ void LLChannelManager::muteAllChannels(bool mute) } } +void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher) +{ + LLScreenChannel + * screen_channel = + dynamic_cast<LLScreenChannel*> (findChannelByID(channel_id)); + if (screen_channel != NULL) + { + screen_channel->killMatchedToasts(matcher); + } +} + diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index 4b66a1ef89..c2be39122f 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -109,6 +109,11 @@ public: */ void muteAllChannels(bool mute); + /** + * Kills matched toasts from specified toast screen channel. + */ + void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher); + private: LLScreenChannel* createChannel(LLChannelManager::Params& p); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index efe9ea4c35..7a83299dac 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -49,6 +49,8 @@ static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); +const static std::string NEW_LINE(rawstr_to_utf8("\n")); + class LLChatHistoryHeader: public LLPanel { public: @@ -200,6 +202,8 @@ public: userName->setValue(SL); } + mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING; + setTimeField(chat); LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); @@ -216,7 +220,37 @@ public: icon->setValue(LLSD("SL_Logo")); } - } + } + + /*virtual*/ void draw() + { + LLTextEditor* user_name = getChild<LLTextEditor>("user_name"); + LLTextBox* time_box = getChild<LLTextBox>("time_box"); + + LLRect user_name_rect = user_name->getRect(); + S32 user_name_width = user_name_rect.getWidth(); + S32 time_box_width = time_box->getRect().getWidth(); + + if (time_box->getVisible() && user_name_width <= mMinUserNameWidth) + { + time_box->setVisible(FALSE); + + user_name_rect.mRight += time_box_width; + user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); + user_name->setRect(user_name_rect); + } + + if (!time_box->getVisible() && user_name_width > mMinUserNameWidth + time_box_width) + { + user_name_rect.mRight -= time_box_width; + user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); + user_name->setRect(user_name_rect); + + time_box->setVisible(TRUE); + } + + LLPanel::draw(); + } void nameUpdatedCallback(const LLUUID& id,const std::string& first,const std::string& last,BOOL is_group) { @@ -226,6 +260,8 @@ public: mLastName = last; } protected: + static const S32 PADDING = 20; + void showContextMenu(S32 x,S32 y) { if(mSourceType == CHAT_SOURCE_SYSTEM) @@ -305,6 +341,7 @@ protected: std::string mLastName; std::string mFrom; + S32 mMinUserNameWidth; }; @@ -332,12 +369,12 @@ LLChatHistory::~LLChatHistory() { static LLUICachedControl<S32> texteditor_border ("UITextEditorBorder", 0); - LLRect old_text_rect = mTextRect; - mTextRect = mScroller->getContentWindowRect(); - mTextRect.stretch(-texteditor_border); - mTextRect.mLeft += mLeftTextPad; - mTextRect.mRight -= mRightTextPad; - if (mTextRect != old_text_rect) + LLRect old_text_rect = mVisibleTextRect; + mVisibleTextRect = mScroller->getContentWindowRect(); + mVisibleTextRect.stretch(-texteditor_border); + mVisibleTextRect.mLeft += mLeftTextPad; + mVisibleTextRect.mRight -= mRightTextPad; + if (mVisibleTextRect != old_text_rect) { needsReflow(); } @@ -454,10 +491,21 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ if (chat.mFromName.size() > 0) appendText(chat.mFromName + " ", TRUE, style_params); - appendText(chat.mText.substr(4), FALSE, style_params); + // Ensure that message ends with NewLine, to avoid losing of new lines + // while copy/paste from text chat. See EXT-3263. + appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params); } else - appendText(chat.mText, FALSE, style_params); + { + std::string message(chat.mText); + if ( message.size() > 0 && !LLStringOps::isSpace(message[message.size() - 1]) ) + { + // Ensure that message ends with NewLine, to avoid losing of new lines + // while copy/paste from text chat. See EXT-3263. + message += NEW_LINE; + } + appendText(message, FALSE, style_params); + } blockUndo(); } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 30967677e8..21a0381495 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -53,6 +53,7 @@ #include "llgroupmgr.h" #include "llnotificationmanager.h" #include "lltransientfloatermgr.h" +#include "llsyswellwindow.h" static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel"); static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well"); @@ -65,11 +66,13 @@ static LLDefaultChildRegistry::Register<LLInvOfferChiclet> t7("chiclet_offer"); static const LLRect CHICLET_RECT(0, 25, 25, 0); static const LLRect CHICLET_ICON_RECT(0, 22, 22, 0); -static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0); +static const LLRect VOICE_INDICATOR_RECT(50, 25, 70, 0); +static const LLRect COUNTER_RECT(25, 25, 50, 0); static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon for new massages in a chiclet // static const S32 LLChicletPanel::s_scroll_ratio = 10; +const S32 LLChicletNotificationCounterCtrl::MAX_DISPLAYED_COUNT = 99; boost::signals2::signal<LLChiclet* (const LLUUID&), @@ -88,6 +91,14 @@ class LLSysWellChiclet::FlashToLitTimer : public LLEventTimer { public: typedef boost::function<void()> callback_t; + + /** + * Constructor. + * + * @param count - how many times callback should be called (twice to not change original state) + * @param period - how frequently callback should be called + * @param cb - callback to be called each tick + */ FlashToLitTimer(S32 count, F32 period, callback_t cb) : LLEventTimer(period) , mCallback(cb) @@ -111,8 +122,17 @@ public: mEventTimer.start(); } + void stopFlashing() + { + mEventTimer.stop(); + } + private: callback_t mCallback; + + /** + * How many times Well will blink. + */ S32 mFlashCount; S32 mCurrentFlashCount; }; @@ -134,7 +154,9 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p) , mButton(NULL) , mCounter(0) , mMaxDisplayedCount(p.max_displayed_count) +, mIsNewMessagesState(false) , mFlashToLitTimer(NULL) +, mContextMenu(NULL) { LLButton::Params button_params = p.button; mButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -150,6 +172,7 @@ LLSysWellChiclet::~LLSysWellChiclet() void LLSysWellChiclet::setCounter(S32 counter) { + // note same code in LLChicletNotificationCounterCtrl::setCounter(S32 counter) std::string s_count; if(counter != 0) { @@ -163,20 +186,20 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - /* - Emulate 4 states of button by background images, see detains in EXT-3147 - xml attribute Description - image_unselected "Unlit" - there are no new messages - image_selected "Unlit" + "Selected" - there are no new messages and the Well is open - image_pressed "Lit" - there are new messages - image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open - */ - mButton->setForcePressedState(counter > 0); + setNewMessagesState(counter > 0); - if (mCounter == 0 && counter > 0) + // we have to flash to 'Lit' state each time new unread message is comming. + if (counter > mCounter) { mFlashToLitTimer->flash(); } + else if (counter == 0) + { + // if notification is resolved while well is flashing it can leave in the 'Lit' state + // when flashing finishes itself. Let break flashing here. + mFlashToLitTimer->stopFlashing(); + } + mCounter = counter; } @@ -192,11 +215,37 @@ void LLSysWellChiclet::setToggleState(BOOL toggled) { void LLSysWellChiclet::changeLitState() { - static bool set_lit = false; + setNewMessagesState(!mIsNewMessagesState); +} - mButton->setForcePressedState(set_lit); +void LLSysWellChiclet::setNewMessagesState(bool new_messages) +{ + /* + Emulate 4 states of button by background images, see detains in EXT-3147 + xml attribute Description + image_unselected "Unlit" - there are no new messages + image_selected "Unlit" + "Selected" - there are no new messages and the Well is open + image_pressed "Lit" - there are new messages + image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + */ + mButton->setForcePressedState(new_messages); + + mIsNewMessagesState = new_messages; +} - set_lit ^= true; +// virtual +BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + if(!mContextMenu) + { + createMenu(); + } + if (mContextMenu) + { + mContextMenu->show(x, y); + LLMenuGL::showPopup(this, mContextMenu, x, y); + } + return TRUE; } /************************************************************************/ @@ -209,6 +258,8 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p) LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1)); LLIMMgr::getInstance()->addSessionObserver(this); + + LLIMWellWindow::getInstance()->setSysWellChiclet(this); } LLIMWellChiclet::~LLIMWellChiclet() @@ -216,10 +267,50 @@ LLIMWellChiclet::~LLIMWellChiclet() LLIMMgr::getInstance()->removeSessionObserver(this); } +void LLIMWellChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + if("close all" == action) + { + LLIMWellWindow::getInstance()->closeAll(); + } +} + +bool LLIMWellChiclet::enableMenuItem(const LLSD& user_data) +{ + std::string item = user_data.asString(); + if (item == "can close all") + { + return !LLIMWellWindow::getInstance()->isWindowEmpty(); + } + return true; +} + +void LLIMWellChiclet::createMenu() +{ + if(mContextMenu) + { + llwarns << "Menu already exists" << llendl; + return; + } + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("IMWellChicletMenu.Action", + boost::bind(&LLIMWellChiclet::onMenuItemClicked, this, _2)); + + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + enable_registrar.add("IMWellChicletMenu.EnableItem", + boost::bind(&LLIMWellChiclet::enableMenuItem, this, _2)); + + mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu> + ("menu_im_well_button.xml", + LLMenuGL::sMenuContainer, + LLViewerMenuHolderGL::child_registry_t::instance()); +} + void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages(); - setCounter(total_unread); + setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); } /************************************************************************/ @@ -233,6 +324,10 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); connectCounterUpdatersToSignal("offer"); + + // ensure that notification well window exists, to synchronously + // handle toast add/delete events. + LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); } void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) @@ -246,6 +341,47 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& no } } +void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + if("close all" == action) + { + LLNotificationWellWindow::getInstance()->closeAll(); + } +} + +bool LLNotificationChiclet::enableMenuItem(const LLSD& user_data) +{ + std::string item = user_data.asString(); + if (item == "can close all") + { + return mUreadSystemNotifications != 0; + } + return true; +} + +void LLNotificationChiclet::createMenu() +{ + if(mContextMenu) + { + llwarns << "Menu already exists" << llendl; + return; + } + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("NotificationWellChicletMenu.Action", + boost::bind(&LLNotificationChiclet::onMenuItemClicked, this, _2)); + + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + enable_registrar.add("NotificationWellChicletMenu.EnableItem", + boost::bind(&LLNotificationChiclet::enableMenuItem, this, _2)); + + mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu> + ("menu_notification_well_button.xml", + LLMenuGL::sMenuContainer, + LLViewerMenuHolderGL::child_registry_t::instance()); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -330,7 +466,7 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) // shift an icon a little bit to the right and up corner of a chiclet overlay_icon_rect.translate(OVERLAY_ICON_SHIFT, OVERLAY_ICON_SHIFT); - setShowCounter(false); + enableCounterControl(false); } void LLIMChiclet::setShowSpeaker(bool show) @@ -343,30 +479,87 @@ void LLIMChiclet::setShowSpeaker(bool show) onChicletSizeChanged(); } } + +void LLIMChiclet::enableCounterControl(bool enable) +{ + mCounterEnabled = enable; + if(!enable) + { + LLChiclet::setShowCounter(false); + } +} + +void LLIMChiclet::setShowCounter(bool show) +{ + if(!mCounterEnabled) + { + return; + } + + bool needs_resize = getShowCounter() != show; + if(needs_resize) + { + LLChiclet::setShowCounter(show); + toggleCounterControl(); + onChicletSizeChanged(); + } +} + void LLIMChiclet::initSpeakerControl() { // virtual } -void LLIMChiclet::toggleSpeakerControl() +void LLIMChiclet::setRequiredWidth() { - LLRect speaker_rect = mSpeakerCtrl->getRect(); - S32 required_width = getRect().getWidth(); + bool show_speaker = getShowSpeaker(); + bool show_counter = getShowCounter(); + S32 required_width = CHICLET_RECT.getWidth(); - if(getShowSpeaker()) + if (show_counter) { - required_width = required_width + speaker_rect.getWidth(); - initSpeakerControl(); + required_width += COUNTER_RECT.getWidth(); } - else + if (show_speaker) { - required_width = required_width - speaker_rect.getWidth(); - } - + required_width += VOICE_INDICATOR_RECT.getWidth(); + } + reshape(required_width, getRect().getHeight()); +} + +void LLIMChiclet::toggleSpeakerControl() +{ + if(getShowSpeaker()) + { + if(getShowCounter()) + { + mSpeakerCtrl->setRect(VOICE_INDICATOR_RECT); + } + else + { + mSpeakerCtrl->setRect(COUNTER_RECT); + } + initSpeakerControl(); + } + + setRequiredWidth(); mSpeakerCtrl->setVisible(getShowSpeaker()); } +void LLIMChiclet::setCounter(S32 counter) +{ + mCounterCtrl->setCounter(counter); + setShowCounter(counter); + setShowNewMessagesIcon(counter); +} + +void LLIMChiclet::toggleCounterControl() +{ + setRequiredWidth(); + mCounterCtrl->setVisible(getShowCounter()); +} + void LLIMChiclet::setShowNewMessagesIcon(bool show) { if(mNewMessagesIcon) @@ -467,6 +660,7 @@ LLIMP2PChiclet::Params::Params() unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); unread_notifications.mouse_opaque(false); + unread_notifications.rect(COUNTER_RECT); unread_notifications.visible(false); speaker.name("speaker"); @@ -505,12 +699,6 @@ LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) mSpeakerCtrl->setVisible(getShowSpeaker()); } -void LLIMP2PChiclet::setCounter(S32 counter) -{ - mCounterCtrl->setCounter(counter); - setShowNewMessagesIcon(counter); -} - void LLIMP2PChiclet::initSpeakerControl() { mSpeakerCtrl->setSpeakerId(getOtherParticipantId()); @@ -623,6 +811,7 @@ LLAdHocChiclet::Params::Params() unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); unread_notifications.mouse_opaque(false); + unread_notifications.rect(COUNTER_RECT); unread_notifications.visible(false); @@ -697,12 +886,6 @@ void LLAdHocChiclet::switchToCurrentSpeaker() mSpeakerCtrl->setSpeakerId(speaker_id); } -void LLAdHocChiclet::setCounter(S32 counter) -{ - mCounterCtrl->setCounter(counter); - setShowNewMessagesIcon(counter); -} - void LLAdHocChiclet::createPopupMenu() { if(mPopupMenu) @@ -774,6 +957,7 @@ LLIMGroupChiclet::Params::Params() unread_notifications.font_halign(LLFontGL::HCENTER); unread_notifications.v_pad(5); unread_notifications.text_color(LLColor4::white); + unread_notifications.rect(COUNTER_RECT); unread_notifications.visible(false); speaker.name("speaker"); @@ -814,12 +998,6 @@ LLIMGroupChiclet::~LLIMGroupChiclet() LLGroupMgr::getInstance()->removeObserver(this); } -void LLIMGroupChiclet::setCounter(S32 counter) -{ - mCounterCtrl->setCounter(counter); - setShowNewMessagesIcon(counter); -} - void LLIMGroupChiclet::draw() { switchToCurrentSpeaker(); @@ -1493,14 +1671,34 @@ bool LLChicletPanel::isAnyIMFloaterDoked() return res; } +S32 LLChicletPanel::getTotalUnreadIMCount() +{ + S32 count = 0; + chiclet_list_t::const_iterator it = mChicletList.begin(); + for( ; mChicletList.end() != it; ++it) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); + if(chiclet) + { + count += chiclet->getCounter(); + } + } + return count; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +LLChicletNotificationCounterCtrl::Params::Params() +: max_displayed_count("max_displayed_count", MAX_DISPLAYED_COUNT) +{ +} LLChicletNotificationCounterCtrl::LLChicletNotificationCounterCtrl(const Params& p) : LLTextBox(p) , mCounter(0) , mInitialWidth(0) + , mMaxDisplayedCount(p.max_displayed_count) { mInitialWidth = getRect().getWidth(); } @@ -1509,11 +1707,21 @@ void LLChicletNotificationCounterCtrl::setCounter(S32 counter) { mCounter = counter; - std::stringstream stream; - stream << getCounter(); + // note same code in LLSysWellChiclet::setCounter(S32 counter) + std::string s_count; + if(counter != 0) + { + static std::string more_messages_exist("+"); + std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : ""); + s_count = llformat("%d%s" + , llmin(counter, mMaxDisplayedCount) + , more_messages.c_str() + ); + } + if(mCounter != 0) { - setText(stream.str()); + setText(s_count); } else { diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 65abcd1f5f..259476c2ad 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -52,10 +52,19 @@ class LLChicletNotificationCounterCtrl : public LLTextBox { public: + static const S32 MAX_DISPLAYED_COUNT; + struct Params : public LLInitParam::Block<Params, LLTextBox::Params> { - Params() - {}; + /** + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ + Optional<S32> max_displayed_count; + + Params(); }; /** @@ -93,6 +102,7 @@ private: S32 mCounter; S32 mInitialWidth; + S32 mMaxDisplayedCount; }; /** @@ -359,6 +369,32 @@ public: virtual void toggleSpeakerControl(); /** + * Sets number of unread messages. Will update chiclet's width if number text + * exceeds size of counter and notify it's parent about size change. + */ + virtual void setCounter(S32); + + /** + * Enables/disables the counter control for a chiclet. + */ + virtual void enableCounterControl(bool enable); + + /** + * Sets show counter state. + */ + virtual void setShowCounter(bool show); + + /** + * Shows/Hides for counter control for a chiclet. + */ + virtual void toggleCounterControl(); + + /** + * Sets required width for a chiclet according to visible controls. + */ + virtual void setRequiredWidth(); + + /** * Shows/hides overlay icon concerning new unread messages. */ virtual void setShowNewMessagesIcon(bool show); @@ -400,6 +436,7 @@ protected: protected: bool mShowSpeaker; + bool mCounterEnabled; LLIconCtrl* mNewMessagesIcon; LLChicletNotificationCounterCtrl* mCounterCtrl; @@ -453,12 +490,6 @@ public: /* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id); /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - - /** * Init Speaker Control with speaker's ID */ /*virtual*/ void initSpeakerControl(); @@ -527,12 +558,6 @@ public: /*virtual*/ void setSessionId(const LLUUID& session_id); /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - - /** * Keep Speaker Control with actual speaker's ID */ /*virtual*/ void draw(); @@ -695,12 +720,6 @@ public: /*virtual*/ void changed(LLGroupChange gc); /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - - /** * Init Speaker Control with speaker's ID */ /*virtual*/ void initSpeakerControl(); @@ -791,6 +810,8 @@ public: void setToggleState(BOOL toggled); + void setNewMessagesState(bool new_messages); + protected: LLSysWellChiclet(const Params& p); @@ -804,18 +825,22 @@ protected: */ void changeLitState(); + /** + * Displays menu. + */ + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + virtual void createMenu() = 0; + protected: class FlashToLitTimer; LLButton* mButton; S32 mCounter; S32 mMaxDisplayedCount; + bool mIsNewMessagesState; - /** - * How many times Well will blink. - */ - S32 mFlashToLitCount; FlashToLitTimer* mFlashToLitTimer; - + LLContextMenu* mContextMenu; }; /** @@ -836,6 +861,21 @@ protected: LLIMWellChiclet(const Params& p); /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + + /** + * Enables chiclet menu items. + */ + bool enableMenuItem(const LLSD& user_data); + + /** + * Creates menu. + */ + /*virtual*/ void createMenu(); + + /** * Handles changes in a session (message was added, messages were read, etc.) * * It get total count of unread messages from a LLIMMgr in all opened sessions and display it. @@ -855,6 +895,21 @@ class LLNotificationChiclet : public LLSysWellChiclet protected: LLNotificationChiclet(const Params& p); + /** + * Processes clicks on chiclet menu. + */ + void onMenuItemClicked(const LLSD& user_data); + + /** + * Enables chiclet menu items. + */ + bool enableMenuItem(const LLSD& user_data); + + /** + * Creates menu. + */ + /*virtual*/ void createMenu(); + // connect counter updaters to the corresponding signals void connectCounterUpdatersToSignal(const std::string& notification_type); @@ -964,6 +1019,8 @@ public: S32 getMinWidth() const { return mMinWidth; } + S32 getTotalUnreadIMCount(); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp index 411cb331a8..ead377deb0 100644 --- a/indra/newview/lldelayedgestureerror.cpp +++ b/indra/newview/lldelayedgestureerror.cpp @@ -36,7 +36,6 @@ #include <list> #include "llnotificationsutil.h" -#include "llnotify.h" #include "llcallbacklist.h" #include "llinventory.h" #include "llviewerinventory.h" diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index b64799bd86..edfb9dc864 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -37,7 +37,6 @@ #include "llnotificationsutil.h" #include "message.h" -#include "llnotify.h" #include "lleventinfo.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index bd6936f05c..9f6412c0ab 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -51,8 +51,16 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { // more label always spans width of text box - width = mEditor.getTextRect().getWidth() - mEditor.getHPad(); - height = llceil(mStyle->getFont()->getLineHeight()); + if (num_chars == 0) + { + width = 0; + height = 0; + } + else + { + width = mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad(); + height = llceil(mStyle->getFont()->getLineHeight()); + } return true; } /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const @@ -104,7 +112,8 @@ private: LLExpandableTextBox::LLTextBoxEx::Params::Params() : more_label("more_label") -{} +{ +} LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) : LLTextBox(p), @@ -117,16 +126,13 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent) { + hideExpandText(); LLTextBox::reshape(width, height, called_from_parent); if (getTextPixelHeight() > getRect().getHeight()) { showExpandText(); } - else - { - hideExpandText(); - } } void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params) @@ -316,8 +322,16 @@ void LLExpandableTextBox::expandTextBox() // hide "more" link, and show full text contents mTextBox->hideExpandText(); + // *HACK dz + // hideExpandText brakes text styles (replaces hyper-links with plain text), see ticket EXT-3290 + // Set text again to make text box re-apply styles. + // *TODO Find proper solution to fix this issue. + // Maybe add removeSegment to LLTextBase + mTextBox->setTextBase(mText); + S32 text_delta = mTextBox->getVerticalTextDelta(); - text_delta += mTextBox->getVPad() * 2 + mScroll->getBorderWidth() * 2; + text_delta += mTextBox->getVPad() * 2; + text_delta += mScroll->getBorderWidth() * 2; // no need to expand if(text_delta <= 0) { diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 7c989cfa50..2b4f9e527c 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -61,6 +61,7 @@ protected: // adds or removes "More" link as needed /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()); + void setTextBase(const std::string& text) { LLTextBase::setText(text); } /** * Returns difference between text box height and text height. diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 17b0710813..832626e007 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -370,6 +370,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mLandingTab(NULL), mLastTab(NULL), mTabsHighlightEnabled(TRUE) + , mUpdateDropDownItems(true) { // Register callback for menus with current registrar (will be parent panel's registrar) LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Favorites.DoToSelected", @@ -589,16 +590,15 @@ void LLFavoritesBarCtrl::changed(U32 mask) } else { - updateButtons(getRect().getWidth()); + updateButtons(); } } //virtual void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) { - updateButtons(width); - LLUICtrl::reshape(width, height, called_from_parent); + updateButtons(); } void LLFavoritesBarCtrl::draw() @@ -637,7 +637,7 @@ LLXMLNodePtr LLFavoritesBarCtrl::getButtonXMLNode() return buttonXMLNode; } -void LLFavoritesBarCtrl::updateButtons(U32 bar_width) +void LLFavoritesBarCtrl::updateButtons() { mItems.clear(); @@ -652,139 +652,149 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) return; } - S32 buttonWidth = 120; //default value - buttonXMLNode->getAttributeS32("width", buttonWidth); - S32 buttonHGap = 2; // default value - buttonXMLNode->getAttributeS32("left", buttonHGap); - - S32 count = mItems.count(); - S32 buttons_space = bar_width - buttonHGap; - - S32 first_drop_down_item = count; - - // Calculating, how much buttons can fit in the bar - S32 buttons_width = 0; - for (S32 i = 0; i < count; ++i) + const child_list_t* childs = getChildList(); + child_list_const_iter_t child_it = childs->begin(); + int first_changed_item_index = 0; + int rightest_point = getRect().mRight - mChevronButton->getRect().getWidth(); + //lets find first changed button + while (child_it != childs->end() && first_changed_item_index < mItems.count()) { - buttons_width += buttonWidth + buttonHGap; - if (buttons_width > buttons_space) + LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it); + if (button) { - // There is no space for all buttons. - // Calculating the number of buttons, that are fit with chevron button - buttons_space -= mChevronButton->getRect().getWidth() + buttonHGap; - while (i >= 0 && buttons_width > buttons_space) + const LLViewerInventoryItem *item = mItems[first_changed_item_index].get(); + if (item) { - buttons_width -= buttonWidth + buttonHGap; - i--; + // an child's order and mItems should be same + if (button->getLandmarkId() != item->getUUID() // sort order has been changed + || button->getLabelSelected() != item->getDisplayName() // favorite's name has been changed + || button->getRect().mRight < rightest_point) // favbar's width has been changed + { + break; + } } - first_drop_down_item = i + 1; // First item behind visible items - - break; + first_changed_item_index++; } + child_it++; } + // now first_changed_item_index should contains a number of button that need to change - bool recreate_buttons = true; - - // If inventory items are not changed up to mFirstDropDownItem, no need to recreate them - if (mFirstDropDownItem == first_drop_down_item && (mItemNamesCache.size() == count || mItemNamesCache.size() == mFirstDropDownItem)) + if (first_changed_item_index <= mItems.count()) { - S32 i; - for (i = 0; i < mFirstDropDownItem; ++i) + // Rebuild the buttons only + // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator + + while (child_it != childs->end()) { - if (mItemNamesCache.get(i) != mItems.get(i)->getName()) + //lets remove other landmarks button and rebuild it + child_list_const_iter_t cur_it = child_it++; + LLFavoriteLandmarkButton* button = + dynamic_cast<LLFavoriteLandmarkButton*> (*cur_it); + if (button) { - break; + removeChild(button); + delete button; } } - if (i == mFirstDropDownItem) + // we have to remove ChevronButton to make sure that the last item will be LandmarkButton to get the right aligning + if (mChevronButton->getParent() == this) { - recreate_buttons = false; + removeChild(mChevronButton); } - } - - if (recreate_buttons) - { - mFirstDropDownItem = first_drop_down_item; - - mItemNamesCache.clear(); - for (S32 i = 0; i < mFirstDropDownItem; i++) + int last_right_edge = 0; + if (getChildList()->size() > 0) { - mItemNamesCache.put(mItems.get(i)->getName()); + last_right_edge = getChildList()->back()->getRect().mRight; } - - // Rebuild the buttons only - // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ) + //last_right_edge is saving coordinates + LLButton* last_new_button = NULL; + int j = first_changed_item_index; + for (; j < mItems.count(); j++) { - child_list_const_iter_t cur_it = child_it++; - LLView* viewp = *cur_it; - LLButton* button = dynamic_cast<LLButton*>(viewp); - if (button && (button != mChevronButton)) + last_new_button = createButton(mItems[j], buttonXMLNode, last_right_edge); + if (!last_new_button) { - removeChild(button); - delete button; + break; } - } + sendChildToBack(last_new_button); + last_right_edge = last_new_button->getRect().mRight; - createButtons(mItems, buttonXMLNode, buttonWidth, buttonHGap); - } - - // Chevron button - if (mFirstDropDownItem != count) - { - // Chevron button should stay right aligned - LLRect rect; - rect.setOriginAndSize(bar_width - mChevronButton->getRect().getWidth() - buttonHGap, 0, mChevronButton->getRect().getWidth(), mChevronButton->getRect().getHeight()); - mChevronButton->setRect(rect); - mChevronButton->setVisible(TRUE); + mLastTab = last_new_button; + } + mFirstDropDownItem = j; + // Chevron button + if (mFirstDropDownItem < mItems.count()) + { + // if updateButton had been called it means: + //or there are some new favorites, or width had been changed + // so if we need to display chevron button, we must update dropdown items too. + mUpdateDropDownItems = true; + S32 buttonHGap = 2; // default value + buttonXMLNode->getAttributeS32("left", buttonHGap); + LLRect rect; + // Chevron button should stay right aligned + rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0, + mChevronButton->getRect().getWidth(), + mChevronButton->getRect().getHeight()); + + addChild(mChevronButton); + mChevronButton->setRect(rect); + mChevronButton->setVisible(TRUE); + } } else { - // Hide chevron button if all items are visible on bar - mChevronButton->setVisible(FALSE); + mUpdateDropDownItems = false; } } - -void LLFavoritesBarCtrl::createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &buttonXMLNode, S32 buttonWidth, S32 buttonHGap) +LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &buttonXMLNode, S32 x_offset) { - S32 curr_x = buttonHGap; - // Adding buttons + S32 def_button_width = 120; + buttonXMLNode->getAttributeS32("width", def_button_width); + S32 button_x_delta = 2; // default value + buttonXMLNode->getAttributeS32("left", button_x_delta); + S32 curr_x = x_offset; + /** + * WORKAROUND: + * there are some problem with displaying of fonts in buttons. + * Empty space (or ...) is displaying instead of last symbols, even though the width of the button is enough. + * Problem will gone, if we stretch out the button. For that reason I have to put additional 10 pixels. + */ + int requred_width = mFont->getWidth(item->getDisplayName()) + 10; + int width = requred_width > def_button_width? def_button_width : requred_width; LLFavoriteLandmarkButton* fav_btn = NULL; - mLandingTab = mLastTab = NULL; - for(S32 i = mFirstDropDownItem -1, j = 0; i >= 0; i--) + // do we have a place for next button + double buttonHGap + mChevronButton ? + if(curr_x + width + 2*button_x_delta + mChevronButton->getRect().getWidth() > getRect().mRight ) { - LLViewerInventoryItem* item = items.get(j++); - - fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL); - if (NULL == fav_btn) - { - llwarns << "Unable to create button for landmark: " << item->getName() << llendl; - continue; - } - - fav_btn->setLandmarkID(item->getUUID()); - - // change only left and save bottom - fav_btn->setOrigin(curr_x, fav_btn->getRect().mBottom); - fav_btn->setFont(mFont); - fav_btn->setName(item->getName()); - fav_btn->setLabel(item->getName()); - fav_btn->setToolTip(item->getName()); - fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); - fav_btn->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3,_4 )); - - fav_btn->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); - fav_btn->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); - - sendChildToBack(fav_btn); - - curr_x += buttonWidth + buttonHGap; + return NULL; } - - mLastTab = fav_btn; + fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL); + if (NULL == fav_btn) + { + llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl; + return NULL; + } + + LLRect butt_rect (fav_btn->getRect()); + fav_btn->setLandmarkID(item->getUUID()); + butt_rect.setOriginAndSize(curr_x + button_x_delta, fav_btn->getRect().mBottom, width, fav_btn->getRect().getHeight()); + + fav_btn->setRect(butt_rect); + // change only left and save bottom + fav_btn->setFont(mFont); + fav_btn->setName(item->getName()); + fav_btn->setLabel(item->getName()); + fav_btn->setToolTip(item->getName()); + fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); + fav_btn->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3,_4 )); + + fav_btn->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); + fav_btn->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); + + return fav_btn; } @@ -844,99 +854,61 @@ void LLFavoritesBarCtrl::showDropDownMenu() LLToggleableMenu* menu = (LLToggleableMenu*)mPopupMenuHandle.get(); - if(menu) + if (menu) { if (!menu->toggleVisibility()) return; - mItems.clear(); - - if (!collectFavoriteItems(mItems)) - { - return; - } - - S32 count = mItems.count(); - - // Check it there are changed items, since last call - if (mItemNamesCache.size() == count) - { - S32 i; - for (i = mFirstDropDownItem; i < count; i++) - { - if (mItemNamesCache.get(i) != mItems.get(i)->getName()) - { - break; - } - } - - // Check passed, just show the menu - if (i == count) - { - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - - if (menu->getButtonRect().isEmpty()) - { - menu->setButtonRect(mChevronButton->getRect(), this); - } - - LLMenuGL::showPopup(this, menu, getRect().getWidth() - menu->getRect().getWidth(), 0); - return; - } - } - - // Add menu items to cache, if there is only names of buttons - if (mItemNamesCache.size() == mFirstDropDownItem) + U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth()); + if (mUpdateDropDownItems) { - for (S32 i = mFirstDropDownItem; i < count; i++) - { - mItemNamesCache.put(mItems.get(i)->getName()); - } - } - - menu->empty(); + menu->empty(); - U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth()); - U32 widest_item = 0; + U32 widest_item = 0; - for(S32 i = mFirstDropDownItem; i < count; i++) - { - LLViewerInventoryItem* item = mItems.get(i); - const std::string& item_name = item->getName(); - - LLFavoriteLandmarkMenuItem::Params item_params; - item_params.name(item_name); - item_params.label(item_name); - - item_params.on_click.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); - LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params); - menu_item->initFavoritesBarPointer(this); - menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this,item->getUUID(),_1,_2,_3,_4)); - menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); - menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); - menu_item->setLandmarkID(item->getUUID()); - - // Check whether item name wider than menu - if (menu_item->getNominalWidth() > max_width) + for (S32 i = mFirstDropDownItem; i < mItems.count(); i++) { - S32 chars_total = item_name.length(); - S32 chars_fitted = 1; - menu_item->setLabel(LLStringExplicit("")); - S32 label_space = max_width - menu_item->getFont()->getWidth("...") - - menu_item->getNominalWidth(); // This returns width of menu item with empty label (pad pixels) - - while (chars_fitted < chars_total && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space) + LLViewerInventoryItem* item = mItems.get(i); + const std::string& item_name = item->getName(); + + LLFavoriteLandmarkMenuItem::Params item_params; + item_params.name(item_name); + item_params.label(item_name); + + item_params.on_click.function(boost::bind( + &LLFavoritesBarCtrl::onButtonClick, this, + item->getUUID())); + LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params); + menu_item->initFavoritesBarPointer(this); + menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->setLandmarkID(item->getUUID()); + + // Check whether item name wider than menu + if (menu_item->getNominalWidth() > max_width) { - chars_fitted++; + S32 chars_total = item_name.length(); + S32 chars_fitted = 1; + menu_item->setLabel(LLStringExplicit("")); + S32 label_space = max_width - menu_item->getFont()->getWidth("...") - + menu_item->getNominalWidth();// This returns width of menu item with empty label (pad pixels) + + while (chars_fitted < chars_total + && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space) + { + chars_fitted++; + } + chars_fitted--; // Rolling back one char, that doesn't fit + + menu_item->setLabel(item_name.substr(0, chars_fitted) + + "..."); } - chars_fitted--; // Rolling back one char, that doesn't fit + widest_item = llmax(widest_item, menu_item->getNominalWidth()); - menu_item->setLabel(item_name.substr(0, chars_fitted) + "..."); + menu->addChild(menu_item); } - widest_item = llmax(widest_item, menu_item->getNominalWidth()); - - menu->addChild(menu_item); + mUpdateDropDownItems = false; } menu->buildDrawLabels(); @@ -945,7 +917,6 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu->setButtonRect(mChevronButton->getRect(), this); LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0); - } } diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index b2fe3cc651..9ac734baff 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -74,8 +74,8 @@ public: void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; } protected: - void updateButtons(U32 bar_width); - void createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &root, S32 buttonWidth, S32 buttonHGap); + void updateButtons(); + LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &root, S32 x_offset ); LLXMLNodePtr getButtonXMLNode(); BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items); @@ -101,9 +101,7 @@ protected: LLUUID mFavoriteFolderId; const LLFontGL *mFont; S32 mFirstDropDownItem; - - typedef LLDynamicArray<std::string> item_names_array_t; - item_names_array_t mItemNamesCache; + bool mUpdateDropDownItems; LLUUID mSelectedItemID; diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index ab2455620f..7ecbc3db60 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -64,11 +64,6 @@ extern "C" { #if LL_GTK # include "gtk/gtk.h" #endif // LL_GTK - -// also mostly for Linux, for some X11-specific filepicker usability tweaks -#if LL_X11 -#include "SDL/SDL_syswm.h" -#endif } class LLFilePicker diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 0bcdad5da1..7fd0e070be 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -40,7 +40,6 @@ // viewer includes #include "llagent.h" // for gAgent.inPrelude() -#include "llnotify.h" #include "llviewercontrol.h" #include "llui.h" #include "llappviewer.h" diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 9e6ef2fc4d..60f150bd96 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -570,25 +570,12 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data) { previewp->resetMotion(); previewp->mPauseRequest = NULL; - previewp->mPauseButton->setVisible(TRUE); - previewp->mPauseButton->setEnabled(TRUE); - previewp->mPlayButton->setVisible(FALSE); - previewp->mPlayButton->setEnabled(FALSE); } else if (avatarp->areAnimationsPaused()) - { - + { previewp->mPauseRequest = NULL; - previewp->mPauseButton->setVisible(TRUE); - previewp->mPauseButton->setEnabled(TRUE); - previewp->mPlayButton->setVisible(FALSE); - previewp->mPlayButton->setEnabled(FALSE); } - } - - - } //----------------------------------------------------------------------------- @@ -609,16 +596,9 @@ void LLFloaterAnimPreview::onBtnPause(void* user_data) if (!avatarp->areAnimationsPaused()) { previewp->mPauseRequest = avatarp->requestPause(); - - previewp->mPlayButton->setVisible(TRUE); - previewp->mPlayButton->setEnabled(TRUE); - previewp->mPauseButton->setVisible(FALSE); - previewp->mPauseButton->setEnabled(FALSE); } } } - - } //----------------------------------------------------------------------------- @@ -636,10 +616,6 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data) previewp->resetMotion(); previewp->mPauseRequest = avatarp->requestPause(); } - previewp->mPlayButton->setVisible(TRUE); - previewp->mPlayButton->setEnabled(TRUE); - previewp->mPauseButton->setVisible(FALSE); - previewp->mPauseButton->setEnabled(FALSE); } //----------------------------------------------------------------------------- @@ -953,18 +929,22 @@ bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data) //----------------------------------------------------------------------------- void LLFloaterAnimPreview::refresh() { + // Are we showing the play button (default) or the pause button? + bool show_play = true; if (!mAnimPreview) { childShow("bad_animation_text"); + // play button visible but disabled mPlayButton->setEnabled(FALSE); - mPlayButton->setVisible(TRUE); - mPauseButton->setVisible(FALSE); mStopButton->setEnabled(FALSE); childDisable("ok_btn"); } else { childHide("bad_animation_text"); + // re-enabled in case previous animation was bad + mPlayButton->setEnabled(TRUE); + mStopButton->setEnabled(TRUE); LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); if (avatarp->isMotionActive(mMotionID)) { @@ -972,28 +952,25 @@ void LLFloaterAnimPreview::refresh() LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); if (!avatarp->areAnimationsPaused()) { + // animation is playing if (motionp) { F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration(); childSetValue("playback_slider", fraction_complete); } - - mPlayButton->setVisible(FALSE); - mPauseButton->setVisible(TRUE); - + show_play = false; } - } else { + // Motion just finished playing mPauseRequest = avatarp->requestPause(); - //mPlayButton->setVisible(TRUE); - //mPlayButton->setEnabled(TRUE); - mStopButton->setEnabled(TRUE); // stop also resets, leave enabled. } childEnable("ok_btn"); mAnimPreview->requestUpdate(); } + mPlayButton->setVisible(show_play); + mPauseButton->setVisible(!show_play); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index 09b04f1f42..dd2c0b809a 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -33,6 +33,7 @@ #ifndef LL_LLFLOATERANIMPREVIEW_H #define LL_LLFLOATERANIMPREVIEW_H +#include "llassettype.h" #include "llfloaternamedesc.h" #include "lldynamictexture.h" #include "llcharacter.h" diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index b63bcccf6b..698ccec9c1 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -35,7 +35,6 @@ #include "llfloaterauction.h" #include "llfloaterregioninfo.h" -#include "lldir.h" #include "llgl.h" #include "llimagej2c.h" #include "llimagetga.h" @@ -43,12 +42,12 @@ #include "llvfile.h" #include "llvfs.h" #include "llwindow.h" +#include "message.h" #include "llagent.h" #include "llcombobox.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llsavedsettingsglue.h" #include "llviewertexturelist.h" #include "llviewerparcelmgr.h" diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 68f06b1e5b..e925796526 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -33,11 +33,11 @@ #include "llviewerprecompiledheaders.h" -#include "llfloaterbump.h" +#include "llsd.h" +#include "mean_collision_data.h" +#include "llfloaterbump.h" #include "llscrolllistctrl.h" - -#include "llsd.h" #include "lluictrlfactory.h" #include "llviewermessage.h" diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 16a5bb63e7..fba557c656 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -41,7 +41,6 @@ #include "llfloaterbuy.h" #include "llagent.h" // for agent id -#include "llalertdialog.h" #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" #include "llfloaterinventory.h" // for get_item_icon diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 39c7bc02af..0daef27af2 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -43,7 +43,6 @@ #include "llcachename.h" #include "llagent.h" // for agent id -#include "llalertdialog.h" #include "llcheckboxctrl.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 3a8c3ab4d2..9b88923e7e 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -49,7 +49,6 @@ #include "lliconctrl.h" #include "lllineeditor.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llparcel.h" #include "llslurl.h" #include "llstatusbar.h" diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 1482d3fe21..56291c57a6 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -50,7 +50,6 @@ #include "llinventorymodel.h" #include "llnamelistctrl.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 04ba11530a..e1409b8ad5 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -45,7 +45,6 @@ #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" @@ -69,7 +68,6 @@ #include "llviewerwindow.h" #include "llworld.h" #include "llfloateravatarpicker.h" -#include "llnotify.h" #include "llxfermanager.h" #include "llvlcomposition.h" #include "llsurface.h" diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 14cff3bcc3..d2ee3e44c5 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -37,7 +37,6 @@ // Viewer libs #include "llviewercontrol.h" #include "llmediactrl.h" -#include "llalertdialog.h" // Linden libs #include "llnotificationsutil.h" diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 5b03292b22..02884575b0 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -52,10 +52,10 @@ #include "llfloateravatarpicker.h" #include "llfloaterauction.h" #include "llfloatergroups.h" +#include "llfloaterscriptlimits.h" #include "llavataractions.h" #include "lllineeditor.h" #include "llnamelistctrl.h" -#include "llnotify.h" #include "llpanellandaudio.h" #include "llpanellandmedia.h" #include "llradiogroup.h" @@ -149,6 +149,10 @@ void send_parcel_select_objects(S32 parcel_local_id, U32 return_type, msg->sendReliable(region->getHost()); } +LLParcel* LLFloaterLand::getCurrentSelectedParcel() +{ + return mParcel->getParcel(); +}; //static LLPanelLandObjects* LLFloaterLand::getCurrentPanelLandObjects() @@ -422,6 +426,9 @@ BOOL LLPanelLandGeneral::postBuild() mBtnBuyLand = getChild<LLButton>("Buy Land..."); mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND); + mBtnScriptLimits = getChild<LLButton>("Scripts..."); + mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this); + mBtnBuyGroupLand = getChild<LLButton>("Buy For Group..."); mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND); @@ -509,6 +516,7 @@ void LLPanelLandGeneral::refresh() mTextDwell->setText(LLStringUtil::null); mBtnBuyLand->setEnabled(FALSE); + mBtnScriptLimits->setEnabled(FALSE); mBtnBuyGroupLand->setEnabled(FALSE); mBtnReleaseLand->setEnabled(FALSE); mBtnReclaimLand->setEnabled(FALSE); @@ -716,6 +724,8 @@ void LLPanelLandGeneral::refresh() mBtnBuyLand->setEnabled( LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false)); + mBtnScriptLimits->setEnabled(true); +// LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false)); mBtnBuyGroupLand->setEnabled( LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true)); @@ -855,6 +865,17 @@ void LLPanelLandGeneral::onClickBuyLand(void* data) LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); } +// static +void LLPanelLandGeneral::onClickScriptLimits(void* data) +{ + LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; + LLParcel* parcel = panelp->mParcel->getParcel(); + if(parcel != NULL) + { + LLFloaterReg::showInstance("script_limits"); + } +} + BOOL LLPanelLandGeneral::enableDeedToGroup(void* data) { LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; @@ -1527,7 +1548,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo object_count_str = llformat("%d", object_count); item_params.columns.add().value(object_count_str).font(FONT).column("count"); - item_params.columns.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent"); + item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date"); self->mOwnerList->addRow(item_params); diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index f7fb978c2a..eb47fbe15b 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -70,6 +70,7 @@ class LLPanelLandAccess; class LLPanelLandBan; class LLPanelLandRenters; class LLPanelLandCovenant; +class LLParcel; class LLFloaterLand : public LLFloater @@ -80,7 +81,9 @@ public: static LLPanelLandObjects* getCurrentPanelLandObjects(); static LLPanelLandCovenant* getCurrentPanelLandCovenant(); - + + LLParcel* getCurrentSelectedParcel(); + virtual void onOpen(const LLSD& key); virtual BOOL postBuild(); @@ -146,6 +149,7 @@ public: static BOOL enableDeedToGroup(void*); static void onClickDeed(void*); static void onClickBuyLand(void* data); + static void onClickScriptLimits(void* data); static void onClickRelease(void*); static void onClickReclaim(void*); static void onClickBuyPass(void* deselect_when_done); @@ -215,6 +219,7 @@ protected: LLTextBox* mTextDwell; LLButton* mBtnBuyLand; + LLButton* mBtnScriptLimits; LLButton* mBtnBuyGroupLand; // these buttons share the same location, but diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 16a76723eb..5cfd56193e 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -145,18 +145,21 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance() //static void LLFloaterMediaSettings::apply() { - LLSD settings; - sInstance->mPanelMediaSettingsGeneral->preApply(); - sInstance->mPanelMediaSettingsGeneral->getValues( settings ); - sInstance->mPanelMediaSettingsSecurity->preApply(); - sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->preApply(); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); - LLSelectMgr::getInstance()->selectionSetMediaData(settings); - sInstance->mPanelMediaSettingsGeneral->postApply(); - sInstance->mPanelMediaSettingsSecurity->postApply(); - sInstance->mPanelMediaSettingsPermissions->postApply(); + if (sInstance->haveValuesChanged()) + { + LLSD settings; + sInstance->mPanelMediaSettingsGeneral->preApply(); + sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsSecurity->preApply(); + sInstance->mPanelMediaSettingsSecurity->getValues( settings ); + sInstance->mPanelMediaSettingsPermissions->preApply(); + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); + LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); + LLSelectMgr::getInstance()->selectionSetMediaData(settings); + sInstance->mPanelMediaSettingsGeneral->postApply(); + sInstance->mPanelMediaSettingsSecurity->postApply(); + sInstance->mPanelMediaSettingsPermissions->postApply(); + } } //////////////////////////////////////////////////////////////////////////////// @@ -249,15 +252,6 @@ void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click) LLTabContainer* self = (LLTabContainer*)user_data; gSavedSettings.setS32("LastMediaSettingsTab", self->getCurrentPanelIndex()); } - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterMediaSettings::enableOkApplyBtns( bool enable ) -{ - childSetEnabled( "OK", enable ); - childSetEnabled( "Apply", enable ); -} - //////////////////////////////////////////////////////////////////////////////// // const std::string LLFloaterMediaSettings::getHomeUrl() @@ -272,17 +266,25 @@ const std::string LLFloaterMediaSettings::getHomeUrl() // virtual void LLFloaterMediaSettings::draw() { + // Set the enabled state of the "Apply" button if values changed + childSetEnabled( "Apply", haveValuesChanged() ); + + LLFloater::draw(); +} + + +//private +bool LLFloaterMediaSettings::haveValuesChanged() const +{ + bool values_changed = false; // *NOTE: The code below is very inefficient. Better to do this // only when data change. // Every frame, check to see what the values are. If they are not - // the same as the default media data, enable the OK/Apply buttons + // the same as the initial media data, enable the OK/Apply buttons LLSD settings; sInstance->mPanelMediaSettingsGeneral->getValues( settings ); sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - - bool values_changed = false; - + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); LLSD::map_const_iterator iter = settings.beginMap(); LLSD::map_const_iterator end = settings.endMap(); for ( ; iter != end; ++iter ) @@ -295,9 +297,6 @@ void LLFloaterMediaSettings::draw() break; } } - - enableOkApplyBtns(values_changed); - - LLFloater::draw(); + return values_changed; } diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index b72e3d855d..cdfd5aa8ae 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -85,7 +85,7 @@ protected: private: - void enableOkApplyBtns( bool enable ); + bool haveValuesChanged() const; LLSD mInitialValues; bool mWaitingToClose; diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 56a86c2cb7..ec50ed596c 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -44,7 +44,6 @@ #include "llnotificationsutil.h" #include "lltextbox.h" -#include "llalertdialog.h" #include "llinventorybridge.h" #include "llfloaterinventory.h" #include "llinventorymodel.h" @@ -72,11 +71,14 @@ LLFloaterOpenObject::~LLFloaterOpenObject() { // sInstance = NULL; } + // virtual BOOL LLFloaterOpenObject::postBuild() { childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this mPanelInventoryObject = getChild<LLPanelObjectInventory>("object_contents"); + + refresh(); return TRUE; } @@ -95,29 +97,57 @@ void LLFloaterOpenObject::onOpen(const LLSD& key) return; } mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); + refresh(); } + void LLFloaterOpenObject::refresh() { mPanelInventoryObject->refresh(); - std::string name; - BOOL enabled; + std::string name = ""; + + // Enable the copy || copy & wear buttons only if we have something we can copy or copy & wear (respectively). + bool copy_enabled = false; + bool wear_enabled = false; LLSelectNode* node = mObjectSelection->getFirstRootNode(); - if (node) + if (node) { name = node->mName; - enabled = TRUE; - } - else - { - name = ""; - enabled = FALSE; + copy_enabled = true; + + LLViewerObject* object = node->getObject(); + if (object) + { + // this folder is coming from an object, as there is only one folder in an object, the root, + // we need to collect the entire contents and handle them as a group + InventoryObjectList inventory_objects; + object->getInventoryContents(inventory_objects); + + if (!inventory_objects.empty()) + { + for (InventoryObjectList::iterator it = inventory_objects.begin(); + it != inventory_objects.end(); + ++it) + { + LLInventoryItem* item = static_cast<LLInventoryItem*> ((LLInventoryObject*)(*it)); + LLInventoryType::EType type = item->getInventoryType(); + if (type == LLInventoryType::IT_OBJECT + || type == LLInventoryType::IT_ATTACHMENT + || type == LLInventoryType::IT_WEARABLE + || type == LLInventoryType::IT_GESTURE) + { + wear_enabled = true; + break; + } + } + } + } } childSetTextArg("object_name", "[DESC]", name); - childSetEnabled("copy_to_inventory_button", enabled); - childSetEnabled("copy_and_wear_button", enabled); + childSetEnabled("copy_to_inventory_button", copy_enabled); + childSetEnabled("copy_and_wear_button", wear_enabled); } @@ -194,7 +224,6 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data) if (result == 0) { - LLFloaterInventory::showAgentInventory(); LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (active_panel) { diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 17bb8221ad..7edc27d4c3 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -32,7 +32,6 @@ */ #include "llviewerprecompiledheaders.h" -#include "llalertdialog.h" #include "llcheckboxctrl.h" #include "llfloaterperms.h" #include "llviewercontrol.h" diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index 572eeb57fe..8da44e2035 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -56,9 +56,8 @@ #include "llstatusbar.h" #include "llviewerregion.h" #include "lleconomy.h" +#include "message.h" -#include "llgl.h" -#include "llglheaders.h" #include "llimagejpeg.h" #include "llimagej2c.h" #include "llvfile.h" diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h index 49cce53106..0a44b50779 100644 --- a/indra/newview/llfloaterpostcard.h +++ b/indra/newview/llfloaterpostcard.h @@ -70,7 +70,7 @@ public: void sendPostcard(); -protected: +private: LLPointer<LLImageJPEG> mJPEGImage; LLPointer<LLViewerTexture> mViewerImage; @@ -78,7 +78,7 @@ protected: LLAssetID mAssetID; LLVector2 mImageScale; LLVector3d mPosTakenGlobal; - boolean mHasFirstMsgFocus; + bool mHasFirstMsgFocus; }; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ab27375b87..ff568a11a9 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -313,8 +313,7 @@ F32 LLFloaterPreference::sAspectRatio = 0.0; LLFloaterPreference::LLFloaterPreference(const LLSD& key) : LLFloater(key), mGotPersonalInfo(false), - mOriginalIMViaEmail(false), - mCancelOnClose(true) + mOriginalIMViaEmail(false) { //Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); @@ -606,7 +605,7 @@ void LLFloaterPreference::onClose(bool app_quitting) { gSavedSettings.setS32("LastPrefTab", getChild<LLTabContainer>("pref core")->getCurrentPanelIndex()); LLPanelLogin::setAlwaysRefresh(false); - if (mCancelOnClose) cancel(); + cancel(); } void LLFloaterPreference::onOpenHardwareSettings() @@ -628,12 +627,10 @@ void LLFloaterPreference::onBtnOK() if (canClose()) { + saveSettings(); apply(); - // Here we do not want to cancel on close, so we do this funny thing - // that prevents cancel from undoing our changes when we hit OK - mCancelOnClose = false; closeFloater(false); - mCancelOnClose = true; + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); LLUIColorTable::instance().saveUserSettings(); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index d292f3bb7b..94108cb79a 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -148,7 +148,6 @@ private: static std::string sSkin; bool mGotPersonalInfo; bool mOriginalIMViaEmail; - bool mCancelOnClose; bool mOriginalHideOnlineStatus; std::string mDirectoryVisibility; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 8a26078f3d..496fa62d05 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -42,18 +42,18 @@ #include "llglheaders.h" #include "llregionflags.h" #include "llstl.h" +#include "llvfile.h" +#include "llxfermanager.h" #include "indra_constants.h" #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llappviewer.h" #include "llfloateravatarpicker.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llfilepicker.h" -#include "llfloaterdaycycle.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() #include "llfloatertopobjects.h" // added to fix SL-32336 #include "llfloatergroups.h" @@ -62,7 +62,6 @@ #include "llfloaterwindlight.h" #include "llinventorymodel.h" #include "lllineeditor.h" -#include "llalertdialog.h" #include "llnamelistctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 704166d106..a21b96bf16 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -35,9 +35,12 @@ #define LL_LLFLOATERREGIONINFO_H #include <vector> +#include "llassettype.h" #include "llfloater.h" +#include "llhost.h" #include "llpanel.h" +class LLDispatcher; class LLLineEditor; class LLMessageSystem; class LLPanelRegionInfo; @@ -51,6 +54,7 @@ class LLNameListCtrl; class LLSliderCtrl; class LLSpinCtrl; class LLTextBox; +class LLVFS; class LLPanelRegionGeneralInfo; class LLPanelRegionDebugInfo; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 932e49c79b..9f3dcae8ef 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -40,11 +40,14 @@ // linden library includes #include "llassetstorage.h" #include "llfontgl.h" -#include "llgl.h" // for renderer +#include "llimagej2c.h" #include "llinventory.h" #include "llnotificationsutil.h" #include "llstring.h" #include "llsys.h" +#include "llvfile.h" +#include "llvfs.h" +#include "mean_collision_data.h" #include "message.h" #include "v3math.h" diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp new file mode 100644 index 0000000000..3042fbc6ec --- /dev/null +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -0,0 +1,1061 @@ +/** + * @file llfloaterscriptlimits.cpp + * @author Gabriel Lee + * @brief Implementation of the region info and controls floater and panels. + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llfloaterscriptlimits.h" + +#include "llsdutil.h" +#include "llsdutil_math.h" +#include "message.h" + +#include "llagent.h" +#include "llfloateravatarpicker.h" +#include "llfloaterland.h" +#include "llfloaterreg.h" +#include "llregionhandle.h" +#include "llscrolllistctrl.h" +#include "llscrolllistitem.h" +#include "llparcel.h" +#include "lltabcontainer.h" +#include "lltracker.h" +#include "lltrans.h" +#include "llviewercontrol.h" +#include "lluictrlfactory.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" +#include "llviewerwindow.h" + +///---------------------------------------------------------------------------- +/// LLFloaterScriptLimits +///---------------------------------------------------------------------------- + +// due to server side bugs the full summary display is not possible +// until they are fixed this define creates a simple version of the +// summary which only shows available & correct information +#define USE_SIMPLE_SUMMARY + +LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed) + : LLFloater(seed) +{ +} + +BOOL LLFloaterScriptLimits::postBuild() +{ + // a little cheap and cheerful - if there's an about land panel open default to showing parcel info, + // otherwise default to showing attachments (avatar appearance) + bool selectParcelPanel = false; + + LLFloaterLand* instance = LLFloaterReg::getTypedInstance<LLFloaterLand>("about_land"); + if(instance) + { + if(instance->isShown()) + { + selectParcelPanel = true; + } + } + + mTab = getChild<LLTabContainer>("scriptlimits_panels"); + + // contruct the panels + LLPanelScriptLimitsRegionMemory* panel_memory; + panel_memory = new LLPanelScriptLimitsRegionMemory; + mInfoPanels.push_back(panel_memory); + + LLUICtrlFactory::getInstance()->buildPanel(panel_memory, "panel_script_limits_region_memory.xml"); + mTab->addTabPanel(panel_memory); + + LLPanelScriptLimitsRegionURLs* panel_urls = new LLPanelScriptLimitsRegionURLs; + mInfoPanels.push_back(panel_urls); + LLUICtrlFactory::getInstance()->buildPanel(panel_urls, "panel_script_limits_region_urls.xml"); + mTab->addTabPanel(panel_urls); + + LLPanelScriptLimitsAttachment* panel_attachments = new LLPanelScriptLimitsAttachment; + mInfoPanels.push_back(panel_attachments); + LLUICtrlFactory::getInstance()->buildPanel(panel_attachments, "panel_script_limits_my_avatar.xml"); + mTab->addTabPanel(panel_attachments); + + if(selectParcelPanel) + { + mTab->selectTab(0); + } + else + { + mTab->selectTab(2); + } + + return TRUE; +} + +LLFloaterScriptLimits::~LLFloaterScriptLimits() +{ +} + +// public +void LLFloaterScriptLimits::refresh() +{ + for(info_panels_t::iterator iter = mInfoPanels.begin(); + iter != mInfoPanels.end(); ++iter) + { + (*iter)->refresh(); + } +} + + +///---------------------------------------------------------------------------- +// Base class for panels +///---------------------------------------------------------------------------- + +LLPanelScriptLimitsInfo::LLPanelScriptLimitsInfo() + : LLPanel() +{ +} + + +// virtual +BOOL LLPanelScriptLimitsInfo::postBuild() +{ + refresh(); + return TRUE; +} + +// virtual +void LLPanelScriptLimitsInfo::updateChild(LLUICtrl* child_ctr) +{ +} + +///---------------------------------------------------------------------------- +// Responders +///---------------------------------------------------------------------------- + +void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content) +{ + // at this point we have an llsd which should contain ether one or two urls to the services we want. + // first we look for the details service: + if(content.has("ScriptResourceDetails")) + { + LLHTTPClient::get(content["ScriptResourceDetails"], new fetchScriptLimitsRegionDetailsResponder(mInfo)); + } + else + { + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(!instance) + { + llinfos << "Failed to get llfloaterscriptlimits instance" << llendl; + } + else + { + +// temp - only show info if we get details - there's nothing to show if not until the sim gets fixed +#ifdef USE_SIMPLE_SUMMARY + + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + std::string msg = LLTrans::getString("ScriptLimitsRequestDontOwnParcel"); + panel_memory->childSetValue("loading_text", LLSD(msg)); + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + panel_urls->childSetValue("loading_text", LLSD(msg)); + + // intentional early out as we dont want the resource summary if we are using the "simple summary" + // and the details are missing + return; +#endif + } + } + + // then the summary service: + if(content.has("ScriptResourceSummary")) + { + LLHTTPClient::get(content["ScriptResourceSummary"], new fetchScriptLimitsRegionSummaryResponder(mInfo)); + } +} + +void fetchScriptLimitsRegionInfoResponder::error(U32 status, const std::string& reason) +{ + llinfos << "Error from responder " << reason << llendl; +} + +void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content) +{ + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(!instance) + { + llinfos << "Failed to get llfloaterscriptlimits instance" << llendl; + } + else + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + panel_memory->setRegionSummary(content); + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + panel_urls->setRegionSummary(content); + } +} + +void fetchScriptLimitsRegionSummaryResponder::error(U32 status, const std::string& reason) +{ + llinfos << "Error from responder " << reason << llendl; +} + +void fetchScriptLimitsRegionDetailsResponder::result(const LLSD& content) +{ + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + + if(!instance) + { + llinfos << "Failed to get llfloaterscriptlimits instance" << llendl; + } + else + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + panel_memory->setRegionDetails(content); + + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + panel_urls->setRegionDetails(content); + } +} + +void fetchScriptLimitsRegionDetailsResponder::error(U32 status, const std::string& reason) +{ + llinfos << "Error from responder " << reason << llendl; +} + +void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content) +{ + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + + if(!instance) + { + llinfos << "Failed to get llfloaterscriptlimits instance" << llendl; + } + else + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsAttachment* panel = (LLPanelScriptLimitsAttachment*)tab->getChild<LLPanel>("script_limits_my_avatar_panel"); + panel->setAttachmentDetails(content); + } +} + +void fetchScriptLimitsAttachmentInfoResponder::error(U32 status, const std::string& reason) +{ + llinfos << "Error from responder " << reason << llendl; +} + +///---------------------------------------------------------------------------- +// Memory Panel +///---------------------------------------------------------------------------- + +BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() +{ + LLSD body; + std::string url = gAgent.getRegion()->getCapability("LandResources"); + if (!url.empty()) + { + body["parcel_id"] = mParcelId; + + LLSD info; + info["parcel_id"] = mParcelId; + LLHTTPClient::post(url, body, new fetchScriptLimitsRegionInfoResponder(info)); + + return TRUE; + } + else + { + return FALSE; + } +} + +void LLPanelScriptLimitsRegionMemory::processParcelInfo(const LLParcelData& parcel_data) +{ + mParcelId = parcel_data.parcel_id; + + if(!getLandScriptResources()) + { + std::string msg_error = LLTrans::getString("ScriptLimitsRequestError"); + childSetValue("loading_text", LLSD(msg_error)); + } + else + { + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); + childSetValue("loading_text", LLSD(msg_waiting)); + } +} + +void LLPanelScriptLimitsRegionMemory::setParcelID(const LLUUID& parcel_id) +{ + if (!parcel_id.isNull()) + { + LLRemoteParcelInfoProcessor::getInstance()->addObserver(parcel_id, this); + LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(parcel_id); + } + else + { + std::string msg_error = LLTrans::getString("ScriptLimitsRequestError"); + childSetValue("loading_text", LLSD(msg_error)); + } +} + +// virtual +void LLPanelScriptLimitsRegionMemory::setErrorStatus(U32 status, const std::string& reason) +{ + llerrs << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<llendl; +} + +void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) +{ + LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); + + S32 number_parcels = content["parcels"].size(); + + LLStringUtil::format_map_t args_parcels; + args_parcels["[PARCELS]"] = llformat ("%d", number_parcels); + std::string msg_parcels = LLTrans::getString("ScriptLimitsParcelsOwned", args_parcels); + childSetValue("parcels_listed", LLSD(msg_parcels)); + + S32 total_objects = 0; + S32 total_size = 0; + + for(S32 i = 0; i < number_parcels; i++) + { + std::string parcel_name = content["parcels"][i]["name"].asString(); + + S32 number_objects = content["parcels"][i]["objects"].size(); + for(S32 j = 0; j < number_objects; j++) + { + S32 size = content["parcels"][i]["objects"][j]["resources"]["memory"].asInteger() / 1024; + total_size += size; + + std::string name_buf = content["parcels"][i]["objects"][j]["name"].asString(); + LLUUID task_id = content["parcels"][i]["objects"][j]["id"].asUUID(); + + LLSD element; + + element["id"] = task_id; + element["columns"][0]["column"] = "size"; + element["columns"][0]["value"] = llformat("%d", size); + element["columns"][0]["font"] = "SANSSERIF"; + element["columns"][1]["column"] = "name"; + element["columns"][1]["value"] = name_buf; + element["columns"][1]["font"] = "SANSSERIF"; + element["columns"][2]["column"] = "owner"; + element["columns"][2]["value"] = ""; + element["columns"][2]["font"] = "SANSSERIF"; + element["columns"][3]["column"] = "location"; + element["columns"][3]["value"] = parcel_name; + element["columns"][3]["font"] = "SANSSERIF"; + + list->addElement(element); + mObjectListIDs.push_back(task_id); + total_objects++; + } + } + + mParcelMemoryUsed =total_size; + mGotParcelMemoryUsed = TRUE; + populateParcelMemoryText(); +} + +void LLPanelScriptLimitsRegionMemory::populateParcelMemoryText() +{ + if(mGotParcelMemoryUsed && mGotParcelMemoryMax) + { +#ifdef USE_SIMPLE_SUMMARY + LLStringUtil::format_map_t args_parcel_memory; + args_parcel_memory["[COUNT]"] = llformat ("%d", mParcelMemoryUsed); + std::string msg_parcel_memory = LLTrans::getString("ScriptLimitsMemoryUsedSimple", args_parcel_memory); + childSetValue("memory_used", LLSD(msg_parcel_memory)); +#else + S32 parcel_memory_available = mParcelMemoryMax - mParcelMemoryUsed; + + LLStringUtil::format_map_t args_parcel_memory; + args_parcel_memory["[COUNT]"] = llformat ("%d", mParcelMemoryUsed); + args_parcel_memory["[MAX]"] = llformat ("%d", mParcelMemoryMax); + args_parcel_memory["[AVAILABLE]"] = llformat ("%d", parcel_memory_available); + std::string msg_parcel_memory = LLTrans::getString("ScriptLimitsMemoryUsed", args_parcel_memory); + childSetValue("memory_used", LLSD(msg_parcel_memory)); +#endif + + childSetValue("loading_text", LLSD(std::string(""))); + } +} + +void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) +{ + if(content["summary"]["available"][0]["type"].asString() == std::string("memory")) + { + mParcelMemoryMax = content["summary"]["available"][0]["amount"].asInteger(); + mGotParcelMemoryMax = TRUE; + } + else if(content["summary"]["available"][1]["type"].asString() == std::string("memory")) + { + mParcelMemoryMax = content["summary"]["available"][1]["amount"].asInteger(); + mGotParcelMemoryMax = TRUE; + } + else + { + llinfos << "summary doesn't contain memory info" << llendl; + return; + } +/* + currently this is broken on the server, so we get this value from the details section + and update via populateParcelMemoryText() when both sets of information have been returned + + when the sim is fixed this should be used instead: + if(content["summary"]["used"][0]["type"].asString() == std::string("memory")) + { + mParcelMemoryUsed = content["summary"]["used"][0]["amount"].asInteger(); + mGotParcelMemoryUsed = TRUE; + } + else if(content["summary"]["used"][1]["type"].asString() == std::string("memory")) + { + mParcelMemoryUsed = content["summary"]["used"][1]["amount"].asInteger(); + mGotParcelMemoryUsed = TRUE; + } + else + { + //ERROR!!! + return; + }*/ + + populateParcelMemoryText(); +} + +BOOL LLPanelScriptLimitsRegionMemory::postBuild() +{ + childSetAction("refresh_list_btn", onClickRefresh, this); + childSetAction("highlight_btn", onClickHighlight, this); + childSetAction("return_btn", onClickReturn, this); + + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); + childSetValue("loading_text", LLSD(msg_waiting)); + + return StartRequestChain(); +} + +BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain() +{ + LLUUID region_id; + + LLFloaterLand* instance = LLFloaterReg::getTypedInstance<LLFloaterLand>("about_land"); + if(!instance) + { + //this isnt really an error... +// llinfos << "Failed to get about land instance" << llendl; +// std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); + childSetValue("loading_text", LLSD(std::string(""))); + //might have to do parent post build here + //if not logic below could use early outs + return FALSE; + } + + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + + LLParcel* parcel = instance->getCurrentSelectedParcel(); + LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + + LLUUID current_region_id = gAgent.getRegion()->getRegionID(); + + if ((region) && (parcel)) + { + LLVector3 parcel_center = parcel->getCenterpoint(); + + region_id = region->getRegionID(); + + if(region_id != current_region_id) + { + std::string msg_wrong_region = LLTrans::getString("ScriptLimitsRequestWrongRegion"); + childSetValue("loading_text", LLSD(msg_wrong_region)); + panel_urls->childSetValue("loading_text", LLSD(msg_wrong_region)); + return FALSE; + } + + LLVector3d pos_global = region->getCenterGlobal(); + + LLSD body; + std::string url = region->getCapability("RemoteParcelRequest"); + if (!url.empty()) + { + body["location"] = ll_sd_from_vector3(parcel_center); + if (!region_id.isNull()) + { + body["region_id"] = region_id; + } + if (!pos_global.isExactlyZero()) + { + U64 region_handle = to_region_handle(pos_global); + body["region_handle"] = ll_sd_from_U64(region_handle); + } + LLHTTPClient::post(url, body, new LLRemoteParcelRequestResponder(getObserverHandle())); + } + else + { + llwarns << "Can't get parcel info for script information request" << region_id + << ". Region: " << region->getName() + << " does not support RemoteParcelRequest" << llendl; + + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); + childSetValue("loading_text", LLSD(msg_waiting)); + panel_urls->childSetValue("loading_text", LLSD(msg_waiting)); + } + } + else + { + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); + childSetValue("loading_text", LLSD(msg_waiting)); + panel_urls->childSetValue("loading_text", LLSD(msg_waiting)); + } + + return LLPanelScriptLimitsInfo::postBuild(); +} + +void LLPanelScriptLimitsRegionMemory::clearList() +{ + LLCtrlListInterface *list = childGetListInterface("scripts_list"); + + if (list) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + } + + mGotParcelMemoryUsed = FALSE; + mGotParcelMemoryMax = FALSE; + + LLStringUtil::format_map_t args_parcel_memory; + std::string msg_empty_string(""); + childSetValue("memory_used", LLSD(msg_empty_string)); + childSetValue("parcels_listed", LLSD(msg_empty_string)); + + mObjectListIDs.clear(); +} + +// static +void LLPanelScriptLimitsRegionMemory::onClickRefresh(void* userdata) +{ + llinfos << "LLPanelRegionGeneralInfo::onClickRefresh" << llendl; + + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + panel_memory->clearList(); + + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + panel_urls->clearList(); + + panel_memory->StartRequestChain(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl; + return; + } +} + +void LLPanelScriptLimitsRegionMemory::showBeacon() +{ +/* LLScrollListCtrl* list = getChild<LLScrollListCtrl>("scripts_list"); + if (!list) return; + + LLScrollListItem* first_selected = list->getFirstSelected(); + if (!first_selected) return; + + std::string name = first_selected->getColumn(1)->getValue().asString(); + std::string pos_string = first_selected->getColumn(3)->getValue().asString(); + + llinfos << ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" <<llendl; + llinfos << "name = " << name << " pos = " << pos_string << llendl; + + F32 x, y, z; + S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z); + if (matched != 3) return; + + LLVector3 pos_agent(x, y, z); + LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent); + llinfos << "name = " << name << " pos = " << pos_string << llendl; + std::string tooltip(""); + LLTracker::trackLocation(pos_global, name, tooltip, LLTracker::LOCATION_ITEM);*/ +} + +// static +void LLPanelScriptLimitsRegionMemory::onClickHighlight(void* userdata) +{ +/* llinfos << "LLPanelRegionGeneralInfo::onClickHighlight" << llendl; + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + panel->showBeacon(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; +// std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); +// panel->childSetValue("loading_text", LLSD(msg_waiting)); + return; + }*/ +} + +void LLPanelScriptLimitsRegionMemory::returnObjects() +{ +/* llinfos << "started" << llendl; + LLMessageSystem *msg = gMessageSystem; + + LLViewerRegion* region = gAgent.getRegion(); + if (!region) return; + + llinfos << "got region" << llendl; + LLCtrlListInterface *list = childGetListInterface("scripts_list"); + if (!list || list->getItemCount() == 0) return; + + llinfos << "got list" << llendl; + std::vector<LLUUID>::iterator id_itor; + + bool start_message = true; + + for (id_itor = mObjectListIDs.begin(); id_itor != mObjectListIDs.end(); ++id_itor) + { + LLUUID task_id = *id_itor; + llinfos << task_id << llendl; + if (!list->isSelected(task_id)) + { + llinfos << "not selected" << llendl; + // Selected only + continue; + } + llinfos << "selected" << llendl; + if (start_message) + { + msg->newMessageFast(_PREHASH_ParcelReturnObjects); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ParcelData); + msg->addS32Fast(_PREHASH_LocalID, -1); // Whole region + msg->addS32Fast(_PREHASH_ReturnType, RT_LIST); + start_message = false; + llinfos << "start message" << llendl; + } + + msg->nextBlockFast(_PREHASH_TaskIDs); + msg->addUUIDFast(_PREHASH_TaskID, task_id); + llinfos << "added id" << llendl; + + if (msg->isSendFullFast(_PREHASH_TaskIDs)) + { + msg->sendReliable(region->getHost()); + start_message = true; + llinfos << "sent 1" << llendl; + } + } + + if (!start_message) + { + msg->sendReliable(region->getHost()); + llinfos << "sent 2" << llendl; + }*/ +} + +// static +void LLPanelScriptLimitsRegionMemory::onClickReturn(void* userdata) +{ +/* llinfos << "LLPanelRegionGeneralInfo::onClickReturn" << llendl; + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + panel->returnObjects(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; +// std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); +// panel->childSetValue("loading_text", LLSD(msg_waiting)); + return; + }*/ +} + +///---------------------------------------------------------------------------- +// URLs Panel +///---------------------------------------------------------------------------- + +void LLPanelScriptLimitsRegionURLs::setRegionDetails(LLSD content) +{ + LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); + + S32 number_parcels = content["parcels"].size(); + + LLStringUtil::format_map_t args_parcels; + args_parcels["[PARCELS]"] = llformat ("%d", number_parcels); + std::string msg_parcels = LLTrans::getString("ScriptLimitsParcelsOwned", args_parcels); + childSetValue("parcels_listed", LLSD(msg_parcels)); + + S32 total_objects = 0; + S32 total_size = 0; + + for(S32 i = 0; i < number_parcels; i++) + { + std::string parcel_name = content["parcels"][i]["name"].asString(); + llinfos << parcel_name << llendl; + + S32 number_objects = content["parcels"][i]["objects"].size(); + for(S32 j = 0; j < number_objects; j++) + { + if(content["parcels"][i]["objects"][j]["resources"].has("urls")) + { + S32 size = content["parcels"][i]["objects"][j]["resources"]["urls"].asInteger(); + total_size += size; + + std::string name_buf = content["parcels"][i]["objects"][j]["name"].asString(); + LLUUID task_id = content["parcels"][i]["objects"][j]["id"].asUUID(); + + LLSD element; + + element["id"] = task_id; + element["columns"][0]["column"] = "urls"; + element["columns"][0]["value"] = llformat("%d", size); + element["columns"][0]["font"] = "SANSSERIF"; + element["columns"][1]["column"] = "name"; + element["columns"][1]["value"] = name_buf; + element["columns"][1]["font"] = "SANSSERIF"; + element["columns"][2]["column"] = "owner"; + element["columns"][2]["value"] = ""; + element["columns"][2]["font"] = "SANSSERIF"; + element["columns"][3]["column"] = "location"; + element["columns"][3]["value"] = parcel_name; + element["columns"][3]["font"] = "SANSSERIF"; + + list->addElement(element); + mObjectListIDs.push_back(task_id); + total_objects++; + } + } + } + + mParcelURLsUsed =total_size; + mGotParcelURLsUsed = TRUE; + populateParcelURLsText(); +} + +void LLPanelScriptLimitsRegionURLs::populateParcelURLsText() +{ + if(mGotParcelURLsUsed && mGotParcelURLsMax) + { + +#ifdef USE_SIMPLE_SUMMARY + LLStringUtil::format_map_t args_parcel_urls; + args_parcel_urls["[COUNT]"] = llformat ("%d", mParcelURLsUsed); + std::string msg_parcel_urls = LLTrans::getString("ScriptLimitsURLsUsedSimple", args_parcel_urls); + childSetValue("urls_used", LLSD(msg_parcel_urls)); +#else + S32 parcel_urls_available = mParcelURLsMax - mParcelURLsUsed; + + LLStringUtil::format_map_t args_parcel_urls; + args_parcel_urls["[COUNT]"] = llformat ("%d", mParcelURLsUsed); + args_parcel_urls["[MAX]"] = llformat ("%d", mParcelURLsMax); + args_parcel_urls["[AVAILABLE]"] = llformat ("%d", parcel_urls_available); + std::string msg_parcel_urls = LLTrans::getString("ScriptLimitsURLsUsed", args_parcel_urls); + childSetValue("urls_used", LLSD(msg_parcel_urls)); +#endif + + childSetValue("loading_text", LLSD(std::string(""))); + + } +} + +void LLPanelScriptLimitsRegionURLs::setRegionSummary(LLSD content) +{ + if(content["summary"]["available"][0]["type"].asString() == std::string("urls")) + { + mParcelURLsMax = content["summary"]["available"][0]["amount"].asInteger(); + mGotParcelURLsMax = TRUE; + } + else if(content["summary"]["available"][1]["type"].asString() == std::string("urls")) + { + mParcelURLsMax = content["summary"]["available"][1]["amount"].asInteger(); + mGotParcelURLsMax = TRUE; + } + else + { + llinfos << "summary contains no url info" << llendl; + return; + } +/* + currently this is broken on the server, so we get this value from the details section + and update via populateParcelMemoryText() when both sets of information have been returned + + when the sim is fixed this should be used instead: + if(content["summary"]["used"][0]["type"].asString() == std::string("urls")) + { + mParcelURLsUsed = content["summary"]["used"][0]["amount"].asInteger(); + mGotParcelURLsUsed = TRUE; + } + else if(content["summary"]["used"][1]["type"].asString() == std::string("urls")) + { + mParcelURLsUsed = content["summary"]["used"][1]["amount"].asInteger(); + mGotParcelURLsUsed = TRUE; + } + else + { + //ERROR!!! + return; + }*/ + + populateParcelURLsText(); +} + +BOOL LLPanelScriptLimitsRegionURLs::postBuild() +{ + childSetAction("refresh_list_btn", onClickRefresh, this); + childSetAction("highlight_btn", onClickHighlight, this); + childSetAction("return_btn", onClickReturn, this); + + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); + childSetValue("loading_text", LLSD(msg_waiting)); + return FALSE; +} + +void LLPanelScriptLimitsRegionURLs::clearList() +{ + LLCtrlListInterface *list = childGetListInterface("scripts_list"); + + if (list) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + } + + mGotParcelURLsUsed = FALSE; + mGotParcelURLsMax = FALSE; + + LLStringUtil::format_map_t args_parcel_urls; + std::string msg_empty_string(""); + childSetValue("urls_used", LLSD(msg_empty_string)); + childSetValue("parcels_listed", LLSD(msg_empty_string)); + + mObjectListIDs.clear(); +} + +// static +void LLPanelScriptLimitsRegionURLs::onClickRefresh(void* userdata) +{ + llinfos << "Refresh clicked" << llendl; + + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel_memory = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + // use the memory panel to re-request all the info + panel_memory->clearList(); + + LLPanelScriptLimitsRegionURLs* panel_urls = (LLPanelScriptLimitsRegionURLs*)tab->getChild<LLPanel>("script_limits_region_urls_panel"); + // but the urls panel to clear itself + panel_urls->clearList(); + + panel_memory->StartRequestChain(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl; + return; + } +} + +// static +void LLPanelScriptLimitsRegionURLs::onClickHighlight(void* userdata) +{ +/* llinfos << "Highlight clicked" << llendl; + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + // use the beacon function from the memory panel + panel->showBeacon(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; +// std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); +// panel->childSetValue("loading_text", LLSD(msg_waiting)); + return; + }*/ +} + +// static +void LLPanelScriptLimitsRegionURLs::onClickReturn(void* userdata) +{ +/* llinfos << "Return clicked" << llendl; + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsRegionMemory* panel = (LLPanelScriptLimitsRegionMemory*)tab->getChild<LLPanel>("script_limits_region_memory_panel"); + // use the return function from the memory panel + panel->returnObjects(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; +// std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); +// panel->childSetValue("loading_text", LLSD(msg_waiting)); + return; + }*/ +} + +///---------------------------------------------------------------------------- +// Attachment Panel +///---------------------------------------------------------------------------- + +BOOL LLPanelScriptLimitsAttachment::requestAttachmentDetails() +{ + LLSD body; + std::string url = gAgent.getRegion()->getCapability("AttachmentResources"); + if (!url.empty()) + { + LLHTTPClient::get(url, body, new fetchScriptLimitsAttachmentInfoResponder()); + return TRUE; + } + else + { + return FALSE; + } +} + +void LLPanelScriptLimitsAttachment::setAttachmentDetails(LLSD content) +{ + LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); + S32 number_attachments = content["attachments"].size(); + + for(int i = 0; i < number_attachments; i++) + { + std::string humanReadableLocation = ""; + if(content["attachments"][i].has("location")) + { + std::string actualLocation = content["attachments"][i]["location"]; + humanReadableLocation = LLTrans::getString(actualLocation.c_str()); + } + + S32 number_objects = content["attachments"][i]["objects"].size(); + for(int j = 0; j < number_objects; j++) + { + LLUUID task_id = content["attachments"][i]["objects"][j]["id"].asUUID(); + S32 size = 0; + if(content["attachments"][i]["objects"][j]["resources"].has("memory")) + { + size = content["attachments"][i]["objects"][j]["resources"]["memory"].asInteger(); + } + S32 urls = 0; + if(content["attachments"][i]["objects"][j]["resources"].has("urls")) + { + urls = content["attachments"][i]["objects"][j]["resources"]["urls"].asInteger(); + } + std::string name = content["attachments"][i]["objects"][j]["name"].asString(); + + LLSD element; + + element["id"] = task_id; + element["columns"][0]["column"] = "size"; + element["columns"][0]["value"] = llformat("%d", size); + element["columns"][0]["font"] = "SANSSERIF"; + + element["columns"][1]["column"] = "urls"; + element["columns"][1]["value"] = llformat("%d", urls); + element["columns"][1]["font"] = "SANSSERIF"; + + element["columns"][2]["column"] = "name"; + element["columns"][2]["value"] = name; + element["columns"][2]["font"] = "SANSSERIF"; + + element["columns"][3]["column"] = "location"; + element["columns"][3]["value"] = humanReadableLocation; + element["columns"][3]["font"] = "SANSSERIF"; + + list->addElement(element); + } + } + + childSetValue("loading_text", LLSD(std::string(""))); +} + +BOOL LLPanelScriptLimitsAttachment::postBuild() +{ + childSetAction("refresh_list_btn", onClickRefresh, this); + + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); + childSetValue("loading_text", LLSD(msg_waiting)); + return requestAttachmentDetails(); +} + +void LLPanelScriptLimitsAttachment::clearList() +{ + LLCtrlListInterface *list = childGetListInterface("scripts_list"); + + if (list) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + } + + std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); + childSetValue("loading_text", LLSD(msg_waiting)); +} + +// static +void LLPanelScriptLimitsAttachment::onClickRefresh(void* userdata) +{ + llinfos << "Refresh clicked" << llendl; + + LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance<LLFloaterScriptLimits>("script_limits"); + if(instance) + { + LLTabContainer* tab = instance->getChild<LLTabContainer>("scriptlimits_panels"); + LLPanelScriptLimitsAttachment* panel_attachments = (LLPanelScriptLimitsAttachment*)tab->getChild<LLPanel>("script_limits_my_avatar_panel"); + panel_attachments->clearList(); + panel_attachments->requestAttachmentDetails(); + return; + } + else + { + llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl; + return; + } +} diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h new file mode 100644 index 0000000000..88239136e3 --- /dev/null +++ b/indra/newview/llfloaterscriptlimits.h @@ -0,0 +1,259 @@ +/** + * @file llfloaterscriptlimits.h + * @author Gabriel Lee + * @brief Declaration of the region info and controls floater and panels. + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERSCRIPTLIMITS_H +#define LL_LLFLOATERSCRIPTLIMITS_H + +#include <vector> +#include "llfloater.h" +#include "llhost.h" +#include "llpanel.h" +#include "llremoteparcelrequest.h" + +class LLPanelScriptLimitsInfo; +class LLTabContainer; + +class LLPanelScriptLimitsRegionMemory; + +class LLFloaterScriptLimits : public LLFloater +{ + friend class LLFloaterReg; +public: + + /*virtual*/ BOOL postBuild(); + + // from LLPanel + virtual void refresh(); + +private: + + LLFloaterScriptLimits(const LLSD& seed); + ~LLFloaterScriptLimits(); + +protected: + + LLTabContainer* mTab; + typedef std::vector<LLPanelScriptLimitsInfo*> info_panels_t; + info_panels_t mInfoPanels; +}; + + +// Base class for all script limits information panels. +class LLPanelScriptLimitsInfo : public LLPanel +{ +public: + LLPanelScriptLimitsInfo(); + + virtual BOOL postBuild(); + virtual void updateChild(LLUICtrl* child_ctrl); + +protected: + void initCtrl(const std::string& name); + + typedef std::vector<std::string> strings_t; + + LLHost mHost; +}; + +///////////////////////////////////////////////////////////////////////////// +// Responders +///////////////////////////////////////////////////////////////////////////// + +class fetchScriptLimitsRegionInfoResponder: public LLHTTPClient::Responder +{ + public: + fetchScriptLimitsRegionInfoResponder(const LLSD& info) : mInfo(info) {}; + + void result(const LLSD& content); + void error(U32 status, const std::string& reason); + public: + protected: + LLSD mInfo; +}; + +class fetchScriptLimitsRegionSummaryResponder: public LLHTTPClient::Responder +{ + public: + fetchScriptLimitsRegionSummaryResponder(const LLSD& info) : mInfo(info) {}; + + void result(const LLSD& content); + void error(U32 status, const std::string& reason); + public: + protected: + LLSD mInfo; +}; + +class fetchScriptLimitsRegionDetailsResponder: public LLHTTPClient::Responder +{ + public: + fetchScriptLimitsRegionDetailsResponder(const LLSD& info) : mInfo(info) {}; + + void result(const LLSD& content); + void error(U32 status, const std::string& reason); + public: + protected: + LLSD mInfo; +}; + +class fetchScriptLimitsAttachmentInfoResponder: public LLHTTPClient::Responder +{ + public: + fetchScriptLimitsAttachmentInfoResponder() {}; + + void result(const LLSD& content); + void error(U32 status, const std::string& reason); + public: + protected: +}; + +///////////////////////////////////////////////////////////////////////////// +// Memory panel +///////////////////////////////////////////////////////////////////////////// + +class LLPanelScriptLimitsRegionMemory : public LLPanelScriptLimitsInfo, LLRemoteParcelInfoObserver +{ + +public: + LLPanelScriptLimitsRegionMemory() + : LLPanelScriptLimitsInfo(), LLRemoteParcelInfoObserver(), mParcelId(LLUUID()), mGotParcelMemoryUsed(FALSE), mGotParcelMemoryMax(FALSE) {}; + ~LLPanelScriptLimitsRegionMemory() + { + LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this); + }; + + // LLPanel + virtual BOOL postBuild(); + + void setRegionDetails(LLSD content); + void setRegionSummary(LLSD content); + + BOOL StartRequestChain(); + + void populateParcelMemoryText(); + BOOL getLandScriptResources(); + void clearList(); + void showBeacon(); + void returnObjects(); + +private: + + LLUUID mParcelId; + BOOL mGotParcelMemoryUsed; + BOOL mGotParcelMemoryMax; + S32 mParcelMemoryMax; + S32 mParcelMemoryUsed; + + std::vector<LLUUID> mObjectListIDs; + +protected: + +// LLRemoteParcelInfoObserver interface: +/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); +/*virtual*/ void setParcelID(const LLUUID& parcel_id); +/*virtual*/ void setErrorStatus(U32 status, const std::string& reason); + + static void onClickRefresh(void* userdata); + static void onClickHighlight(void* userdata); + static void onClickReturn(void* userdata); +}; + +///////////////////////////////////////////////////////////////////////////// +// URLs panel +///////////////////////////////////////////////////////////////////////////// + +class LLPanelScriptLimitsRegionURLs : public LLPanelScriptLimitsInfo +{ + +public: + LLPanelScriptLimitsRegionURLs() + : LLPanelScriptLimitsInfo(), mParcelId(LLUUID()), mGotParcelURLsUsed(FALSE), mGotParcelURLsMax(FALSE) {}; + ~LLPanelScriptLimitsRegionURLs() + { + }; + + // LLPanel + virtual BOOL postBuild(); + + void setRegionDetails(LLSD content); + void setRegionSummary(LLSD content); + + void populateParcelURLsText(); + void clearList(); + +private: + + LLUUID mParcelId; + BOOL mGotParcelURLsUsed; + BOOL mGotParcelURLsMax; + S32 mParcelURLsMax; + S32 mParcelURLsUsed; + + std::vector<LLUUID> mObjectListIDs; + +protected: + + static void onClickRefresh(void* userdata); + static void onClickHighlight(void* userdata); + static void onClickReturn(void* userdata); +}; + +///////////////////////////////////////////////////////////////////////////// +// Attachment panel +///////////////////////////////////////////////////////////////////////////// + +class LLPanelScriptLimitsAttachment : public LLPanelScriptLimitsInfo +{ + +public: + LLPanelScriptLimitsAttachment() + : LLPanelScriptLimitsInfo() {}; + ~LLPanelScriptLimitsAttachment() + { + }; + + // LLPanel + virtual BOOL postBuild(); + + void setAttachmentDetails(LLSD content); + + BOOL requestAttachmentDetails(); + void clearList(); + +private: + +protected: + + static void onClickRefresh(void* userdata); +}; + +#endif diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index c658963708..595d84f9f0 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,8 @@ #include "lluri.h" #include "llagent.h" #include "llui.h" +#include "llviewercontrol.h" +#include "llweb.h" LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), @@ -65,7 +67,6 @@ BOOL LLFloaterSearch::postBuild() { mBrowser->addObserver(this); mBrowser->setTrusted(true); - mBrowser->setHomePageUrl(getString("search_url")); } return TRUE; @@ -113,33 +114,32 @@ void LLFloaterSearch::search(const LLSD &key) childHide("refresh_search"); mSearchGodLevel = gAgent.getGodLevel(); - // get the URL for the search page - std::string url = getString("search_url"); - if (! LLStringUtil::endsWith(url, "/")) - { - url += "/"; - } - // work out the subdir to use based on the requested category + LLSD subs; std::string category = key.has("category") ? key["category"].asString() : ""; if (mCategoryPaths.has(category)) { - url += mCategoryPaths[category].asString(); + subs["CATEGORY"] = mCategoryPaths[category].asString(); } else { - url += mCategoryPaths["all"].asString(); + subs["CATEGORY"] = mCategoryPaths["all"].asString(); } - // append the search query string + // add the search query string std::string search_text = key.has("id") ? key["id"].asString() : ""; - url += std::string("?q=") + LLURI::escape(search_text); + subs["QUERY"] = LLURI::escape(search_text); - // append the permissions token that login.cgi gave us + // add the permissions token that login.cgi gave us + // We use "search_token", and fallback to "auth_token" if not present. LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - url += "&p=" + search_token.asString(); + if (search_token.asString().empty()) + { + search_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + subs["AUTH_TOKEN"] = search_token.asString(); - // also append the user's preferred maturity (can be changed via prefs) + // add the user's preferred maturity (can be changed via prefs) std::string maturity; if (gAgent.prefersAdult()) { @@ -153,14 +153,15 @@ void LLFloaterSearch::search(const LLSD &key) { maturity = "13"; // PG } - url += "&r=" + maturity; - - // add the current localization information - url += "&lang=" + LLUI::getLanguage(); + subs["MATURITY"] = maturity; // add the user's god status - std::string godlike = gAgent.isGodlike() ? "1" : "0"; - url += "&g=" + godlike; + subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; + + // get the search URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string url = gSavedSettings.getString("SearchURL"); + url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view mBrowser->navigateTo(url); diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 49e8f9c956..e5260aa7b9 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -39,7 +39,6 @@ #include "lllineeditor.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llparcel.h" #include "llselectmgr.h" #include "lltexturectrl.h" diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index 9841cd2796..816181643f 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -84,17 +84,6 @@ void LLFloaterTelehub::onOpen(const LLSD& key) LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); - // Find tools floater, glue to bottom - if (gFloaterTools) - { - LLRect tools_rect = gFloaterTools->getRect(); - S32 our_width = getRect().getWidth(); - S32 our_height = getRect().getHeight(); - LLRect our_rect; - our_rect.setLeftTopAndSize(tools_rect.mLeft, tools_rect.mBottom, our_width, our_height); - setRect(our_rect); - } - sendTelehubInfoRequest(); mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7fb71d4d4f..babef5b63d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -93,7 +93,7 @@ // Globals LLFloaterTools *gFloaterTools = NULL; - +bool LLFloaterTools::sShowObjectCost = true; const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = { @@ -286,6 +286,8 @@ BOOL LLFloaterTools::postBuild() mStatusText["grab"] = getString("status_grab"); mStatusText["place"] = getString("status_place"); mStatusText["selectland"] = getString("status_selectland"); + + sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); return TRUE; } @@ -425,16 +427,19 @@ void LLFloaterTools::refresh() childSetTextArg("prim_count", "[COUNT]", prim_count_string); // calculate selection rendering cost - std::string prim_cost_string; - LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); - childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + if (sShowObjectCost) + { + std::string prim_cost_string; + LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); + childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + } // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); childSetEnabled("obj_count", have_selection); childSetEnabled("prim_count", have_selection); - childSetEnabled("RenderingCost", have_selection); + childSetEnabled("RenderingCost", have_selection && sShowObjectCost); // Refresh child tabs mPanelPermissions->refresh(); @@ -566,7 +571,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); - childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); if (mCheckSelectIndividual) { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 05a88a31d3..e1f3c9b78c 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -46,7 +46,6 @@ class LLPanelVolume; class LLPanelContents; class LLPanelFace; class LLPanelLandInfo; -class LLRadioCtrl; class LLRadioGroup; class LLSlider; class LLTabContainer; @@ -196,6 +195,9 @@ private: protected: LLSD mMediaSettings; + +public: + static bool sShowObjectCost; }; diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 86992d6a31..c930e99bad 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -162,7 +162,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("objects_list"); - + S32 block_count = msg->getNumberOfBlocks("ReportData"); for (S32 block = 0; block < block_count; ++block) { @@ -432,7 +432,6 @@ void LLFloaterTopObjects::onRefresh() filter = mFilter; clearList(); - LLMessageSystem *msg = gMessageSystem; msg->newMessageFast(_PREHASH_LandStatRequest); msg->nextBlockFast(_PREHASH_AgentData); @@ -465,7 +464,7 @@ void LLFloaterTopObjects::onGetByOwnerName() } void LLFloaterTopObjects::showBeacon() -{ +{ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list"); if (!list) return; diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp index 3b9321a876..4b67cbb308 100644 --- a/indra/newview/llfloaterurldisplay.cpp +++ b/indra/newview/llfloaterurldisplay.cpp @@ -33,13 +33,14 @@ #include "llviewerprecompiledheaders.h" +#include "llregionhandle.h" +#include "v3dmath.h" + #include "llfloaterurldisplay.h" #include "llpanelplace.h" #include "lluictrlfactory.h" -#include "v3dmath.h" - //////////////////////////////////////////////////////////////////////////// // LLFloaterURLDisplay diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 5e769feea6..91d0f0e370 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "llhttpclient.h" + #include "llfloaterurlentry.h" #include "llpanellandmedia.h" diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 3951f4291f..43024a4bd0 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -40,6 +40,7 @@ #include "llcombobox.h" #include "llfocusmgr.h" #include "lliconctrl.h" +#include "llsliderctrl.h" #include "llviewercontrol.h" #include "llvoiceclient.h" #include "llvoicechannel.h" @@ -60,6 +61,9 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); mDevicesUpdated = FALSE; + // grab "live" mic volume level + mMicVolume = gSavedSettings.getF32("AudioLevelMic"); + // ask for new device enumeration // now do this in onOpen() instead... //gVoiceClient->refreshDeviceLists(); @@ -71,6 +75,10 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() BOOL LLPanelVoiceDeviceSettings::postBuild() { + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + // set mic volume tuning slider based on last mic volume setting + volume_slider->setValue(mMicVolume); + childSetCommitCallback("voice_input_device", onCommitInputDevice, this); childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); @@ -149,6 +157,15 @@ void LLPanelVoiceDeviceSettings::apply() gSavedSettings.setString("VoiceOutputAudioDevice", s); mOutputDevice = s; } + + // assume we are being destroyed by closing our embedding window + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + if(volume_slider) + { + F32 slider_value = (F32)volume_slider->getValue().asReal(); + gSavedSettings.setF32("AudioLevelMic", slider_value); + mMicVolume = slider_value; + } } void LLPanelVoiceDeviceSettings::cancel() @@ -161,12 +178,22 @@ void LLPanelVoiceDeviceSettings::cancel() if(mCtrlOutputDevices) mCtrlOutputDevices->setSimple(mOutputDevice); + + gSavedSettings.setF32("AudioLevelMic", mMicVolume); + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + if(volume_slider) + { + volume_slider->setValue(mMicVolume); + } } void LLPanelVoiceDeviceSettings::refresh() { - // update the live input level display - gVoiceClient->tuningSetMicVolume(); + //grab current volume + LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); + // set mic volume tuning slider based on last mic volume setting + F32 current_volume = (F32)volume_slider->getValue().asReal(); + gVoiceClient->tuningSetMicVolume(current_volume); // Fill in popup menus mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); @@ -236,6 +263,7 @@ void LLPanelVoiceDeviceSettings::initialize() { mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + mMicVolume = gSavedSettings.getF32("AudioLevelMic"); mDevicesUpdated = FALSE; // ask for new device enumeration diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h index 20958af780..d67283d0a2 100644 --- a/indra/newview/llfloatervoicedevicesettings.h +++ b/indra/newview/llfloatervoicedevicesettings.h @@ -56,6 +56,7 @@ protected: static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); + F32 mMicVolume; std::string mInputDevice; std::string mOutputDevice; class LLComboBox *mCtrlInputDevices; diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 04dbd38153..705c8afd00 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -82,6 +82,7 @@ void LLFloaterWhiteListEntry::onBtnOK( void* userdata ) std::string white_list_item = self->mWhiteListEdit->getText(); panel->addWhiteListEntry( white_list_item ); + panel->updateWhitelistEnableStatus(); }; self->closeFloater(); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 7ca491a698..98f9171237 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -74,8 +74,8 @@ #include "llmapimagetype.h" #include "llweb.h" #include "llslider.h" +#include "message.h" -#include "llglheaders.h" #include "llwindow.h" // copyTextToClipboard() //--------------------------------------------------------------------------- diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 1c5d7ae9b9..8b05f8614d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -331,6 +331,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) { mFolders.insert(mFolders.begin(), folder); } + folder->setShowLoadStatus(true); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); @@ -411,7 +412,12 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders? (folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter } - if (folderp->getVisible()) + + // Need to call arrange regardless of visibility, since children's visibility + // might need to be changed too (e.g. even though a folder is invisible, its + // children also need to be set invisible for state-tracking purposes, e.g. + // llfolderviewitem::filter). + // if (folderp->getVisible()) { S32 child_height = 0; S32 child_width = 0; @@ -479,13 +485,13 @@ void LLFolderView::filter( LLInventoryFilter& filter ) if (getCompletedFilterGeneration() < filter.getCurrentGeneration()) { - mFiltered = FALSE; + mPassedFilter = FALSE; mMinWidth = 0; LLFolderViewFolder::filter(filter); } else { - mFiltered = TRUE; + mPassedFilter = TRUE; } } @@ -743,6 +749,12 @@ void LLFolderView::sanitizeSelection() } } } + + // Don't allow invisible items (such as root folders) to be selected. + if (item->getDontShowInHierarchy()) + { + items_to_remove.push_back(item); + } } std::vector<LLFolderViewItem*>::iterator item_it; @@ -762,7 +774,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible()) + if (parent_folder->potentiallyVisible() && !parent_folder->getDontShowInHierarchy()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -783,6 +795,11 @@ void LLFolderView::sanitizeSelection() { // nothing selected to start with, so pick "My Inventory" as best guess new_selection = getItemByID(gInventory.getRootFolderID()); + // ... except if it's hidden from the UI. + if (new_selection && new_selection->getDontShowInHierarchy()) + { + new_selection = NULL; + } } if (new_selection) @@ -1934,6 +1951,26 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id) return NULL; } +LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id) +{ + if (id.isNull()) + { + return this; + } + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end(); + ++iter) + { + LLFolderViewFolder *folder = (*iter); + if (folder->getListener()->getUUID() == id) + { + return folder; + } + } + return NULL; +} + bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) { std::string action = userdata.asString(); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index d18ba385d8..2598af4df4 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -248,6 +248,7 @@ public: void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void removeItemID(const LLUUID& id); LLFolderViewItem* getItemByID(const LLUUID& id); + LLFolderViewFolder* getFolderByID(const LLUUID& id); bool doToSelected(LLInventoryModel* model, const LLSD& userdata); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index fe793fbcb8..bfd9d6dca7 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -122,7 +122,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mHasVisibleChildren(FALSE), mIndentation(0), mNumDescendantsSelected(0), - mFiltered(FALSE), + mPassedFilter(FALSE), mLastFilterGeneration(-1), mStringMatchOffset(std::string::npos), mControlLabelRotation(0.f), @@ -136,7 +136,8 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mListener(p.listener), mArrowImage(p.folder_arrow_image), mBoxImage(p.selection_image), - mDontShowInHierarchy(false) + mDontShowInHierarchy(false), + mShowLoadStatus(false) { refresh(); } @@ -198,7 +199,9 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) } LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); - while(itemp && !itemp->getVisible()) + + // Skip over items that are invisible or are hidden from the UI. + while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) @@ -224,17 +227,17 @@ BOOL LLFolderViewItem::potentiallyVisible() BOOL LLFolderViewItem::getFiltered() { - return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); + return mPassedFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); } BOOL LLFolderViewItem::getFiltered(S32 filter_generation) { - return mFiltered && mLastFilterGeneration >= filter_generation; + return mPassedFilter && mLastFilterGeneration >= filter_generation; } void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation) { - mFiltered = filtered; + mPassedFilter = filtered; mLastFilterGeneration = filter_generation; } @@ -424,19 +427,20 @@ S32 LLFolderViewItem::getItemHeight() void LLFolderViewItem::filter( LLInventoryFilter& filter) { - BOOL filtered = mListener && filter.check(this); + const BOOL previous_passed_filter = mPassedFilter; + const BOOL passed_filter = mListener && filter.check(this); - // if our visibility will change as a result of this filter, then + // If our visibility will change as a result of this filter, then // we need to be rearranged in our parent folder - if (getVisible() != filtered) + if (mParentFolder) { - if (mParentFolder) - { + if (getVisible() != passed_filter) + mParentFolder->requestArrange(); + if (passed_filter != previous_passed_filter) mParentFolder->requestArrange(); - } } - setFiltered(filtered, filter.getCurrentGeneration()); + setFiltered(passed_filter, filter.getCurrentGeneration()); mStringMatchOffset = filter.getStringMatchOffset(); filter.decrementFilterCount(); @@ -965,18 +969,18 @@ void LLFolderViewItem::draw() } - if ( mIsLoading - && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") ) - { - font->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); - text_left = right_x; - } - font->renderUTF8( mLabel, 0, text_left, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) + || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) + { + std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; + font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); + } + if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, @@ -1243,7 +1247,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) if (getLastFilterGeneration() < filter_generation) { if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter - !mFiltered) // and did not pass the filter + !mPassedFilter) // and did not pass the filter { // go ahead and flag this folder as done mLastFilterGeneration = filter_generation; @@ -1381,7 +1385,7 @@ void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation) { // if this folder is now filtered, but wasn't before // (it just passed) - if (filtered && !mFiltered) + if (filtered && !mPassedFilter) { // reset current height, because last time we drew it // it might have had more visible items than now diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 43a5fd8de5..a43096dcb2 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -121,6 +121,9 @@ public: static const F32 FOLDER_CLOSE_TIME_CONSTANT; static const F32 FOLDER_OPEN_TIME_CONSTANT; + // Mostly for debugging printout purposes. + const std::string& getSearchableLabel() { return mSearchableLabel; } + protected: friend class LLUICtrlFactory; friend class LLFolderViewEventListener; @@ -149,7 +152,7 @@ protected: BOOL mHasVisibleChildren; S32 mIndentation; S32 mNumDescendantsSelected; - BOOL mFiltered; + BOOL mPassedFilter; S32 mLastFilterGeneration; std::string::size_type mStringMatchOffset; F32 mControlLabelRotation; @@ -157,9 +160,10 @@ protected: BOOL mDragAndDropTarget; LLUIImagePtr mArrowImage; LLUIImagePtr mBoxImage; - BOOL mIsLoading; - LLTimer mTimeSinceRequestStart; + BOOL mIsLoading; + LLTimer mTimeSinceRequestStart; bool mDontShowInHierarchy; + bool mShowLoadStatus; // helper function to change the selection from the root. void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected); @@ -203,7 +207,7 @@ public: virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); virtual S32 getItemHeight(); void setDontShowInHierarchy(bool dont_show) { mDontShowInHierarchy = dont_show; } - bool getDontShowInHierarchy() { return mDontShowInHierarchy; } + bool getDontShowInHierarchy() const { return mDontShowInHierarchy; } // applies filters to control visibility of inventory items virtual void filter( LLInventoryFilter& filter); @@ -251,6 +255,8 @@ public: BOOL getIsCurSelection() { return mIsCurSelection; } BOOL hasVisibleChildren() { return mHasVisibleChildren; } + + void setShowLoadStatus(bool status) { mShowLoadStatus = status; } // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. @@ -332,7 +338,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); - private: +private: static std::map<U8, LLFontGL*> sFonts; // map of styles to fonts }; diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 4f487ddf04..df7aa9eabf 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -52,7 +52,6 @@ #include "llagent.h" #include "lldelayedgestureerror.h" #include "llinventorymodel.h" -#include "llnotify.h" #include "llviewermessage.h" #include "llvoavatarself.h" #include "llviewerstats.h" diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index fdb2b886a6..ff75d461df 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -35,6 +35,8 @@ #include "llgroupactions.h" +#include "message.h" + #include "llagent.h" #include "llcommandhandler.h" #include "llfloaterreg.h" @@ -197,12 +199,12 @@ void LLGroupActions::activate(const LLUUID& group_id) gAgent.sendReliableMessage(); } -bool isGroupUIVisible() +static bool isGroupUIVisible() { LLPanel* panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray"); if(!panel) return false; - return panel->getVisible(); + return panel->isInVisibleChain(); } // static diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 80b706a215..ab9db10f38 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -225,6 +225,11 @@ mGroupID(LLUUID::null) } } +LLGroupListItem::~LLGroupListItem() +{ + LLGroupMgr::getInstance()->removeObserver(this); +} + //virtual BOOL LLGroupListItem::postBuild() { @@ -277,8 +282,13 @@ void LLGroupListItem::setName(const std::string& name, const std::string& highli void LLGroupListItem::setGroupID(const LLUUID& group_id) { + LLGroupMgr::getInstance()->removeObserver(this); + + mID = group_id; mGroupID = group_id; setActive(group_id == gAgent.getGroupID()); + + LLGroupMgr::getInstance()->addObserver(this); } void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id) @@ -337,4 +347,11 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } +void LLGroupListItem::changed(LLGroupChange gc) +{ + LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID); + if(group_data) + setGroupIconID(group_data->mInsigniaID); +} + //EOF diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 41b4d01711..33cfe005b9 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -38,6 +38,7 @@ #include "llpanel.h" #include "llpointer.h" #include "llstyle.h" +#include "llgroupmgr.h" /** * Auto-updating list of agent groups. @@ -80,9 +81,11 @@ class LLIconCtrl; class LLTextBox; class LLGroupListItem : public LLPanel + , public LLGroupMgrObserver { public: LLGroupListItem(); + ~LLGroupListItem(); /*virtual*/ BOOL postBuild(); /*virtual*/ void setValue(const LLSD& value); void onMouseEnter(S32 x, S32 y, MASK mask); @@ -96,6 +99,7 @@ public: void setGroupIconID(const LLUUID& group_icon_id); void setGroupIconVisible(bool visible); + virtual void changed(LLGroupChange gc); private: void setActive(bool active); void onInfoBtnClick(); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index ebb5feb2bf..af58e81ca4 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -758,7 +758,8 @@ void LLGroupMgr::clearGroupData(const LLUUID& group_id) void LLGroupMgr::addObserver(LLGroupMgrObserver* observer) { - mObservers.insert(std::pair<LLUUID, LLGroupMgrObserver*>(observer->getID(), observer)); + if( observer->getID() != LLUUID::null ) + mObservers.insert(std::pair<LLUUID, LLGroupMgrObserver*>(observer->getID(), observer)); } void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer) diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index a0604be57e..487fdd4c5b 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -45,6 +45,7 @@ class LLGroupMgrObserver { public: LLGroupMgrObserver(const LLUUID& id) : mID(id){}; + LLGroupMgrObserver() : mID(LLUUID::null){}; virtual ~LLGroupMgrObserver(){}; virtual void changed(LLGroupChange gc) = 0; const LLUUID& getID() { return mID; } diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 47a168e354..acaa6076f8 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -49,6 +49,7 @@ #include "lllogchat.h" #include "llpanelimcontrolpanel.h" #include "llscreenchannel.h" +#include "llsyswellwindow.h" #include "lltrans.h" #include "llchathistory.h" #include "llviewerwindow.h" @@ -122,9 +123,13 @@ void LLIMFloater::onFocusReceived() void LLIMFloater::onClose(bool app_quitting) { setTyping(false); - // SJB: We want the close button to hide the session window, not end it - // *NOTE: Yhis is functional, but not ideal - it's still closing the floater; we really want to change the behavior of the X button instead. - //gIMMgr->leaveSession(mSessionID); + + // The source of much argument and design thrashing + // Should the window hide or the session close when the X is clicked? + // + // Last change: + // EXT-3516 X Button should end IM session, _ button should hide + gIMMgr->leaveSession(mSessionID); } /* static */ @@ -339,6 +344,29 @@ void LLIMFloater::onSlide() //static LLIMFloater* LLIMFloater::show(const LLUUID& session_id) { + if (!gIMMgr->hasSession(session_id)) return NULL; + + // we should make sure all related chiclets are in place when the session is a voice call + // chiclets come firts, then comes IM window + if (gIMMgr->isVoiceCall(session_id)) + { + LLIMModel* im_model = LLIMModel::getInstance(); + LLBottomTray* b_tray = LLBottomTray::getInstance(); + + //*TODO hide that into Bottom tray + if (!b_tray->getChicletPanel()->findChiclet<LLChiclet>(session_id)) + { + LLIMChiclet* chiclet = b_tray->createIMChiclet(session_id); + if(chiclet) + { + chiclet->setIMSessionName(im_model->getName(session_id)); + chiclet->setOtherParticipantId(im_model->getOtherParticipantID(session_id)); + } + } + + LLIMWellWindow::getInstance()->addIMRow(session_id); + } + bool not_existed = true; if(isChatMultiTab()) @@ -469,7 +497,7 @@ bool LLIMFloater::toggle(const LLUUID& session_id) if(!isChatMultiTab()) { LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (floater && floater->getVisible() && floater->isDocked()) + if (floater && floater->getVisible()) { // clicking on chiclet to close floater just hides it to maintain existing // scroll/text entry state @@ -947,3 +975,20 @@ void LLIMFloater::initIMFloater() // init chat window type before user changed it in preferences isChatMultiTab(); } + +//static +void LLIMFloater::sRemoveTypingIndicator(const LLSD& data) +{ + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + LLUUID from_id = data["from_id"]; + if (gAgentID == from_id || LLUUID::null == from_id) return; + + LLIMFloater* floater = LLIMFloater::findInstance(session_id); + if (!floater) return; + + if (IM_NOTHING_SPECIAL != floater->mDialog) return; + + floater->removeTypingIndicator(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f90bc35c34..bc7a43e852 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -33,9 +33,10 @@ #ifndef LL_IMFLOATER_H #define LL_IMFLOATER_H -#include "lltransientdockablefloater.h" +#include "llinstantmessage.h" #include "lllogchat.h" #include "lltooldraganddrop.h" +#include "lltransientdockablefloater.h" class LLLineEditor; class LLPanelChatControlPanel; @@ -109,6 +110,9 @@ public: static void initIMFloater(); + //used as a callback on receiving new IM message + static void sRemoveTypingIndicator(const LLSD& data); + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index e6ded5f371..8b6762ce38 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -66,7 +66,6 @@ #include "llimview.h" // for LLIMModel to get other avatar id in chat #include "llkeyboard.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llpanelimcontrolpanel.h" #include "llrecentpeople.h" #include "llresmgr.h" diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4d2ba16a4c..f5362acbfe 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -72,7 +72,6 @@ #include "llviewerwindow.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llnearbychat.h" #include "llviewerregion.h" #include "llvoicechannel.h" @@ -94,7 +93,8 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); std::string LLCallDialogManager::sPreviousSessionlName = ""; std::string LLCallDialogManager::sCurrentSessionlName = ""; LLIMModel::LLIMSession* LLCallDialogManager::sSession = NULL; - +LLVoiceChannel::EState LLCallDialogManager::sOldState = LLVoiceChannel::STATE_READY; +const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-1417BF03DDB4"); // // Globals // @@ -154,7 +154,7 @@ LLIMModel::LLIMModel() addNewMsgCallback(toast_callback); } -LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids) +LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice) : mSessionID(session_id), mName(name), mType(type), @@ -168,24 +168,42 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mCallBackEnabled(true), mTextIMPossible(true), mOtherParticipantIsAvatar(true), - mStartCallOnInitialize(false) + mStartCallOnInitialize(false), + mStartedAsIMCall(voice) { + // set P2P type by default + mSessionType = P2P_SESSION; + if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id); + + // check if it was AVALINE call + if (!mOtherParticipantIsAvatar) + { + mSessionType = AVALINE_SESSION; + } } else { mVoiceChannel = new LLVoiceChannelGroup(session_id, name); + + // determine whether it is group or conference session + if (gAgent.isInGroup(mSessionID)) + { + mSessionType = GROUP_SESSION; + } + else + { + mSessionType = ADHOC_SESSION; + } } if(mVoiceChannel) { - mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2)); + mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2, _3)); } - // define what type of session was opened - setSessionType(); - + mSpeakers = new LLIMSpeakerMgr(mVoiceChannel); // All participants will be added to the list of people we've recently interacted with. @@ -218,53 +236,69 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& } } -void LLIMModel::LLIMSession::setSessionType() +void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { - // set P2P type by default - mSessionType = P2P_SESSION; + std::string you = LLTrans::getString("You"); + std::string started_call = LLTrans::getString("started_call"); + std::string joined_call = LLTrans::getString("joined_call"); + std::string other_avatar_name = ""; - if (dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel) && !mOtherParticipantIsAvatar) // P2P AVALINE channel was opened + switch(mSessionType) { - mSessionType = AVALINE_SESSION; - return; - } - else if(dynamic_cast<LLVoiceChannelGroup*>(mVoiceChannel)) // GROUP channel was opened - { - if (mType == IM_SESSION_CONFERENCE_START) + case AVALINE_SESSION: + // *TODO: test avaline calls (EXT-2211) + case P2P_SESSION: + gCacheName->getFullName(mOtherParticipantID, other_avatar_name); + + if(direction == LLVoiceChannel::INCOMING_CALL) { - mSessionType = ADHOC_SESSION; - return; - } - else if(mType == IM_SESSION_GROUP_START) + switch(new_state) + { + case LLVoiceChannel::STATE_CALL_STARTED : + LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + break; + case LLVoiceChannel::STATE_CONNECTED : + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + default: + break; + } + } + else // outgoing call { - mSessionType = GROUP_SESSION; - return; - } - } -} - -void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) -{ - // *TODO: remove hardcoded string!!!!!!!!!!! + switch(new_state) + { + case LLVoiceChannel::STATE_CALL_STARTED : + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + break; + case LLVoiceChannel::STATE_CONNECTED : + LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call); + default: + break; + } + } - bool is_p2p_session = dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel); - bool is_incoming_call = false; - std::string other_avatar_name; + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); + } - if(is_p2p_session) - { - is_incoming_call = static_cast<LLVoiceChannelP2P*>(mVoiceChannel)->isIncomingCall(); - gCacheName->getFullName(mOtherParticipantID, other_avatar_name); + break; - if(is_incoming_call) + case GROUP_SESSION: + case ADHOC_SESSION: + // *TODO: determine call starter's name "other_avatar_name" (EXT-2211) + // decide how to show notifications for a group/adhoc chat already opened + // for now there is no notification from voice channel for this case + if(direction == LLVoiceChannel::INCOMING_CALL) { switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessage(mSessionID, other_avatar_name, mOtherParticipantID, "Started a voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessage(mSessionID, "You", gAgent.getID(), "Joined the voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); default: break; } @@ -274,10 +308,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessage(mSessionID, "You", gAgent.getID(), "Started a voice call"); + LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); break; - case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessage(mSessionID, other_avatar_name, mOtherParticipantID, "Joined the voice call"); default: break; } @@ -288,10 +320,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES { mSpeakers->update(true); } - } - else // group || ad-hoc calls - { - + break; } } @@ -463,7 +492,7 @@ void LLIMModel::testMessages() //session name should not be empty bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, - const LLUUID& other_participant_id, const std::vector<LLUUID>& ids) + const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice) { if (name.empty()) { @@ -477,7 +506,7 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co return false; } - LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids); + LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids, voice); mId2SessionMap[session_id] = session; LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, name, other_participant_id); @@ -486,6 +515,12 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co } +bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice) +{ + std::vector<LLUUID> no_ids; + return newSession(session_id, name, type, other_participant_id, no_ids, voice); +} + bool LLIMModel::clearSession(const LLUUID& session_id) { if (mId2SessionMap.find(session_id) == mId2SessionMap.end()) return false; @@ -585,12 +620,33 @@ bool LLIMModel::proccessOnlineOfflineNotification( bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool log2file /* = true */) { + + LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); + if (!session) return false; + + // notify listeners + LLSD arg; + arg["session_id"] = session_id; + arg["num_unread"] = session->mNumUnread; + arg["participant_unread"] = session->mParticipantUnreadMessageCount; + arg["message"] = utf8_text; + arg["from"] = from; + arg["from_id"] = from_id; + arg["time"] = LLLogChat::timestamp(false); + mNewMsgSignal(arg); + + return true; +} + +LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) +{ LLIMSession* session = findIMSession(session_id); if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; - return false; + return NULL; } addToHistory(session_id, from, from_id, utf8_text); @@ -604,19 +660,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co ++(session->mParticipantUnreadMessageCount); } - - // notify listeners - LLSD arg; - arg["session_id"] = session_id; - arg["num_unread"] = session->mNumUnread; - arg["participant_unread"] = session->mParticipantUnreadMessageCount; - arg["message"] = utf8_text; - arg["from"] = from; - arg["from_id"] = from_id; - arg["time"] = LLLogChat::timestamp(false); - mNewMsgSignal(arg); - - return true; + return session; } @@ -1060,15 +1104,15 @@ public: if (LLIMMgr::INVITATION_TYPE_VOICE == mInvitiationType) { - gIMMgr->startCall(mSessionID); + gIMMgr->startCall(mSessionID, LLVoiceChannel::INCOMING_CALL); } if ((mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE || mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE) && LLIMModel::getInstance()->findIMSession(mSessionID)) { - // always open IM window when connecting to voice - LLIMFloater::show(mSessionID); + // TODO remove in 2010, for voice calls we do not open an IM window + //LLIMFloater::show(mSessionID); } gIMMgr->clearPendingAgentListUpdates(mSessionID); @@ -1267,71 +1311,67 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } sSession = session; sSession->mVoiceChannel->setStateChangedCallback(LLCallDialogManager::onVoiceChannelStateChanged); - sPreviousSessionlName = sCurrentSessionlName; - sCurrentSessionlName = session->mName; + if(sCurrentSessionlName != session->mName) + { + sPreviousSessionlName = sCurrentSessionlName; + sCurrentSessionlName = session->mName; + } + + if (LLVoiceChannel::getCurrentVoiceChannel()->getState() == LLVoiceChannel::STATE_CALL_STARTED && + LLVoiceChannel::getCurrentVoiceChannel()->getCallDirection() == LLVoiceChannel::OUTGOING_CALL) + { + + //*TODO get rid of duplicated code + LLSD mCallDialogPayload; + mCallDialogPayload["session_id"] = sSession->mSessionID; + mCallDialogPayload["session_name"] = sSession->mName; + mCallDialogPayload["other_user_id"] = sSession->mOtherParticipantID; + mCallDialogPayload["old_channel_name"] = sPreviousSessionlName; + mCallDialogPayload["state"] = LLVoiceChannel::STATE_CALL_STARTED; + mCallDialogPayload["disconnected_channel_name"] = sSession->mName; + mCallDialogPayload["session_type"] = sSession->mSessionType; + + LLOutgoingCallDialog* ocd = LLFloaterReg::getTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); + if(ocd) + { + ocd->show(mCallDialogPayload); + } + } + } -void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) +void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { LLSD mCallDialogPayload; - LLOutgoingCallDialog* ocd; - bool is_incoming; + LLOutgoingCallDialog* ocd = NULL; + + if(sOldState == new_state) + { + return; + } + + sOldState = new_state; mCallDialogPayload["session_id"] = sSession->mSessionID; mCallDialogPayload["session_name"] = sSession->mName; mCallDialogPayload["other_user_id"] = sSession->mOtherParticipantID; mCallDialogPayload["old_channel_name"] = sPreviousSessionlName; + mCallDialogPayload["state"] = new_state; + mCallDialogPayload["disconnected_channel_name"] = sSession->mName; + mCallDialogPayload["session_type"] = sSession->mSessionType; switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : // do not show "Calling to..." if it is incoming call - is_incoming = LLVoiceClient::getInstance()->isSessionIncoming(sSession->mSessionID); - // *TODO: implement for AdHoc and Group voice chats - if(is_incoming) + if(direction == LLVoiceChannel::INCOMING_CALL) { return; } - - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(true); - ocd->getChild<LLTextBox>("leaving")->setVisible(true); - ocd->getChild<LLTextBox>("connecting")->setVisible(false); - ocd->getChild<LLTextBox>("noanswer")->setVisible(false); - ocd->getChild<LLButton>("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_RINGING : - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(false); - ocd->getChild<LLTextBox>("leaving")->setVisible(true); - ocd->getChild<LLTextBox>("connecting")->setVisible(true); - ocd->getChild<LLTextBox>("noanswer")->setVisible(false); - ocd->getChild<LLButton>("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_ERROR : - mCallDialogPayload["start_timer"] = true; - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(false); - ocd->getChild<LLTextBox>("leaving")->setVisible(false); - ocd->getChild<LLTextBox>("connecting")->setVisible(false); - ocd->getChild<LLTextBox>("noanswer")->setVisible(true); - ocd->getChild<LLButton>("Cancel")->setVisible(false); - } - return; + break; case LLVoiceChannel::STATE_CONNECTED : - case LLVoiceChannel::STATE_HUNG_UP : - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + ocd = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if (ocd) { ocd->closeFloater(); @@ -1342,6 +1382,11 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat break; } + ocd = LLFloaterReg::getTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); + if(ocd) + { + ocd->show(mCallDialogPayload); + } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1371,12 +1416,13 @@ void LLCallDialog::onOpen(const LLSD& key) LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) : LLCallDialog(payload) { - LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", payload); + LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if(instance && instance->getVisible()) { instance->onCancel(instance); } } + void LLOutgoingCallDialog::draw() { if (lifetimeHasExpired()) @@ -1405,10 +1451,14 @@ void LLOutgoingCallDialog::onLifetimeExpired() closeFloater(); } -void LLOutgoingCallDialog::onOpen(const LLSD& key) +void LLOutgoingCallDialog::show(const LLSD& key) { - LLCallDialog::onOpen(key); + mPayload = key; + + // hide all text at first + hideAllText(); + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) { @@ -1419,6 +1469,12 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } + if (!mPayload["disconnected_channel_name"].asString().empty()) + { + childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + } + std::string callee_name = mPayload["session_name"].asString(); if (callee_name == "anonymous") { @@ -1435,12 +1491,48 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) // stop timer by default mLifetimeTimer.stop(); - if(mPayload.has("start_timer")) + + // show only necessary strings and controls + switch(mPayload["state"].asInteger()) { - mLifetimeTimer.reset(); + case LLVoiceChannel::STATE_CALL_STARTED : + getChild<LLTextBox>("calling")->setVisible(true); + getChild<LLTextBox>("leaving")->setVisible(true); + break; + case LLVoiceChannel::STATE_RINGING : + getChild<LLTextBox>("leaving")->setVisible(true); + getChild<LLTextBox>("connecting")->setVisible(true); + break; + case LLVoiceChannel::STATE_ERROR : + getChild<LLTextBox>("noanswer")->setVisible(true); + getChild<LLButton>("Cancel")->setVisible(false); + mLifetimeTimer.start(); + break; + case LLVoiceChannel::STATE_HUNG_UP : + if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION) + { + getChild<LLTextBox>("nearby_P2P")->setVisible(true); + } + else + { + getChild<LLTextBox>("nearby")->setVisible(true); + } + getChild<LLButton>("Cancel")->setVisible(false); + mLifetimeTimer.start(); } + + openFloater(LLOutgoingCallDialog::OCD_KEY); } +void LLOutgoingCallDialog::hideAllText() +{ + getChild<LLTextBox>("calling")->setVisible(false); + getChild<LLTextBox>("leaving")->setVisible(false); + getChild<LLTextBox>("connecting")->setVisible(false); + getChild<LLTextBox>("nearby_P2P")->setVisible(false); + getChild<LLTextBox>("nearby")->setVisible(false); + getChild<LLTextBox>("noanswer")->setVisible(false); +} //static void LLOutgoingCallDialog::onCancel(void* user_data) @@ -1470,6 +1562,7 @@ BOOL LLOutgoingCallDialog::postBuild() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIncomingCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { @@ -1479,26 +1572,34 @@ BOOL LLIncomingCallDialog::postBuild() { LLDockableFloater::postBuild(); + LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; - EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); - - std::string call_type = getString("VoiceInviteP2P"); std::string caller_name = mPayload["caller_name"].asString(); + + std::string call_type; + if (gAgent.isInGroup(session_id)) + { + LLStringUtil::format_map_t args; + LLGroupData data; + if (gAgent.getGroupData(session_id, data)) + { + args["[GROUP]"] = data.mName; + call_type = getString(mPayload["notify_box_type"], args); + } + } + else + { + call_type = getString(mPayload["notify_box_type"]); + } + if (caller_name == "anonymous") { caller_name = getString("anonymous"); } setTitle(caller_name + " " + call_type); - - // If it is not a P2P invite, then it's an AdHoc invite - if ( type != IM_SESSION_P2P_INVITE ) - { - call_type = getString("VoiceInviteAdHoc"); - } // check to see if this is an Avaline call - LLUUID session_id = mPayload["session_id"].asUUID(); bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); childSetVisible("Start IM", is_avatar); // no IM for avaline @@ -1587,11 +1688,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response) if (voice) { - if (gIMMgr->startCall(session_id)) - { - // always open IM window when connecting to voice - LLIMFloater::show(session_id); - } + gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL); } gIMMgr->clearPendingAgentListUpdates(session_id); @@ -1630,11 +1727,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response) } } - LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id); - if (new_session_id != LLUUID::null) - { - LLIMFloater::show(new_session_id); - } + LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id, true); std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); @@ -1710,11 +1803,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) payload["session_handle"].asString(), payload["session_uri"].asString()); - if (gIMMgr->startCall(session_id)) - { - // always open IM window when connecting to voice - LLIMFloater::show(session_id); - } + gIMMgr->startCall(session_id); gIMMgr->clearPendingAgentListUpdates(session_id); gIMMgr->clearPendingInvitation(session_id); @@ -1724,11 +1813,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) LLUUID new_session_id = gIMMgr->addSession( payload["session_name"].asString(), type, - session_id); - if (new_session_id != LLUUID::null) - { - LLIMFloater::show(new_session_id); - } + session_id, true); std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); @@ -1798,6 +1883,8 @@ LLIMMgr::LLIMMgr() : { mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); + + LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLIMFloater::sRemoveTypingIndicator, _1)); } // Add a message to a session. @@ -2021,11 +2108,7 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name, const std::string& voice_session_handle, const std::string& caller_uri) { - LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id); - if (session_id != LLUUID::null) - { - LLIMFloater::show(session_id); - } + LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id, true); LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); if (speaker_mgr) @@ -2046,11 +2129,11 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name, LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, - const LLUUID& other_participant_id) + const LLUUID& other_participant_id, bool voice) { LLDynamicArray<LLUUID> ids; ids.put(other_participant_id); - return addSession(name, dialog, other_participant_id, ids); + return addSession(name, dialog, other_participant_id, ids, voice); } // Adds a session using the given session_id. If the session already exists @@ -2059,7 +2142,7 @@ LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray<LLUUID>& ids) + const LLDynamicArray<LLUUID>& ids, bool voice) { if (0 == ids.getLength()) { @@ -2078,7 +2161,7 @@ LLUUID LLIMMgr::addSession( if (new_session) { - LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids); + LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } @@ -2438,11 +2521,12 @@ void LLIMMgr::removeSessionObserver(LLIMSessionObserver *observer) mSessionObservers.remove(observer); } -bool LLIMMgr::startCall(const LLUUID& session_id) +bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction) { LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id); if (!voice_channel) return false; + voice_channel->setCallDirection(direction); voice_channel->activate(); return true; } @@ -2456,6 +2540,14 @@ bool LLIMMgr::endCall(const LLUUID& session_id) return true; } +bool LLIMMgr::isVoiceCall(const LLUUID& session_id) +{ + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (!im_session) return false; + + return im_session->mStartedAsIMCall; +} + // create a floater and update internal representation for // consistency. Returns the pointer, caller (the class instance since // it is a private method) is not responsible for deleting the @@ -2730,6 +2822,11 @@ public: { im_floater->processSessionUpdate(input["body"]["info"]); } + LLIMSpeakerMgr* im_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + if (im_mgr) + { + im_mgr->processSessionUpdate(input["body"]["info"]); + } } }; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index f26889ac91..09f0c9df71 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -65,14 +65,13 @@ public: } SType; LLIMSession(const LLUUID& session_id, const std::string& name, - const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids); + const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice); virtual ~LLIMSession(); void sessionInitReplyReceived(const LLUUID& new_session_id); - void setSessionType(); //define what type of session was opened void addMessagesFromHistory(const std::list<LLSD>& history); void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time); - void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); LLUUID mSessionID; @@ -105,6 +104,9 @@ public: bool mTextIMPossible; bool mOtherParticipantIsAvatar; bool mStartCallOnInitialize; + + //if IM session is created for a voice call + bool mStartedAsIMCall; }; @@ -144,7 +146,10 @@ public: * @param name session name should not be empty, will return false if empty */ bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, - const std::vector<LLUUID>& ids = std::vector<LLUUID>()); + const std::vector<LLUUID>& ids, bool voice = false); + + bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, + const LLUUID& other_participant_id, bool voice = false); /** * Remove all session data associated with a session specified by session_id @@ -164,6 +169,12 @@ public: bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); /** + * Similar to addMessage(...) above but won't send a signal about a new message added + */ + LLIMModel::LLIMSession* addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file = true); + + /** * Add a system message to an IM Model */ bool proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); @@ -285,14 +296,14 @@ public: // session. LLUUID addSession(const std::string& name, EInstantMessage dialog, - const LLUUID& other_participant_id); + const LLUUID& other_participant_id, bool voice = false); // Adds a session using a specific group of starting agents // the dialog type is assumed correct. Returns the uuid of the session. LLUUID addSession(const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray<LLUUID>& ids); + const LLDynamicArray<LLUUID>& ids, bool voice = false); /** * Creates a P2P session with the requisite handle for responding to voice calls. @@ -384,7 +395,7 @@ public: * Start call in a session * @return false if voice channel doesn't exist **/ - bool startCall(const LLUUID& session_id); + bool startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction = LLVoiceChannel::OUTGOING_CALL); /** * End call in a session @@ -392,6 +403,8 @@ public: **/ bool endCall(const LLUUID& session_id); + bool isVoiceCall(const LLUUID& session_id); + private: /** @@ -448,12 +461,13 @@ public: static void initClass(); static void onVoiceChannelChanged(const LLUUID &session_id); - static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); protected: static std::string sPreviousSessionlName; static std::string sCurrentSessionlName; static LLIMModel::LLIMSession* sSession; + static LLVoiceChannel::EState sOldState; }; class LLCallDialog : public LLDockableFloater @@ -491,14 +505,18 @@ public: LLOutgoingCallDialog(const LLSD& payload); /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + void show(const LLSD& key); static void onCancel(void* user_data); + static const LLUUID OCD_KEY; // check timer state /*virtual*/ void draw(); private: + + // hide all text boxes + void hideAllText(); // lifetime timer for NO_ANSWER notification LLTimer mLifetimeTimer; // lifetime duration for NO_ANSWER notification diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 39114d64b4..dae980feb1 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -115,7 +115,7 @@ private: void onClickTeleport(); void onClickInviteToGroup(); void onClickPay(); - void onClickBlock(); + void onToggleMute(); void onClickReport(); void onClickFreeze(); void onClickEject(); @@ -126,6 +126,8 @@ private: bool onVisibleZoomIn(); void onClickMuteVolume(); void onVolumeChange(const LLSD& data); + bool enableMute(); + bool enableUnmute(); // Is used to determine if "Add friend" option should be enabled in gear menu bool isNotFriend(); @@ -205,7 +207,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this)); mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this)); mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Block", boost::bind(&LLInspectAvatar::onClickBlock, this)); + mCommitCallbackRegistrar.add("InspectAvatar.ToggleMute", boost::bind(&LLInspectAvatar::onToggleMute, this)); mCommitCallbackRegistrar.add("InspectAvatar.Freeze", boost::bind(&LLInspectAvatar::onClickFreeze, this)); mCommitCallbackRegistrar.add("InspectAvatar.Eject", @@ -221,6 +223,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); + mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this)); + mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this)); // can't make the properties request until the widgets are constructed // as it might return immediately, so do it in postBuild. @@ -625,10 +629,19 @@ void LLInspectAvatar::onClickPay() closeFloater(); } -void LLInspectAvatar::onClickBlock() +void LLInspectAvatar::onToggleMute() { LLMute mute(mAvatarID, mAvatarName, LLMute::AGENT); - LLMuteList::getInstance()->add(mute); + + if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) + { + LLMuteList::getInstance()->remove(mute); + } + else + { + LLMuteList::getInstance()->add(mute); + } + LLPanelBlockedList::showPanelAndSelect(mute.mID); closeFloater(); } @@ -663,6 +676,37 @@ void LLInspectAvatar::onClickFindOnMap() LLFloaterReg::showInstance("world_map"); } + +bool LLInspectAvatar::enableMute() +{ + bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_self = mAvatarID == gAgent.getID(); + + if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + { + return true; + } + else + { + return false; + } +} + +bool LLInspectAvatar::enableUnmute() +{ + bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_self = mAvatarID == gAgent.getID(); + + if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + { + return true; + } + else + { + return false; + } +} + ////////////////////////////////////////////////////////////////////////////// // LLInspectAvatarUtil ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 42d061ff72..cb35a287e9 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -416,18 +416,6 @@ void LLInspectObject::updateDescription(LLSelectNode* nodep) LLTextBox* textbox = getChild<LLTextBox>("object_description"); textbox->setValue(desc); - - // Truncate description text to fit in widget - // *HACK: OMG, use lower-left corner to truncate text - // Don't round the position, we want the left of the character - S32 corner_index = textbox->getDocIndexFromLocalCoord( 0, 0, FALSE); - LLWString desc_wide = textbox->getWText(); - // index == length if position is past last character - if (corner_index < (S32)desc_wide.length()) - { - desc_wide = desc_wide.substr(0, corner_index); - textbox->setWText(desc_wide); - } } void LLInspectObject::updateMediaCurrentURL() diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 26a8a707b8..3fc2cbecbe 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -190,12 +190,7 @@ BOOL LLInvFVBridge::isItemRemovable() { return TRUE; } - if (gAgentWearables.isWearingItem(mUUID)) - { - return FALSE; - } - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (avatar && avatar->isWearingAttachment(mUUID)) + if (get_is_item_worn(mUUID)) { return FALSE; } @@ -506,41 +501,6 @@ void hide_context_entries(LLMenuGL& menu, } } -bool isWornLink(LLUUID link_id) -{ - LLViewerInventoryItem *link = gInventory.getItem(link_id); - if (!link) - return false; - LLViewerInventoryItem *item = link->getLinkedItem(); - if (!item) - return false; - - switch(item->getType()) - { - case LLAssetType::AT_OBJECT: - { - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) - return true; - } - break; - - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - if(gAgentWearables.isWearingItem(item->getUUID())) - return true; - break; - - case LLAssetType::AT_GESTURE: - if (LLGestureManager::instance().isGestureActive(item->getUUID())) - return true; - break; - default: - break; - } - return false; -} - // Helper for commonly-used entries void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items, @@ -552,7 +512,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (is_sidepanel) { // Sidepanel includes restricted menu. - if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) + if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { items.push_back(std::string("Remove Link")); } @@ -606,15 +566,18 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste")); } - items.push_back(std::string("Paste As Link")); - if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + if (gAgent.isGodlike()) { - disabled_items.push_back(std::string("Paste As Link")); + items.push_back(std::string("Paste As Link")); + if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Paste As Link")); + } } items.push_back(std::string("Paste Separator")); - if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) + if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { items.push_back(std::string("Remove Link")); } @@ -973,7 +936,7 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) return false; - return outfit_panel->isAccordionPanel(my_panel); + return outfit_panel->isTabPanel(my_panel); } // +=================================================+ @@ -1196,7 +1159,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // llinfos << "BOLD" << llendl; font |= LLFontGL::BOLD; @@ -1339,29 +1302,33 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item) { - // can't copy worn objects. DEV-15183 - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if( !avatarp ) + // Can't copy worn objects. DEV-15183 + if(get_is_item_worn(mUUID)) { return FALSE; } - if(avatarp->isWearingAttachment(mUUID)) + // You can never copy a link. + if (item->getIsLinkType()) { return FALSE; } - // All items can be copied, not all can be pasted. - // The only time an item can't be copied is if it's a link - // return (item->getPermissions().allowCopyBy(gAgent.getID())); - if (item->getIsLinkType()) + if (gAgent.isGodlike()) { - return FALSE; + // All items can be copied in god mode since you can + // at least paste-as-link the item, though you + // still may not be able paste the item. + return TRUE; + } + else + { + return (item->getPermissions().allowCopyBy(gAgent.getID())); } - return TRUE; } return FALSE; } + BOOL LLItemBridge::copyToClipboard() const { if(isItemCopyable()) @@ -1471,13 +1438,11 @@ BOOL LLFolderBridge::isItemRemovable() { return FALSE; } - // Allow protected types to be removed, but issue a warning. - /* + if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) { return FALSE; } - */ LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL); @@ -1680,23 +1645,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, for( i = 0; i < descendent_items.count(); i++ ) { LLInventoryItem* item = descendent_items[i]; - if( (item->getType() == LLAssetType::AT_CLOTHING) || - (item->getType() == LLAssetType::AT_BODYPART) ) - { - if( gAgentWearables.isWearingItem( item->getUUID() ) ) - { - is_movable = FALSE; // It's generally movable, but not into the trash! - break; - } - } - else - if( item->getType() == LLAssetType::AT_OBJECT ) + if (get_is_item_worn(item->getUUID())) { - if( avatar->isWearingAttachment( item->getUUID() ) ) - { - is_movable = FALSE; // It's generally movable, but not into the trash! - break; - } + is_movable = FALSE; + break; // It's generally movable, but not into the trash! } } } @@ -2186,6 +2138,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model restoreItem(); return; } +#ifndef LL_RELEASE_FOR_DOWNLOAD + else if ("delete_system_folder" == action) + { + removeSystemFolder(); + } +#endif } void LLFolderBridge::openItem() @@ -2309,13 +2267,27 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); - if (LLFolderType::lookupIsProtectedType(cat->getPreferredType())) + LLNotifications::instance().forceResponse(params, 0); + return TRUE; +} + + +BOOL LLFolderBridge::removeSystemFolder() +{ + const LLViewerInventoryCategory *cat = getCategory(); + if (!LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - LLNotifications::instance().add(params); + return FALSE; } - else + + LLSD payload; + LLSD args; + args["FOLDERNAME"] = cat->getName(); + + LLNotification::Params params("ConfirmDeleteProtectedCategory"); + params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); { - LLNotifications::instance().forceResponse(params, 0); + LLNotifications::instance().add(params); } return TRUE; } @@ -2484,6 +2456,13 @@ void LLFolderBridge::folderOptionsMenu() } } +#ifndef LL_RELEASE_FOR_DOWNLOAD + if (LLFolderType::lookupIsProtectedType(type)) + { + mItems.push_back(std::string("Delete System Folder")); + } +#endif + // wearables related functionality for folders. //is_wearable LLFindWearables is_wearable; @@ -2495,7 +2474,10 @@ void LLFolderBridge::folderOptionsMenu() checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - mItems.push_back(std::string("Folder Wearables Separator")); + if (!is_sidepanel) + { + mItems.push_back(std::string("Folder Wearables Separator")); + } // Only enable add/replace outfit for non-default folders. if (!is_default_folder) @@ -2508,8 +2490,11 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); - if (is_sidepanel) - mItems.push_back(std::string("Outfit Separator")); + if (!areAnyContentsWorn(model)) + { + disabled_items.push_back(std::string("Remove From Outfit")); + } + mItems.push_back(std::string("Outfit Separator")); } hide_context_entries(*mMenu, mItems, disabled_items); @@ -2530,6 +2515,35 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } +class LLFindWorn : public LLInventoryCollectFunctor +{ +public: + LLFindWorn() {} + virtual ~LLFindWorn() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item) + { + if (item && get_is_item_worn(item->getUUID())) + { + return TRUE; + } + return FALSE; + } +}; + +BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLFindWorn is_worn; + model->collectDescendentsIf(mUUID, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return (item_array.size() > 0); +} + // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { @@ -2652,6 +2666,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mItems.push_back(std::string("--no options--")); mDisabledItems.push_back(std::string("--no options--")); } + + // Preemptively disable system folder removal if more than one item selected. + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + mDisabledItems.push_back(std::string("Delete System Folder")); + } + hide_context_entries(menu, mItems, mDisabledItems); } @@ -2901,6 +2922,9 @@ void saveItemsOrder(LLInventoryModel::item_array_t& items) item->updateServer(FALSE); gInventory.updateItem(item); + + // Tell the parent folder to refresh its sort order. + gInventory.addChangedMask(LLInventoryObserver::SORT, item->getParentUUID()); } gInventory.notifyObservers(); @@ -2922,6 +2946,27 @@ LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_a return result; } +// See also LLInventorySort where landmarks in the Favorites folder are sorted. +class LLViewerInventoryItemSort +{ +public: + bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) + { + return a->getSortField() < b->getSortField(); + } +}; + +/** + * Sorts passed items by LLViewerInventoryItem sort field. + * + * @param[in, out] items - array of items, not sorted. + */ +void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items) +{ + static LLViewerInventoryItemSort sort_functor; + std::sort(items.begin(), items.end(), sort_functor); +} + void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId) { LLViewerInventoryItem* srcItem = gInventory.getItem(srcItemId); @@ -2970,19 +3015,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if(is_movable && move_is_into_trash) { - switch(inv_item->getType()) - { - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_BODYPART: - is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID()); - break; - - case LLAssetType::AT_OBJECT: - is_movable = !avatar->isWearingAttachment(inv_item->getUUID()); - break; - default: - break; - } + is_movable = inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID()); } if ( is_movable ) @@ -2997,8 +3030,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id)); + const BOOL folder_allows_reorder = (mUUID == favorites_id); // we can move item inside a folder only if this folder is Favorites. See EXT-719 accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder); @@ -3013,7 +3045,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // everything in the active window so that we don't follow // the selection to its new location (which is very // annoying). - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); if (active_panel) { LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); @@ -3038,6 +3070,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLUUID srcItemId = inv_item->getUUID(); LLUUID destItemId = itemp->getListener()->getUUID(); + // ensure items are sorted properly before changing order. EXT-3498 + rearrange_item_order_by_sort_field(items); + // update order updateItemsOrder(items, srcItemId, destItemId); @@ -4050,8 +4085,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if(get_is_item_worn( mUUID ) ) { font |= LLFontGL::BOLD; } @@ -4067,9 +4101,9 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const std::string LLObjectBridge::getLabelSuffix() const { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if (get_is_item_worn(mUUID)) { + LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); std::string attachment_point_name = avatar->getAttachedPointName(mUUID); // e.g. "(worn on ...)" / "(attached to ...)" @@ -4194,12 +4228,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) return; } - if( avatarp->isWearingAttachment( mUUID ) ) + if( get_is_item_worn( mUUID ) ) { items.push_back(std::string("Detach From Yourself")); } - else - if( !isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) + else if (!isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); @@ -4425,7 +4458,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ if (gAgent.isTeen() && item->isWearableType() && (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT)) continue; - if( gAgentWearables.isWearingItem (item->getLinkedUUID()) ) + if (get_is_item_worn(item->getUUID())) { LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), @@ -4441,18 +4474,21 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < obj_count; ++i) { LLViewerInventoryItem *obj_item = obj_item_array.get(i); - gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); - gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); - - gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); - - // this object might have been selected, so let the selection manager know it's gone now - LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); - if (found_obj) + if (get_is_item_worn(obj_item->getUUID())) { - LLSelectMgr::getInstance()->remove(found_obj); + gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); + + gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); + + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + } } } } @@ -4462,7 +4498,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < gest_count; ++i) { LLViewerInventoryItem *gest_item = gest_item_array.get(i); - if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) ) + if (get_is_item_worn(gest_item->getUUID())) { LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); gInventory.updateItem( gest_item ); @@ -4476,7 +4512,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ BOOL LLWearableBridge::renameItem(const std::string& new_name) { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { gAgentWearables.setWearableName( mUUID, new_name ); } @@ -4485,7 +4521,7 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name) std::string LLWearableBridge::getLabelSuffix() const { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // e.g. "(worn)" return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn"); @@ -4519,7 +4555,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } else if (isRemoveAction(action)) { - if(gAgentWearables.isWearingItem(mUUID)) + if (get_is_item_worn(mUUID)) { LLViewerInventoryItem* item = getItem(); if (item) @@ -4550,7 +4586,7 @@ void LLWearableBridge::openItem() } else if(isAgentInventory()) { - if( !gAgentWearables.isWearingItem( mUUID ) ) + if( !get_is_item_worn( mUUID ) ) { wearOnAvatar(); } @@ -4650,7 +4686,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) case LLAssetType::AT_CLOTHING: items.push_back(std::string("Take Off")); case LLAssetType::AT_BODYPART: - if (gAgentWearables.isWearingItem(item->getUUID())) + if (get_is_item_worn(item->getUUID())) { disabled_items.push_back(std::string("Wearable Wear")); disabled_items.push_back(std::string("Wearable Add")); @@ -4681,7 +4717,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data) LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); if(!item || !item->isComplete()) return FALSE; } - return (!gAgentWearables.isWearingItem(self->mUUID)); + return (!get_is_item_worn(self->mUUID)); } // Called from menus @@ -4813,7 +4849,7 @@ BOOL LLWearableBridge::canEditOnAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return FALSE; - return (gAgentWearables.isWearingItem(self->mUUID)); + return (get_is_item_worn(self->mUUID)); } // static @@ -4850,7 +4886,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if( self && (LLAssetType::AT_BODYPART != self->mAssetType) ) { - return gAgentWearables.isWearingItem( self->mUUID ); + return get_is_item_worn( self->mUUID ); } return FALSE; } @@ -4860,7 +4896,7 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return; - if(gAgentWearables.isWearingItem(self->mUUID)) + if(get_is_item_worn(self->mUUID)) { LLViewerInventoryItem* item = self->getItem(); if (item) @@ -4883,7 +4919,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID); if(wearable) { - if( gAgentWearables.isWearingItem( item_id ) ) + if( get_is_item_worn( item_id ) ) { EWearableType type = wearable->getType(); @@ -5093,8 +5129,9 @@ void LLAnimationBridgeAction::doIt() //virtual void LLObjectBridgeAction::doIt() { + /* LLFloaterReg::showInstance("properties", mUUID); - + */ LLInvFVBridgeAction::doIt(); } @@ -5166,7 +5203,7 @@ void LLWearableBridgeAction::doIt() } else if(isAgentInventory()) { - if(!gAgentWearables.isWearingItem(mUUID)) + if(!get_is_item_worn(mUUID)) { wearOnAvatar(); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 117e32c6be..4d83e9b684 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -292,7 +292,9 @@ public: static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); virtual BOOL renameItem(const std::string& new_name); + virtual BOOL removeItem(); + BOOL removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); virtual void pasteFromClipboard(); @@ -339,6 +341,7 @@ protected: static void createNewEyes(void* user_data); BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + BOOL areAnyContentsWorn(LLInventoryModel* model) const; void modifyOutfit(BOOL append); void determineFolderType(); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 81b10f5a62..b4dcb566e4 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -40,6 +40,7 @@ #include "llinventorymodel.h" // gInventory.backgroundFetchActive() #include "llviewercontrol.h" #include "llviewerinventory.h" +#include "llfolderview.h" // linden library includes #include "lltrans.h" @@ -217,6 +218,7 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const BOOL LLInventoryFilter::isNotDefault() const { return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes + || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate @@ -226,7 +228,8 @@ BOOL LLInventoryFilter::isNotDefault() const BOOL LLInventoryFilter::isActive() const { - return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != PERM_NONE || mFilterOps.mMinDate != time_min() @@ -329,7 +332,6 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) mFilterSubString = string; LLStringUtil::toUpper(mFilterSubString); LLStringUtil::trimHead(mFilterSubString); - if (less_restrictive) { setModified(FILTER_LESS_RESTRICTIVE); @@ -512,21 +514,21 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior) // if not keeping current filter results, update last valid as well switch(mFilterBehavior) { - case FILTER_RESTART: - mMustPassGeneration = mFilterGeneration; - mMinRequiredGeneration = mFilterGeneration; - break; - case FILTER_LESS_RESTRICTIVE: - mMustPassGeneration = mFilterGeneration; - break; - case FILTER_MORE_RESTRICTIVE: - mMinRequiredGeneration = mFilterGeneration; - // must have passed either current filter generation (meaningless, as it hasn't been run yet) - // or some older generation, so keep the value - mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration); - break; - default: - llerrs << "Bad filter behavior specified" << llendl; + case FILTER_RESTART: + mMustPassGeneration = mFilterGeneration; + mMinRequiredGeneration = mFilterGeneration; + break; + case FILTER_LESS_RESTRICTIVE: + mMustPassGeneration = mFilterGeneration; + break; + case FILTER_MORE_RESTRICTIVE: + mMinRequiredGeneration = mFilterGeneration; + // must have passed either current filter generation (meaningless, as it hasn't been run yet) + // or some older generation, so keep the value + mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration); + break; + default: + llerrs << "Bad filter behavior specified" << llendl; } } else diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 5ca77cb26a..b01554edc8 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -162,8 +162,8 @@ private: FilterOps(); U32 mFilterTypes; - U64 mFilterObjectTypes; // For _ITEM - U64 mFilterCategoryTypes; // For _ITEM + U64 mFilterObjectTypes; // For _OBJECT + U64 mFilterCategoryTypes; // For _CATEGORY LLUUID mFilterUUID; // for UUID time_t mMinDate; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 75218e98e0..8f4136c01f 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -338,3 +338,33 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi ); return LLUI::getUIImage(icon_name); } + +BOOL get_is_item_worn(const LLUUID& id) +{ + const LLViewerInventoryItem* item = gInventory.getItem(id); + if (!item) + return FALSE; + + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + { + const LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); + if(my_avatar && my_avatar->isWearingAttachment(item->getLinkedUUID())) + return TRUE; + break; + } + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(gAgentWearables.isWearingItem(item->getLinkedUUID())) + return TRUE; + break; + case LLAssetType::AT_GESTURE: + if (LLGestureManager::instance().isGestureActive(item->getLinkedUUID())) + return TRUE; + break; + default: + break; + } + return FALSE; +} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 9916a2351c..968db84819 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -41,7 +41,9 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // This is a collection of miscellaneous functions and classes -// that don't fit cleanly into any other class header. +// that don't fit cleanly into any other class header. Eventually, +// we should figure out where to put these functions so that we can +// get rid of this generic file. // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -98,14 +100,17 @@ public: }; const std::string& get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); + LLInventoryType::EType inventory_type, + U32 attachment_point, + BOOL item_is_multi ); LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); + LLInventoryType::EType inventory_type, + U32 attachment_point, + BOOL item_is_multi ); + +// Is this item or its baseitem is worn, attached, etc... +BOOL get_is_item_worn(const LLUUID& id); #endif // LL_LLINVENTORYFUNCTIONS_H diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 5d8a8805b5..0a8108899a 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -59,7 +59,8 @@ BOOL LLInventoryModel::sBackgroundFetchActive = FALSE; BOOL LLInventoryModel::sAllFoldersFetched = FALSE; -BOOL LLInventoryModel::sFullFetchStarted = FALSE; +BOOL LLInventoryModel::sMyInventoryFetchStarted = FALSE; +BOOL LLInventoryModel::sLibraryFetchStarted = FALSE; S32 LLInventoryModel::sNumFetchRetries = 0; F32 LLInventoryModel::sMinTimeBetweenFetches = 0.3f; F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f; @@ -1342,11 +1343,11 @@ bool LLInventoryModel::isBulkFetchProcessingComplete() && sBulkFetchCount<=0) ? TRUE : FALSE ) ; } -class fetchDescendentsResponder: public LLHTTPClient::Responder +class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { public: - fetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; - //fetchDescendentsResponder() {}; + LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; + //LLInventoryModelFetchDescendentsResponder() {}; void result(const LLSD& content); void error(U32 status, const std::string& reason); public: @@ -1356,7 +1357,7 @@ class fetchDescendentsResponder: public LLHTTPClient::Responder }; //If we get back a normal response, handle it here -void fetchDescendentsResponder::result(const LLSD& content) +void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { if (content.has("folders")) { @@ -1423,7 +1424,8 @@ void fetchDescendentsResponder::result(const LLSD& content) LLSD category = *category_it; tcategory->fromLLSD(category); - if (LLInventoryModel::sFullFetchStarted) + if (LLInventoryModel::sMyInventoryFetchStarted || + LLInventoryModel::sLibraryFetchStarted) { sFetchQueue.push_back(tcategory->getUUID()); } @@ -1475,20 +1477,16 @@ void fetchDescendentsResponder::result(const LLSD& content) if (LLInventoryModel::isBulkFetchProcessingComplete()) { llinfos << "Inventory fetch completed" << llendl; - if (LLInventoryModel::sFullFetchStarted) - { - LLInventoryModel::sAllFoldersFetched = TRUE; - } - LLInventoryModel::stopBackgroundFetch(); + LLInventoryModel::setAllFoldersFetched(); } gInventory.notifyObservers("fetchDescendents"); } //If we get back an error (not found, etc...), handle it here -void fetchDescendentsResponder::error(U32 status, const std::string& reason) +void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) { - llinfos << "fetchDescendentsResponder::error " + llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; LLInventoryModel::incrBulkFetch(-1); @@ -1508,11 +1506,7 @@ void fetchDescendentsResponder::error(U32 status, const std::string& reason) { if (LLInventoryModel::isBulkFetchProcessingComplete()) { - if (LLInventoryModel::sFullFetchStarted) - { - LLInventoryModel::sAllFoldersFetched = TRUE; - } - LLInventoryModel::stopBackgroundFetch(); + LLInventoryModel::setAllFoldersFetched(); } } gInventory.notifyObservers("fetchDescendents"); @@ -1580,7 +1574,8 @@ void LLInventoryModel::bulkFetch(std::string url) body["folders"].append(folder_sd); folder_count++; } - if (sFullFetchStarted) + if (sMyInventoryFetchStarted || + sLibraryFetchStarted) { //Already have this folder but append child folders to list. // add all children to queue parent_cat_map_t::iterator cat_it = gInventory.mParentChildCategoryTree.find(cat->getUUID()); @@ -1605,22 +1600,18 @@ void LLInventoryModel::bulkFetch(std::string url) sBulkFetchCount++; if (body["folders"].size()) { - LLHTTPClient::post(url, body, new fetchDescendentsResponder(body),300.0); + LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); } if (body_lib["folders"].size()) { std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); - LLHTTPClient::post(url_lib, body_lib, new fetchDescendentsResponder(body_lib),300.0); + LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); } sFetchTimer.reset(); } else if (isBulkFetchProcessingComplete()) { - if (sFullFetchStarted) - { - sAllFoldersFetched = TRUE; - } - stopBackgroundFetch(); + setAllFoldersFetched(); } } @@ -1636,7 +1627,6 @@ BOOL LLInventoryModel::backgroundFetchActive() return sBackgroundFetchActive; } -//static void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) { if (!sAllFoldersFetched) @@ -1644,9 +1634,16 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) sBackgroundFetchActive = TRUE; if (cat_id.isNull()) { - if (!sFullFetchStarted) + if (!sMyInventoryFetchStarted) { - sFullFetchStarted = TRUE; + sMyInventoryFetchStarted = TRUE; + sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); + sFetchQueue.push_back(gInventory.getRootFolderID()); + gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); + } + if (!sLibraryFetchStarted) + { + sLibraryFetchStarted = TRUE; sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); sFetchQueue.push_back(gInventory.getRootFolderID()); gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); @@ -1660,6 +1657,14 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) sFetchQueue.push_front(cat_id); gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); } + if (cat_id == gInventory.getLibraryRootFolderID()) + { + sLibraryFetchStarted = TRUE; + } + if (cat_id == gInventory.getRootFolderID()) + { + sMyInventoryFetchStarted = TRUE; + } } } } @@ -1681,10 +1686,20 @@ void LLInventoryModel::stopBackgroundFetch() gIdleCallbacks.deleteFunction(&LLInventoryModel::backgroundFetch, NULL); sBulkFetchCount=0; sMinTimeBetweenFetches=0.0f; -// sFullFetchStarted=FALSE; } } +// static +void LLInventoryModel::setAllFoldersFetched() +{ + if (sMyInventoryFetchStarted && + sLibraryFetchStarted) + { + sAllFoldersFetched = TRUE; + } + stopBackgroundFetch(); +} + //static void LLInventoryModel::backgroundFetch(void*) { @@ -1703,11 +1718,8 @@ void LLInventoryModel::backgroundFetch(void*) if (sFetchQueue.empty()) { llinfos << "Inventory fetch completed" << llendl; - if (sFullFetchStarted) - { - sAllFoldersFetched = TRUE; - } - stopBackgroundFetch(); + + setAllFoldersFetched(); return; } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index b744d821c7..27bbca493d 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -72,6 +72,8 @@ class LLInventoryCollectFunctor; class LLInventoryModel { public: + friend class LLInventoryModelFetchDescendentsResponder; + enum EHasChildren { CHILDREN_NO, @@ -282,9 +284,6 @@ public: // Make sure we have the descendents in the structure. Returns true // if a fetch was performed. bool fetchDescendentsOf(const LLUUID& folder_id); - - // Add categories to a list to be fetched in bulk. - static void bulkFetch(std::string url); // call this method to request the inventory. //void requestFromServer(const LLUUID& agent_id); @@ -369,15 +368,7 @@ public: // Utility Functions void removeItem(const LLUUID& item_id); - // start and stop background breadth-first fetching of inventory contents - // this gets triggered when performing a filter-search - static void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); // start fetch process static void findLostItems(); - static BOOL backgroundFetchActive(); - static bool isEverythingFetched(); - static void backgroundFetch(void*); // background fetch idle function - static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; } - // Data about the agent's root folder and root library folder // are stored here, rather than in LLAgent where it used to be, because @@ -477,14 +468,11 @@ private: LLUUID mLibraryRootFolderID; LLUUID mLibraryOwnerID; - // completing the fetch once per session should be sufficient - static BOOL sBackgroundFetchActive; static BOOL sTimelyFetchPending; static S32 sNumFetchRetries; static LLFrameTimer sFetchTimer; static F32 sMinTimeBetweenFetches; static F32 sMaxTimeBetweenFetches; - static S16 sBulkFetchCount; // Expected inventory cache version const static S32 sCurrentInvCacheVersion; @@ -510,11 +498,33 @@ private: public: // *NOTE: DEBUG functionality void dumpInventory() const; - static bool isBulkFetchProcessingComplete(); + + //////////////////////////////////////////////////////////////////////////////// + // Bulk / Background Fetch + +public: + // Start and stop background breadth-first fetching of inventory contents. + // This gets triggered when performing a filter-search + void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); + static BOOL backgroundFetchActive(); + static bool isEverythingFetched(); + static void backgroundFetch(void*); // background fetch idle function + static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; } static void stopBackgroundFetch(); // stop fetch process + static bool isBulkFetchProcessingComplete(); + + // Add categories to a list to be fetched in bulk. + static void bulkFetch(std::string url); - static BOOL sFullFetchStarted; +private: + static BOOL sMyInventoryFetchStarted; + static BOOL sLibraryFetchStarted; static BOOL sAllFoldersFetched; + static void setAllFoldersFetched(); + + // completing the fetch once per session should be sufficient + static BOOL sBackgroundFetchActive; + static S16 sBulkFetchCount; }; // a special inventory model for the agent diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 99e6dbe3c8..c1f192e2bf 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -62,6 +62,7 @@ public: STRUCTURE = 16, // structural change (eg item or folder moved) CALLING_CARD = 32, // (eg online, grant status, cancel) REBUILD = 64, // item UI changed (eg item type different) + SORT = 128, // folder needs to be resorted. ALL = 0xffffffff }; LLInventoryObserver(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 92b9dc427f..3c34ba32e2 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -278,6 +278,7 @@ void LLInventoryPanel::modelChanged(U32 mask) const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); LLFolderViewItem* view_item = mFolders->getItemByID(item_id); + LLFolderViewFolder* view_folder = mFolders->getFolderByID(item_id); ////////////////////////////// // LABEL Operation @@ -320,7 +321,18 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->refresh(); } } - + + ////////////////////////////// + // SORT Operation + // Sort the folder. + if (mask & LLInventoryObserver::SORT) + { + if (view_folder) + { + view_folder->requestSort(); + } + } + // We don't typically care which of these masks the item is actually flagged with, since the masks // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks @@ -385,16 +397,6 @@ void LLInventoryPanel::modelChanged(U32 mask) } } } - - /* I don't think we need this code, but not positive -- Seraph - if (!handled) - { - // It's a small change that only requires a refresh. - // *TODO: figure out a more efficient way to do the refresh - // since it is expensive on large inventories - mFolders->refresh(); - } - */ } // static diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 08d56f8b9f..f25d2ef574 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -38,6 +38,7 @@ #include "llinventory.h" #include "lllandmark.h" #include "llparcel.h" +#include "llregionhandle.h" #include "llnotificationsutil.h" diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index d613cf6ba4..bd9d22c327 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -39,7 +39,6 @@ #include "llappviewer.h" #include "llagent.h" -#include "llnotify.h" #include "llvfile.h" #include "llviewerstats.h" diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 33fd3e3bf1..fc9654e9ad 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -39,6 +39,8 @@ #include "lltrans.h" #include "llviewercontrol.h" +#include "llinstantmessage.h" + #include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/regex.hpp> diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 7d3da152c1..2dc9f255d7 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -189,7 +189,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) bool LLLoginInstance::handleLoginEvent(const LLSD& event) { - LL_DEBUGS("Login") << "LoginListener called!: \n" << event << LL_ENDL; + LL_DEBUGS("LLLogin") << "LoginListener called!: \n" << event << LL_ENDL; if(!(event.has("state") && event.has("change") && event.has("progress"))) { diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 765b504afe..5f30ab4e01 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -101,6 +101,16 @@ const U32 ARROW_TO_AXIS[4] = VZ }; +// Sort manipulator handles by their screen-space projection +struct ClosestToCamera +{ + bool operator()(const LLManipTranslate::ManipulatorHandle& a, + const LLManipTranslate::ManipulatorHandle& b) const + { + return a.mEndPosition.mV[VZ] < b.mEndPosition.mV[VZ]; + } +}; + LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) : LLManip( std::string("Move"), composite ), mLastHoverMouseX(-1), @@ -273,7 +283,6 @@ void LLManipTranslate::restoreGL() LLManipTranslate::~LLManipTranslate() { - for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer()); } @@ -888,8 +897,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) planar_manip_xy_visible = TRUE; } - for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer()); - mProjectedManipulators.clear(); + // Project up to 9 manipulators to screen space 2*X, 2*Y, 2*Z, 3*planes + std::vector<ManipulatorHandle> projected_manipulators; + projected_manipulators.reserve(9); for (S32 i = 0; i < num_arrow_manips; i+= 2) { @@ -899,12 +909,12 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector4 projected_end = mManipulatorVertices[i + 1] * transform; projected_end = projected_end * (1.f / projected_end.mV[VW]); - ManipulatorHandle* projManipulator = - new ManipulatorHandle(LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), + ManipulatorHandle projected_manip( + LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]), MANIPULATOR_IDS[i / 2], 10.f); // 10 pixel hotspot for arrows - mProjectedManipulators.insert(projManipulator); + projected_manipulators.push_back(projected_manip); } if (planar_manip_yz_visible) @@ -916,12 +926,12 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector4 projected_end = mManipulatorVertices[i + 1] * transform; projected_end = projected_end * (1.f / projected_end.mV[VW]); - ManipulatorHandle* projManipulator = - new ManipulatorHandle(LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), + ManipulatorHandle projected_manip( + LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]), MANIPULATOR_IDS[i / 2], 20.f); // 20 pixels for planar manipulators - mProjectedManipulators.insert(projManipulator); + projected_manipulators.push_back(projected_manip); } if (planar_manip_xz_visible) @@ -933,12 +943,12 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector4 projected_end = mManipulatorVertices[i + 1] * transform; projected_end = projected_end * (1.f / projected_end.mV[VW]); - ManipulatorHandle* projManipulator = - new ManipulatorHandle(LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), + ManipulatorHandle projected_manip( + LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]), MANIPULATOR_IDS[i / 2], 20.f); // 20 pixels for planar manipulators - mProjectedManipulators.insert(projManipulator); + projected_manipulators.push_back(projected_manip); } if (planar_manip_xy_visible) @@ -950,12 +960,12 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector4 projected_end = mManipulatorVertices[i + 1] * transform; projected_end = projected_end * (1.f / projected_end.mV[VW]); - ManipulatorHandle* projManipulator = - new ManipulatorHandle(LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), + ManipulatorHandle projected_manip( + LLVector3(projected_start.mV[VX], projected_start.mV[VY], projected_start.mV[VZ]), LLVector3(projected_end.mV[VX], projected_end.mV[VY], projected_end.mV[VZ]), MANIPULATOR_IDS[i / 2], 20.f); // 20 pixels for planar manipulators - mProjectedManipulators.insert(projManipulator); + projected_manipulators.push_back(projected_manip); } LLVector2 manip_start_2d; @@ -967,13 +977,18 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLVector2 mousePos((F32)x - half_width, (F32)y - half_height); LLVector2 mouse_delta; - for (minpulator_list_t::iterator iter = mProjectedManipulators.begin(); - iter != mProjectedManipulators.end(); ++iter) + // Keep order consistent with insertion via stable_sort + std::stable_sort( projected_manipulators.begin(), + projected_manipulators.end(), + ClosestToCamera() ); + + std::vector<ManipulatorHandle>::iterator it = projected_manipulators.begin(); + for ( ; it != projected_manipulators.end(); ++it) { - ManipulatorHandle* manipulator = *iter; + ManipulatorHandle& manipulator = *it; { - manip_start_2d.setVec(manipulator->mStartPosition.mV[VX] * half_width, manipulator->mStartPosition.mV[VY] * half_height); - manip_end_2d.setVec(manipulator->mEndPosition.mV[VX] * half_width, manipulator->mEndPosition.mV[VY] * half_height); + manip_start_2d.setVec(manipulator.mStartPosition.mV[VX] * half_width, manipulator.mStartPosition.mV[VY] * half_height); + manip_end_2d.setVec(manipulator.mEndPosition.mV[VX] * half_width, manipulator.mEndPosition.mV[VY] * half_height); manip_dir = manip_end_2d - manip_start_2d; mouse_delta = mousePos - manip_start_2d; @@ -985,9 +1000,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) if (mouse_pos_manip > 0.f && mouse_pos_manip < manip_length && - mouse_dist_manip_squared < manipulator->mHotSpotRadius * manipulator->mHotSpotRadius) + mouse_dist_manip_squared < manipulator.mHotSpotRadius * manipulator.mHotSpotRadius) { - mHighlightedPart = manipulator->mManipID; + mHighlightedPart = manipulator.mManipID; break; } } diff --git a/indra/newview/llmaniptranslate.h b/indra/newview/llmaniptranslate.h index 25ff35cc72..d20b86b2f4 100644 --- a/indra/newview/llmaniptranslate.h +++ b/indra/newview/llmaniptranslate.h @@ -89,17 +89,6 @@ protected: F32 getMinGridScale(); private: - struct compare_manipulators - { - bool operator() (const ManipulatorHandle* const a, const ManipulatorHandle* const b) const - { - if (a->mEndPosition.mV[VZ] != b->mEndPosition.mV[VZ]) - return (a->mEndPosition.mV[VZ] < b->mEndPosition.mV[VZ]); - else - return a->mManipID < b->mManipID; - } - }; - S32 mLastHoverMouseX; S32 mLastHoverMouseY; BOOL mSendUpdateOnMouseUp; @@ -116,8 +105,6 @@ private: LLVector3d mDragCursorStartGlobal; LLVector3d mDragSelectionStartGlobal; LLTimer mUpdateTimer; - typedef std::set<ManipulatorHandle*, compare_manipulators> minpulator_list_t; - minpulator_list_t mProjectedManipulators; LLVector4 mManipulatorVertices[18]; F32 mSnapOffsetMeters; LLVector3 mSnapOffsetAxis; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index f32866b1fe..199bd966ef 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -95,7 +95,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), - mTextureHeight ( 1024 ) + mTextureHeight ( 1024 ), + mClearCache(false) { { LLColor4 color = p.caret_color().get(); @@ -491,6 +492,21 @@ void LLMediaCtrl::clr404RedirectUrl() //////////////////////////////////////////////////////////////////////////////// // +void LLMediaCtrl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clearCache(); + } + else + { + mClearCache = true; + } + +} + +//////////////////////////////////////////////////////////////////////////////// +// void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) { // don't browse to anything that starts with secondlife:// or sl:// @@ -617,7 +633,12 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->setHomeURL(mHomePageUrl); mMediaSource->setVisible( getVisible() ); mMediaSource->addObserver( this ); - + if(mClearCache) + { + mMediaSource->clearCache(); + mClearCache = false; + } + if(mHideLoading) { mHidingInitialLoad = true; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index f07513a3fd..8f9e6e7179 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -117,6 +117,9 @@ public: // set/clear URL to visit when a 404 page is reached void set404RedirectUrl( std::string redirect_url ); void clr404RedirectUrl(); + + // Clear the browser cache when the instance gets loaded + void clearCache(); // accessor/mutator for flag that indicates if frequent updates to texture happen bool getFrequentUpdates() { return mFrequentUpdates; }; @@ -192,6 +195,7 @@ public: bool mDecoupleTextureSize; S32 mTextureWidth; S32 mTextureHeight; + bool mClearCache; }; #endif // LL_LLMediaCtrl_H diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 2694075a58..2bb2a3da6f 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -224,7 +224,7 @@ bool LLMediaDataClient::processQueueTimer() if(!isEmpty()) { - LL_INFOS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() + LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() << ", RR queue size is: " << mRoundRobinQueue.size() << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue is: " << mSortedQueue << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, RR queue is: " << mRoundRobinQueue << LL_ENDL; @@ -262,7 +262,7 @@ void LLMediaDataClient::sortQueue() if (size > mMaxSortedQueueSize) { U32 num_to_cull = (size - mMaxSortedQueueSize); - LL_INFOS("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " + LL_INFOS_ONCE("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " << num_to_cull << " items" << LL_ENDL; while (num_to_cull-- > 0) { @@ -309,7 +309,7 @@ void LLMediaDataClient::serviceQueue() { if (request.isNull()) { - LL_INFOS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; + LL_WARNS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; } else { LL_INFOS("LLMediaDataClient") << "Skipping : " << *request << " " @@ -402,7 +402,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue LLMediaDataClient::request_queue_t::const_iterator end = q.end(); while (iter != end) { - s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString(); + s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString() << "(" << (*iter)->getObject()->getMediaInterest() << ")"; iter++; i++; } @@ -636,8 +636,8 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason) new RetryTimer(F32(retry_timeout/*secs*/), this); } else { - LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " << - mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; + LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " + << mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; } } else { diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp index 28ddaa61c4..a2aef9ba63 100644 --- a/indra/newview/llmenucommands.cpp +++ b/indra/newview/llmenucommands.cpp @@ -49,7 +49,6 @@ #include "llfloaterchat.h" #include "llfloaterworldmap.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llstatusbar.h" #include "llimview.h" #include "lltextbox.h" diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index c17427bec1..22201aecb2 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -160,9 +160,12 @@ void LLFloaterMove::setEnabled(BOOL enabled) // virtual void LLFloaterMove::setVisible(BOOL visible) { - // Ignore excessive calls of this method (from LLTransientFloaterMgr?). + // Do nothing with Stand/Stop Flying panel in excessive calls of this method (from LLTransientFloaterMgr?). if (getVisible() == visible) + { + LLTransientDockableFloater::setVisible(visible); return; + } if (visible) { diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 08bc1fac8b..6210151d1b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -34,10 +34,12 @@ #include "llnavigationbar.h" -#include <llfloaterreg.h> -#include <llfocusmgr.h> -#include <lliconctrl.h> -#include <llmenugl.h> +#include "llregionhandle.h" + +#include "llfloaterreg.h" +#include "llfocusmgr.h" +#include "lliconctrl.h" +#include "llmenugl.h" #include "llagent.h" #include "llviewerregion.h" @@ -259,9 +261,14 @@ BOOL LLNavigationBar::postBuild() void LLNavigationBar::setVisible(BOOL visible) { // change visibility of grandparent layout_panel to animate in and out - if (getParent() && getParent()->getParent()) + if (getParent()) { - getParent()->getParent()->setVisible(visible); + //to avoid some mysterious bugs like EXT-3352, at least try to log an incorrect parent to ping about a problem. + if(getParent()->getName() != "nav_bar_container") + { + LL_WARNS("LLNavigationBar")<<"NavigationBar has an unknown name of the parent: "<<getParent()->getName()<< LL_ENDL; + } + getParent()->setVisible(visible); } } diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 8fb4ea4211..8dbaa5ac53 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "message.h" + #include "llfloaterreg.h" #include "lltrans.h" diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 83a8dcd9f0..515c86bae8 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -39,6 +39,7 @@ //#include "llnotificationsutil.h" #include "llchannelmanager.h" #include "llchat.h" +#include "llinstantmessage.h" #include "llnotificationptr.h" namespace LLNotificationsUI diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 39381e3faa..fa16cb6473 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -243,7 +243,8 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) } else { - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId)); + // check only blocking on voice. EXT-3542 + setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); LLMuteList::getInstance()->addObserver(this); } } @@ -251,5 +252,6 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) void LLOutputMonitorCtrl::onChange() { - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId)); + // check only blocking on voice. EXT-3542 + setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index b9f422ca6f..ffe7f57167 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -396,7 +396,7 @@ void LLPanelProfileTab::updateButtons() && gAgent.isGodlike() || is_agent_mappable(getAvatarId()); childSetEnabled("show_on_map_btn", enable_map_btn); - childSetEnabled("call", LLVoiceClient::voiceEnabled()); + childSetEnabled("call", LLAvatarActions::canCall(getAvatarId())); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 70d92442ad..0dae667e7f 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -48,7 +48,6 @@ #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llavataractions.h" #include "llbutton.h" #include "llcheckboxctrl.h" diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b6c58808ae..29b647415c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -44,7 +44,6 @@ #include "llnamelistctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelgrouproles.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 4f76d32ad5..70e4798079 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -194,6 +194,7 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("pay_btn", FALSE); getChild<LLTextBox>("avatar_name")->setValue(im_session->mName); + getChild<LLTextBox>("avatar_name")->setToolTip(im_session->mName); } else { @@ -217,6 +218,7 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str avatar_name.append(" "); avatar_name.append(last); getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name); } } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 32c9faa688..e16bac2098 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -37,6 +37,7 @@ #include "llfloaterreg.h" #include "llsdutil.h" #include "llsdutil_math.h" +#include "llregionhandle.h" #include "llaccordionctrl.h" #include "llaccordionctrltab.h" @@ -232,11 +233,6 @@ void LLLandmarksPanel::onSelectionChange(LLInventorySubTreePanel* inventory_list deselectOtherThan(inventory_list); mCurrentSelectedList = inventory_list; } - - LLFolderViewItem* current_item = inventory_list->getRootFolder()->getCurSelectedItem(); - if (!current_item) - return; - updateVerbs(); } @@ -245,6 +241,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() // TODO: mantipov: update getting of selected item // TODO: bind to "i" button LLFolderViewItem* cur_item = mFavoritesInventoryPanel->getRootFolder()->getCurSelectedItem(); + if (!cur_item) return; LLFolderViewEventListener* listenerp = cur_item->getListener(); if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) @@ -333,6 +330,7 @@ void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data) if(isLandmarkSelected()) { LLFolderViewItem* cur_item = getCurSelectedItem(); + if (!cur_item) return; LLUUID id = cur_item->getListener()->getUUID(); LLInventoryItem* inv_item = mCurrentSelectedList->getModel()->getItem(id); doActionOnCurSelectedLandmark(boost::bind( @@ -367,6 +365,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() initLandmarksPanel(mFavoritesInventoryPanel); mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems"); + initAccordion("tab_favorites", mFavoritesInventoryPanel); } @@ -428,6 +427,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis } root_folder->setParentLandmarksPanel(this); + inventory_list->saveFolderState(); } void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list) @@ -758,7 +758,7 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { LLFolderViewItem* cur_item = getCurSelectedItem(); if(!cur_item) - return ; + return; std::string command_name = userdata.asString(); if("more_info" == command_name) { @@ -862,18 +862,18 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co // then ask LLFolderView permissions if (can_be_modified) { - LLFolderViewItem* selected = getCurSelectedItem(); + LLFolderViewItem* selected = getCurSelectedItem(); if ("cut" == command_name) { can_be_modified = mCurrentSelectedList->getRootFolder()->canCut(); } else if ("rename" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRenameable() : false; + can_be_modified = selected ? selected->getListener()->isItemRenameable() : false; } else if ("delete" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRemovable(): false; + can_be_modified = selected ? selected->getListener()->isItemRemovable(): false; } else if("paste" == command_name) { @@ -1030,21 +1030,30 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) ////////////////////////////////////////////////////////////////////////// static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string) { - // Open the immediate children of the root folder, since those - // are invisible in the UI and thus must always be open. - inventory_list->getRootFolder()->openTopLevelFolders(); - + // When search is cleared, restore the old folder state. if (string == "") { inventory_list->setFilterSubString(LLStringUtil::null); + // Re-open folders that were open before + inventory_list->restoreFolderState(); } + // Open the immediate children of the root folder, since those + // are invisible in the UI and thus must always be open. + inventory_list->getRootFolder()->openTopLevelFolders(); + if (inventory_list->getFilterSubString().empty() && string.empty()) { // current filter and new filter empty, do nothing return; } + // save current folder open state if no filter currently applied + if (inventory_list->getRootFolder()->getFilterSubString().empty()) + { + inventory_list->saveFolderState(); + } + // Set new filter string inventory_list->setFilterSubString(string); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a5bfa18851..a9c7b908ed 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -62,7 +62,6 @@ #include "llviewermenu.h" // for handle_preferences() #include "llviewernetwork.h" #include "llviewerwindow.h" // to link into child list -#include "llnotify.h" #include "llurlsimstring.h" #include "lluictrlfactory.h" #include "llhttpclient.h" @@ -249,7 +248,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("connect_btn", onClickConnect, this); - getChild<LLPanel>("login_widgets")->setDefaultBtn("connect_btn"); + getChild<LLPanel>("login")->setDefaultBtn("connect_btn"); std::string channel = gSavedSettings.getString("VersionChannelName"); std::string version = llformat("%s (%d)", @@ -273,6 +272,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // get the web browser control LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); + + // Clear the browser's cache to avoid any potential for the cache messing up the login screen. + web_browser->clearCache(); // Need to handle login secondlife:///app/ URLs web_browser->setTrusted( true ); @@ -677,12 +679,8 @@ void LLPanelLogin::refreshLocation( bool force_visible ) sInstance->childSetVisible("start_location_combo", show_start); sInstance->childSetVisible("start_location_text", show_start); -#if LL_RELEASE_FOR_DOWNLOAD BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); sInstance->childSetVisible("server_combo", show_server); -#else - sInstance->childSetVisible("server_combo", TRUE); -#endif #endif } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index cef21e85d6..961d3dec8b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -400,6 +400,7 @@ void LLPanelMainInventory::onClearSearch() mActivePanel->getRootFolder()->applyFunctorRecursively(opener); mActivePanel->getRootFolder()->scrollToShowSelection(); } + mFilterSubString = ""; } void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) @@ -417,6 +418,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) std::string uppercase_search_string = search_string; LLStringUtil::toUpper(uppercase_search_string); + mFilterSubString = uppercase_search_string; if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty()) { // current filter and new filter empty, do nothing @@ -431,7 +433,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // set new filter string - mActivePanel->setFilterSubString(uppercase_search_string); + mActivePanel->setFilterSubString(mFilterSubString); } @@ -484,6 +486,7 @@ void LLPanelMainInventory::onFilterSelected() { return; } + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); if (finder) @@ -530,11 +533,23 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } -void LLPanelMainInventory::changed(U32 mask) +// virtual +void LLPanelMainInventory::changed(U32) { + // empty, but must have this defined for abstract base class. } +// virtual +void LLPanelMainInventory::draw() +{ + if (mActivePanel && mFilterEditor) + { + mFilterEditor->setText(mFilterSubString); + } + LLPanel::draw(); +} + void LLPanelMainInventory::setFilterTextFromFilter() { mFilterText = mActivePanel->getFilter()->getFilterText(); @@ -1004,9 +1019,11 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } const LLUUID& item_id = current_item->getListener()->getUUID(); const std::string &item_name = current_item->getListener()->getName(); + mFilterSubString = item_name; LLInventoryFilter *filter = mActivePanel->getFilter(); filter->setFilterSubString(item_name); mFilterEditor->setText(item_name); + mFilterEditor->setFocus(TRUE); filter->setFilterUUID(item_id); filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 92443df369..69f8a14583 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -72,7 +72,8 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - /*virtual*/ void changed(U32 mask); + /*virtual*/ void changed(U32); + /*virtual*/ void draw(); LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } @@ -122,6 +123,7 @@ private: LLInventoryPanel* mActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; + std::string mFilterSubString; ////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 88eba14553..f574f55beb 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -67,7 +67,6 @@ const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://w //////////////////////////////////////////////////////////////////////////////// // LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : - mControls( NULL ), mAutoLoop( NULL ), mFirstClick( NULL ), mAutoZoom( NULL ), @@ -93,7 +92,6 @@ BOOL LLPanelMediaSettingsGeneral::postBuild() mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY ); mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY ); mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY ); - mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY ); mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY ); mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY ); @@ -211,7 +209,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) self->mAutoPlay->clear(); self->mAutoScale->clear(); self->mAutoZoom ->clear(); - self->mControls->clear(); self->mCurrentURL->clear(); self->mFirstClick->clear(); self->mHeightPixels->clear(); @@ -221,7 +218,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) self->mAutoPlay ->setEnabled(editable); self->mAutoScale ->setEnabled(editable); self->mAutoZoom ->setEnabled(editable); - self->mControls ->setEnabled(editable); self->mCurrentURL ->setEnabled(editable); self->mFirstClick ->setEnabled(editable); self->mHeightPixels ->setEnabled(editable); @@ -283,7 +279,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { LLMediaEntry::AUTO_PLAY_KEY, self->mAutoPlay, "LLCheckBoxCtrl" }, { LLMediaEntry::AUTO_SCALE_KEY, self->mAutoScale, "LLCheckBoxCtrl" }, { LLMediaEntry::AUTO_ZOOM_KEY, self->mAutoZoom, "LLCheckBoxCtrl" }, - { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" }, { LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLTextBox" }, { LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" }, { LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" }, @@ -416,7 +411,6 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue(); fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue(); fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue(); - fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex(); //Don't fill in current URL: this is only supposed to get changed via navigate // fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue(); diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index c6895b1dc9..5f90321362 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -37,7 +37,6 @@ class LLButton; class LLCheckBoxCtrl; -class LLComboBox; class LLLineEditor; class LLSpinCtrl; class LLTextureCtrl; @@ -90,7 +89,6 @@ private: void checkHomeUrlPassesWhitelist(); - LLComboBox* mControls; LLCheckBoxCtrl* mAutoLoop; LLCheckBoxCtrl* mFirstClick; LLCheckBoxCtrl* mAutoZoom; diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index 2f3f550e35..a23aed2e98 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -51,9 +51,11 @@ #include "llnamebox.h" #include "lltrans.h" #include "llfloatermediasettings.h" + //////////////////////////////////////////////////////////////////////////////// // LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() : + mControls( NULL ), mPermsOwnerInteract( 0 ), mPermsOwnerControl( 0 ), mPermsGroupName( 0 ), @@ -71,6 +73,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() : BOOL LLPanelMediaSettingsPermissions::postBuild() { // connect member vars with UI widgets + mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); mPermsOwnerInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_INTERACT_KEY ); mPermsOwnerControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_CONTROL_KEY ); mPermsGroupInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_GROUP_INTERACT_KEY ); @@ -123,19 +126,22 @@ void LLPanelMediaSettingsPermissions::draw() void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable) { LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata; + + self->mControls->clear(); self->mPermsOwnerInteract->clear(); self->mPermsOwnerControl->clear(); - self->mPermsGroupInteract ->clear(); + self->mPermsGroupInteract->clear(); self->mPermsGroupControl->clear(); - self->mPermsWorldInteract ->clear(); - self->mPermsWorldControl ->clear(); + self->mPermsWorldInteract->clear(); + self->mPermsWorldControl->clear(); + self->mControls->setEnabled(editable); self->mPermsOwnerInteract->setEnabled(editable); - self->mPermsOwnerControl ->setEnabled(editable); + self->mPermsOwnerControl->setEnabled(editable); self->mPermsGroupInteract->setEnabled(editable); - self->mPermsGroupControl ->setEnabled(editable); + self->mPermsGroupControl->setEnabled(editable); self->mPermsWorldInteract->setEnabled(editable); - self->mPermsWorldControl ->setEnabled(editable); + self->mPermsWorldControl->setEnabled(editable); } //////////////////////////////////////////////////////////////////////////////// @@ -175,6 +181,7 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me } data_set [] = { + { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" }, { LLPanelContents::PERMS_OWNER_INTERACT_KEY, self->mPermsOwnerInteract, "LLCheckBoxCtrl" }, { LLPanelContents::PERMS_OWNER_CONTROL_KEY, self->mPermsOwnerControl, "LLCheckBoxCtrl" }, { LLPanelContents::PERMS_GROUP_INTERACT_KEY, self->mPermsGroupInteract, "LLCheckBoxCtrl" }, @@ -194,27 +201,27 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me { if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" ) { - // the sense of the checkboxes changed and it made sense - // to just reverse their sense back again here and avoid - // changing server code. + // Most recent change to the "sense" of these checkboxes + // means the value in the checkbox matches that on the server static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )-> - setValue( ! media_settings[ base_key ].asBoolean() ); + setValue( media_settings[ base_key ].asBoolean() ); } else if ( data_set[ i ].ctrl_type == "LLComboBox" ) static_cast< LLComboBox* >( data_set[ i ].ctrl_ptr )-> setCurrentByIndex( media_settings[ base_key ].asInteger() ); + data_set[ i ].ctrl_ptr->setEnabled(editable); data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; + self->childSetEnabled("media_perms_label_owner", editable ); self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") ); self->childSetEnabled("media_perms_label_group", editable ); self->childSetText("media_perms_label_group", LLTrans::getString("Media Perms Group") ); self->childSetEnabled("media_perms_label_anyone", editable ); self->childSetText("media_perms_label_anyone", LLTrans::getString("Media Perms Anyone") ); - } //////////////////////////////////////////////////////////////////////////////// @@ -228,6 +235,9 @@ void LLPanelMediaSettingsPermissions::preApply() // void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in ) { + // moved over from the 'General settings' tab + fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex(); + // *NOTE: For some reason, gcc does not like these symbol references in the // expressions below (inside the static_casts). I have NO idea why :(. // For some reason, assigning them to const temp vars here fixes the link @@ -237,13 +247,13 @@ void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in ) const U8 group = LLMediaEntry::PERM_GROUP; const U8 anyone = LLMediaEntry::PERM_ANYONE; const LLSD::Integer control = static_cast<LLSD::Integer>( - (mPermsOwnerControl->getValue() ? none : owner ) | - (mPermsGroupControl->getValue() ? none : group ) | - (mPermsWorldControl->getValue() ? none : anyone )); + (mPermsOwnerControl->getValue() ? owner : none ) | + (mPermsGroupControl->getValue() ? group: none ) | + (mPermsWorldControl->getValue() ? anyone : none )); const LLSD::Integer interact = static_cast<LLSD::Integer>( - (mPermsOwnerInteract->getValue() ? none : owner ) | - (mPermsGroupInteract->getValue() ? none : group ) | - (mPermsWorldInteract->getValue() ? none : anyone )); + (mPermsOwnerInteract->getValue() ? owner: none ) | + (mPermsGroupInteract->getValue() ? group : none ) | + (mPermsWorldInteract->getValue() ? anyone : none )); fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control; fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact; } @@ -255,3 +265,5 @@ void LLPanelMediaSettingsPermissions::postApply() { // no-op } + + diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h index 45a596c615..bd0c3b8ab5 100644 --- a/indra/newview/llpanelmediasettingspermissions.h +++ b/indra/newview/llpanelmediasettingspermissions.h @@ -65,6 +65,7 @@ public: static void clearValues( void* userdata, bool editable); private: + LLComboBox* mControls; LLCheckBoxCtrl* mPermsOwnerInteract; LLCheckBoxCtrl* mPermsOwnerControl; LLNameBox* mPermsGroupName; diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index aea6b0aa3b..81842e3851 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -323,7 +323,7 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) else { row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon"; - row[ "columns" ][ ICON_COLUMN ][ "value" ] = "parcel_color_EXP"; + row[ "columns" ][ ICON_COLUMN ][ "value" ] = "Parcel_Exp_Color"; row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20; }; @@ -333,9 +333,6 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) // add to the white list scroll box mWhiteListList->addElement( row ); - - // update whitelist enable checkbox based on whether the home url passes the whitelist - updateWhitelistEnableStatus(); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index 937bfb1bf9..66ccb23f46 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -63,7 +63,9 @@ public: void setParent( LLFloaterMediaSettings* parent ); bool urlPassesWhiteList( const std::string& test_url ); const std::string makeValidUrl( const std::string& src_url ); - + + void updateWhitelistEnableStatus(); + protected: LLFloaterMediaSettings* mParent; @@ -78,8 +80,6 @@ private: LLScrollListCtrl* mWhiteListList; LLTextBox* mHomeUrlFailsWhiteListText; - void updateWhitelistEnableStatus(); - static void onBtnAdd(void*); static void onBtnDel(void*); }; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 4511bca23a..8e14074de1 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -56,7 +56,10 @@ #include "llmenugl.h" #include "llviewermenu.h" +#include "llviewercontrol.h" + static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); +bool LLPanelOutfitsInventory::sShowDebugEditor = false; LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mActivePanel(NULL), @@ -74,18 +77,24 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() // virtual BOOL LLPanelOutfitsInventory::postBuild() { - - initAccordionPanels(); + sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor"); + initTabPanels(); initListCommandsHandlers(); + return TRUE; } -void LLPanelOutfitsInventory::updateParent() +void LLPanelOutfitsInventory::updateVerbs() { if (mParent) { mParent->updateVerbs(); } + + if (mListCommands) + { + mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor); + } } void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) @@ -96,6 +105,7 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { + mFilterSubString = string; if (string == "") { mActivePanel->setFilterSubString(LLStringUtil::null); @@ -127,7 +137,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) mActivePanel->setFilterSubString(string); } -void LLPanelOutfitsInventory::onWear() +void LLPanelOutfitsInventory::onWearButtonClick() { LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); if (listenerp) @@ -167,7 +177,7 @@ void LLPanelOutfitsInventory::onNew() void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) { updateListCommands(); - updateParent(); + updateVerbs(); if (getRootFolder()->needsAutoRename() && items.size()) { getRootFolder()->startRenamingSelectedItem(); @@ -177,7 +187,6 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte void LLPanelOutfitsInventory::onSelectorButtonClicked() { - /* LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem(); LLFolderViewEventListener* listenerp = cur_item->getListener(); @@ -189,7 +198,6 @@ void LLPanelOutfitsInventory::onSelectorButtonClicked() LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); } - */ } LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() @@ -233,14 +241,17 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this)); mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); + mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); + mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); + + mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this - , _4 // BOOL drop - , _5 // EDragAndDropType cargo_type - , _7 // EAcceptance* accept - )); + , _4 // BOOL drop + , _5 // EDragAndDropType cargo_type + , _7 // EAcceptance* accept + )); mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action", boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2)); @@ -252,8 +263,10 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); + bool wear_enabled = isActionEnabled("wear"); mListCommands->childSetEnabled("trash_btn", trash_enabled); + mListCommands->childSetEnabled("wear_btn", wear_enabled); } void LLPanelOutfitsInventory::onGearButtonClick() @@ -308,7 +321,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) } if (command_name == "wear") { - onWear(); + onWearButtonClick(); } if (command_name == "add") { @@ -407,41 +420,45 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// -// Accordion // +// Tab panels // -void LLPanelOutfitsInventory::initAccordionPanels() +void LLPanelOutfitsInventory::initTabPanels() { - mAccordionPanels.resize(2); + mTabPanels.resize(2); LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel"); myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mAccordionPanels[0] = myoutfits_panel; + mTabPanels[0] = myoutfits_panel; mActivePanel = myoutfits_panel; + LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mAccordionPanels[1] = cof_panel; + mTabPanels[1] = cof_panel; - for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin(); - iter != mAccordionPanels.end(); + for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); + iter != mTabPanels.end(); ++iter) { LLInventoryPanel *panel = (*iter); - panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onAccordionSelectionChange, this, panel, _1, _2)); + panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); } + + mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); + mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); } -void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) +void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) { if (user_action && items.size() > 0) { - for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin(); - iter != mAccordionPanels.end(); + for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); + iter != mTabPanels.end(); ++iter) { LLInventoryPanel *panel = (*iter); - if (panel == accordion_panel) + if (panel == tab_panel) { mActivePanel = panel; } @@ -454,15 +471,28 @@ void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accor onSelectionChange(items, user_action); } +void LLPanelOutfitsInventory::onTabChange() +{ + mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); + if (!mActivePanel) + { + return; + } + mActivePanel->setFilterSubString(mFilterSubString); + + bool is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel"); + mListCommands->childSetEnabled("make_outfit_btn", is_my_outfits); +} + LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() { return mActivePanel; } -bool LLPanelOutfitsInventory::isAccordionPanel(LLInventoryPanel *panel) +bool LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) { - for(accordionpanels_vec_t::iterator it = mAccordionPanels.begin(); - it != mAccordionPanels.end(); + for(tabpanels_vec_t::iterator it = mTabPanels.begin(); + it != mTabPanels.end(); ++it) { if (*it == panel) diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index afeaef485d..1e084750a0 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -44,6 +44,7 @@ class LLSaveFolderState; class LLButton; class LLMenuGL; class LLSidepanelAppearance; +class LLTabContainer; class LLPanelOutfitsInventory : public LLPanel { @@ -54,7 +55,6 @@ public: /*virtual*/ BOOL postBuild(); void onSearchEdit(const std::string& string); - void onWear(); void onAdd(); void onRemove(); void onEdit(); @@ -71,29 +71,32 @@ public: LLFolderView* getRootFolder(); protected: - void updateParent(); + void updateVerbs(); bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; private: LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; + LLTabContainer* mAppearanceTabs; + std::string mFilterSubString; public: ////////////////////////////////////////////////////////////////////////////////// - // Accordion // + // tab panels LLInventoryPanel* getActivePanel(); - bool isAccordionPanel(LLInventoryPanel *panel); + bool isTabPanel(LLInventoryPanel *panel); protected: - void initAccordionPanels(); - void onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void initTabPanels(); + void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void onTabChange(); private: LLInventoryPanel* mActivePanel; - typedef std::vector<LLInventoryPanel *> accordionpanels_vec_t; - accordionpanels_vec_t mAccordionPanels; + typedef std::vector<LLInventoryPanel *> tabpanels_vec_t; + tabpanels_vec_t mTabPanels; - // Accordion // + // tab panels // //////////////////////////////////////////////////////////////////////////////// @@ -103,6 +106,7 @@ protected: void initListCommandsHandlers(); void updateListCommands(); void onGearButtonClick(); + void onWearButtonClick(); void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onTrashButtonClick(); @@ -116,6 +120,9 @@ private: LLMenuGL* mMenuAdd; // List Commands // //////////////////////////////////////////////////////////////////////////////// + /// +public: + static bool sShowDebugEditor; }; #endif //LL_LLPANELOUTFITSINVENTORY_H diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 5fb7dab7be..e134840153 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -586,6 +586,7 @@ BOOL LLPanelPeople::postBuild() registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); registrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2)); + enable_registrar.add("People.Group.Minus.Enable", boost::bind(&LLPanelPeople::isRealGroup, this)); enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); @@ -775,7 +776,7 @@ void LLPanelPeople::updateButtons() buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", multiple_selected && LLVoiceClient::voiceEnabled()); + buttonSetEnabled("call_btn", multiple_selected && canCall()); buttonSetEnabled("share_btn", item_selected); // not implemented yet bool none_group_selected = item_selected && selected_id.isNull(); @@ -783,6 +784,29 @@ void LLPanelPeople::updateButtons() buttonSetEnabled("chat_btn", !none_group_selected); } +bool LLPanelPeople::canCall() +{ + std::vector<LLUUID> selected_uuids; + getCurrentItemIDs(selected_uuids); + + bool result = false; + + std::vector<LLUUID>::const_iterator + id = selected_uuids.begin(), + uuids_end = selected_uuids.end(); + + for (;id != uuids_end; ++id) + { + if (LLAvatarActions::canCall(*id)) + { + result = true; + break; + } + } + + return result; +} + std::string LLPanelPeople::getActiveTabName() const { return mTabContainer->getCurrentPanel()->getName(); @@ -921,6 +945,11 @@ void LLPanelPeople::reSelectedCurrentTab() mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex()); } +bool LLPanelPeople::isRealGroup() +{ + return getCurrentItemID() != LLUUID::null; +} + void LLPanelPeople::onFilterEdit(const std::string& search_string) { std::string search_upper = search_string; diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index a9cc6d0ccb..f5cdc0935c 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -73,6 +73,7 @@ private: bool isFriendOnline(const LLUUID& id); bool isItemsFreeOfFriends(const std::vector<LLUUID>& uuids); + bool canCall(); void updateButtons(); std::string getActiveTabName() const; @@ -118,6 +119,8 @@ private: void onGroupsViewSortMenuItemClicked(const LLSD& userdata); void onRecentViewSortMenuItemClicked(const LLSD& userdata); + //returns false only if group is "none" + bool isRealGroup(); bool onFriendsViewSortMenuItemCheck(const LLSD& userdata); bool onRecentViewSortMenuItemCheck(const LLSD& userdata); bool onNearbyViewSortMenuItemCheck(const LLSD& userdata); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 04fe42de9f..0314642d9e 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -81,6 +81,14 @@ void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, LLMenuGL::showPopup(spawning_view, mMenu, x, y); } +void ContextMenu::hide() +{ + if(mMenu) + { + mMenu->hide(); + } +} + //== NearbyMenu =============================================================== LLContextMenu* NearbyMenu::createMenu() @@ -173,7 +181,25 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) const LLUUID& id = mUUIDs.front(); return LLAvatarActions::isFriend(id); } + else if (item == std::string("can_call")) + { + bool result = false; + int size = mUUIDs.size(); + std::cout << size << std::endl; + std::vector<LLUUID>::const_iterator + id = mUUIDs.begin(), + uuids_end = mUUIDs.end(); + for (;id != uuids_end; ++id) + { + if (LLAvatarActions::canCall(*id)) + { + result = true; + break; + } + } + return result; + } return false; } diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index ed0f8208f6..14ae2985f0 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -54,6 +54,8 @@ public: */ /*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y); + virtual void hide(); + protected: virtual LLContextMenu* createMenu() = 0; diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index 541361324a..839452d061 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -91,12 +91,19 @@ LLPanelPickInfo::LLPanelPickInfo() , mAvatarId(LLUUID::null) , mSnapshotCtrl(NULL) , mPickId(LLUUID::null) + , mParcelId(LLUUID::null) + , mRequestedId(LLUUID::null) { } LLPanelPickInfo::~LLPanelPickInfo() { LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); + + if (mParcelId.notNull()) + { + LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this); + } } void LLPanelPickInfo::onOpen(const LLSD& key) @@ -156,12 +163,14 @@ void LLPanelPickInfo::processProperties(void* data, EAvatarProcessorType type) return; } + mParcelId = pick_info->parcel_id; setSnapshotId(pick_info->snapshot_id); setPickName(pick_info->name); setPickDesc(pick_info->desc); setPosGlobal(pick_info->pos_global); - setPickLocation(createLocationText(pick_info->user_name, pick_info->original_name, - pick_info->sim_name, pick_info->pos_global)); + + // Send remote parcel info request to get parcel name and sim (region) name. + sendParcelInfoRequest(); // *NOTE dzaporozhan // We want to keep listening to APT_PICK_INFO because user may @@ -169,6 +178,17 @@ void LLPanelPickInfo::processProperties(void* data, EAvatarProcessorType type) // revomeObserver is called from onClickBack } +void LLPanelPickInfo::sendParcelInfoRequest() +{ + if (mParcelId != mRequestedId) + { + LLRemoteParcelInfoProcessor::getInstance()->addObserver(mParcelId, this); + LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(mParcelId); + + mRequestedId = mParcelId; + } +} + void LLPanelPickInfo::setExitCallback(const commit_callback_t& cb) { getChild<LLButton>("back_btn")->setClickedCallback(cb); @@ -176,21 +196,16 @@ void LLPanelPickInfo::setExitCallback(const commit_callback_t& cb) void LLPanelPickInfo::processParcelInfo(const LLParcelData& parcel_data) { - // HACK: Flag 0x2 == adult region, - // Flag 0x1 == mature region, otherwise assume PG - std::string rating_icon = "icon_event.tga"; - if (parcel_data.flags & 0x2) - { - rating_icon = "icon_event_adult.tga"; - } - else if (parcel_data.flags & 0x1) - { - rating_icon = "icon_event_mature.tga"; - } + setPickLocation(createLocationText(LLStringUtil::null, parcel_data.name, + parcel_data.sim_name, getPosGlobal())); - childSetValue("maturity", rating_icon); + // We have received parcel info for the requested ID so clear it now. + mRequestedId.setNull(); - //*NOTE we don't removeObserver(...) ourselves cause LLRemoveParcelProcessor does it for us + if (mParcelId.notNull()) + { + LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this); + } } void LLPanelPickInfo::setEditPickCallback(const commit_callback_t& cb) @@ -222,7 +237,8 @@ void LLPanelPickInfo::resetData() setPickId(LLUUID::null); setSnapshotId(LLUUID::null); mPosGlobal.clearVec(); - childSetValue("maturity", LLStringUtil::null); + mParcelId.setNull(); + mRequestedId.setNull(); } // static @@ -273,9 +289,6 @@ void LLPanelPickInfo::setPickDesc(const std::string& desc) void LLPanelPickInfo::setPickLocation(const std::string& location) { childSetValue(XML_LOCATION, location); - - //preserving non-wrapped text for info/edit modes switching - mLocation = location; } void LLPanelPickInfo::onClickMap() @@ -340,7 +353,7 @@ void LLPanelPickEdit::onOpen(const LLSD& key) setPosGlobal(gAgent.getPositionGlobal()); LLUUID parcel_id = LLUUID::null, snapshot_id = LLUUID::null; - std::string pick_name, pick_desc; + std::string pick_name, pick_desc, region_name; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if(parcel) @@ -351,21 +364,17 @@ void LLPanelPickEdit::onOpen(const LLSD& key) snapshot_id = parcel->getSnapshotID(); } - if(pick_name.empty()) + LLViewerRegion* region = gAgent.getRegion(); + if(region) { - LLViewerRegion* region = gAgent.getRegion(); - if(region) - { - pick_name = region->getName(); - } + region_name = region->getName(); } setParcelID(parcel_id); - childSetValue("pick_name", pick_name); + childSetValue("pick_name", pick_name.empty() ? region_name : pick_name); childSetValue("pick_desc", pick_desc); setSnapshotId(snapshot_id); - setPickLocation(createLocationText(LLStringUtil::null, SET_LOCATION_NOTICE, - pick_name, getPosGlobal())); + setPickLocation(createLocationText(SET_LOCATION_NOTICE, pick_name, region_name, getPosGlobal())); enableSaveButton(true); } @@ -394,8 +403,9 @@ void LLPanelPickEdit::setPickData(const LLPickData* pick_data) childSetValue("pick_name", pick_data->name); childSetValue("pick_desc", pick_data->desc); setSnapshotId(pick_data->snapshot_id); - setPickLocation(createLocationText(pick_data->user_name, pick_data->original_name, /*pick_data->sim_name,*/ - pick_data->name, pick_data->pos_global)); + setPosGlobal(pick_data->pos_global); + setPickLocation(createLocationText(LLStringUtil::null, pick_data->name, + pick_data->sim_name, pick_data->pos_global)); } BOOL LLPanelPickEdit::postBuild() @@ -519,14 +529,22 @@ void LLPanelPickEdit::onClickSetLocation() // Save location for later use. setPosGlobal(gAgent.getPositionGlobal()); + std::string parcel_name, region_name; + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel) { mParcelId = parcel->getID(); - mSimName = parcel->getName(); + parcel_name = parcel->getName(); } - setPickLocation(createLocationText( - LLStringUtil::null, SET_LOCATION_NOTICE, mSimName, getPosGlobal())); + + LLViewerRegion* region = gAgent.getRegion(); + if(region) + { + region_name = region->getName(); + } + + setPickLocation(createLocationText(SET_LOCATION_NOTICE, parcel_name, region_name, getPosGlobal())); mLocationChanged = true; enableSaveButton(TRUE); diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h index 2c0830f2ac..95add387d0 100644 --- a/indra/newview/llpanelpick.h +++ b/indra/newview/llpanelpick.h @@ -72,6 +72,11 @@ public: /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); /** + * Sends remote parcel info request to resolve parcel name from its ID. + */ + void sendParcelInfoRequest(); + + /** * Sets "Back" button click callback */ virtual void setExitCallback(const commit_callback_t& cb); @@ -81,9 +86,9 @@ public: */ virtual void setEditPickCallback(const commit_callback_t& cb); - //This stuff we got from LLRemoteParcelObserver, in the last two we intentionally do nothing + //This stuff we got from LLRemoteParcelObserver, in the last one we intentionally do nothing /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void setParcelID(const LLUUID& parcel_id) {}; + /*virtual*/ void setParcelID(const LLUUID& parcel_id) { mParcelId = parcel_id; } /*virtual*/ void setErrorStatus(U32 status, const std::string& reason) {}; protected: @@ -154,8 +159,7 @@ protected: LLVector3d mPosGlobal; LLUUID mParcelId; LLUUID mPickId; - std::string mSimName; - std::string mLocation; + LLUUID mRequestedId; }; /** diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 7d21867efc..4d22d96072 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -38,12 +38,14 @@ #include "llagentpicksinfo.h" #include "llavatarconstants.h" #include "llcommandhandler.h" +#include "lldispatcher.h" #include "llflatlistview.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llnotificationsutil.h" #include "lltexturectrl.h" #include "lltoggleablemenu.h" +#include "lltrans.h" #include "llviewergenericmessage.h" // send_generic_message #include "llmenugl.h" #include "llviewermenu.h" @@ -56,7 +58,6 @@ #include "llpanelprofile.h" #include "llpanelpick.h" #include "llpanelclassified.h" -#include "llpanelprofileview.h" #include "llsidetray.h" static const std::string XML_BTN_NEW = "new_btn"; @@ -87,6 +88,14 @@ public: bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) { + // handle app/classified/create urls first + if (params.size() == 1 && params[0].asString() == "create") + { + createClassified(); + return true; + } + + // then handle the general app/classified/{UUID}/{CMD} urls if (params.size() < 2) { return false; @@ -113,6 +122,31 @@ public: return false; } + void createClassified() + { + // open the new classified panel on the Me > Picks sidetray + LLSD params; + params["id"] = gAgent.getID(); + params["open_tab_name"] = "panel_picks"; + params["show_tab_panel"] = "create_classified"; + LLSideTray::getInstance()->showPanel("panel_me", params); + } + + void openClassified(LLAvatarClassifiedInfo* c_info) + { + // open the classified info panel on the Me > Picks sidetray + LLSD params; + params["id"] = c_info->creator_id; + params["open_tab_name"] = "panel_picks"; + params["show_tab_panel"] = "classified_details"; + params["classified_id"] = c_info->classified_id; + params["classified_avatar_id"] = c_info->creator_id; + params["classified_snapshot_id"] = c_info->snapshot_id; + params["classified_name"] = c_info->name; + params["classified_desc"] = c_info->description; + LLSideTray::getInstance()->showPanel("panel_profile_view", params); + } + /*virtual*/ void processProperties(void* data, EAvatarProcessorType type) { if (APT_CLASSIFIED_INFO != type) @@ -127,22 +161,8 @@ public: return; } - // open the people profile page for the classified's owner - LLSD params; - params["id"] = c_info->creator_id; - params["classified"] = c_info->classified_id; - params["open_tab_name"] = "panel_profile"; - LLPanelProfileView *profile = dynamic_cast<LLPanelProfileView*>(LLSideTray::getInstance()->showPanel("panel_profile_view", params)); - - // then open the classified panel on this user's profile panel - if (profile) - { - LLPanelPicks* panel_picks = profile->getChild<LLPanelPicks>("panel_picks"); - if (panel_picks) - { - panel_picks->openClassifiedInfo(c_info); - } - } + // open the detail side tray for this classified + openClassified(c_info); // remove our observer now that we're done mClassifiedIds.erase(c_info->classified_id); @@ -197,7 +217,9 @@ LLPanelPicks::LLPanelPicks() mClassifiedsAccTab(NULL), mPanelClassifiedInfo(NULL), mPanelClassifiedEdit(NULL), - mClickThroughDisp(NULL) + mClickThroughDisp(NULL), + mNoClassifieds(false), + mNoPicks(false) { mClickThroughDisp = new LLClassifiedClickThrough(); gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp); @@ -223,6 +245,11 @@ void LLPanelPicks::updateData() // Send Picks request only when we need to, not on every onOpen(during tab switch). if(isDirty()) { + mNoPicks = false; + mNoClassifieds = false; + + childSetValue("picks_panel_text", LLTrans::getString("PicksClassifiedsLoadingText")); + mPicksList->clear(); LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId()); @@ -283,6 +310,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) resetDirty(); updateButtons(); } + + mNoPicks = !mPicksList->size(); } else if(APT_CLASSIFIEDS == type) { @@ -316,9 +345,14 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) resetDirty(); updateButtons(); } + + mNoClassifieds = !mClassifiedsList->size(); + } + + if (mNoPicks && mNoClassifieds) + { + childSetValue("picks_panel_text", LLTrans::getString("NoPicksClassifiedsText")); } - if(!mPicksList->size() && !mClassifiedsList->size()) - childSetVisible("empty_picks_panel_text", true); } LLPickItem* LLPanelPicks::getSelectedPickItem() @@ -692,33 +726,24 @@ void LLPanelPicks::openClassifiedInfo() LLClassifiedItem* c_item = getSelectedClassifiedItem(); - createClassifiedInfoPanel(); - - LLSD params; - params["classified_id"] = c_item->getClassifiedId(); - params["avatar_id"] = c_item->getAvatarId(); - params["snapshot_id"] = c_item->getSnapshotId(); - params["name"] = c_item->getClassifiedName(); - params["desc"] = c_item->getDescription(); - - getProfilePanel()->openPanel(mPanelClassifiedInfo, params); + openClassifiedInfo(c_item->getClassifiedId(), c_item->getAvatarId(), + c_item->getSnapshotId(), c_item->getClassifiedName(), + c_item->getDescription()); } -void LLPanelPicks::openClassifiedInfo(LLAvatarClassifiedInfo *c_info) +void LLPanelPicks::openClassifiedInfo(const LLUUID &classified_id, + const LLUUID &avatar_id, + const LLUUID &snapshot_id, + const std::string &name, const std::string &desc) { - if (! c_info) - { - return; - } - createClassifiedInfoPanel(); LLSD params; - params["classified_id"] = c_info->classified_id; - params["avatar_id"] = c_info->creator_id; - params["snapshot_id"] = c_info->snapshot_id; - params["name"] = c_info->name; - params["desc"] = c_info->description; + params["classified_id"] = classified_id; + params["avatar_id"] = avatar_id; + params["snapshot_id"] = snapshot_id; + params["name"] = name; + params["desc"] = desc; getProfilePanel()->openPanel(mPanelClassifiedInfo, params); } diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 893a0c53a3..fd8a9e6938 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -86,9 +86,6 @@ public: // parent panels failed to work (picks related code was in my profile panel) void setProfilePanel(LLPanelProfile* profile_panel); - // display the info panel for the given classified - void openClassifiedInfo(LLAvatarClassifiedInfo *c_info); - protected: /*virtual*/void updateButtons(); @@ -120,6 +117,10 @@ private: void openPickInfo(); void openClassifiedInfo(); + void openClassifiedInfo(const LLUUID &classified_id, const LLUUID &avatar_id, + const LLUUID &snapshot_id, const std::string &name, + const std::string &desc); + friend class LLPanelProfile; void showAccordion(const std::string& name, bool show); @@ -156,6 +157,11 @@ private: LLAccordionCtrlTab* mClassifiedsAccTab; LLClassifiedClickThrough* mClickThroughDisp; + + //true if picks list is empty after processing picks + bool mNoPicks; + //true if classifieds list is empty after processing classifieds + bool mNoClassifieds; }; class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 71d763b562..6985b73200 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -40,6 +40,7 @@ #include "llsecondlifeurls.h" #include "llfloater.h" #include "llfloaterreg.h" +#include "llregionhandle.h" #include "llagent.h" #include "llviewerwindow.h" diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 6ba3790fe2..b80eb9db38 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -39,6 +39,8 @@ #include "llsecondlifeurls.h" #include "llsdutil_math.h" +#include "llregionhandle.h" +#include "message.h" #include "lliconctrl.h" #include "lltextbox.h" @@ -231,8 +233,10 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) if (!parcel_data.name.empty()) { + mParcelTitle = parcel_data.name; + mParcelName->setText(llformat("%s (%d, %d, %d)", - parcel_data.name.c_str(), region_x, region_y, region_z)); + mParcelTitle.c_str(), region_x, region_y, region_z)); } else { @@ -282,15 +286,12 @@ void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel) { - std::string name = mParcelName->getText(); - if (name.empty()) - { - name = mRegionName->getText(); - } + std::string region_name = mRegionName->getText(); LLPickData data; data.pos_global = pos_global; - data.name = name; + data.name = mParcelTitle.empty() ? region_name : mParcelTitle; + data.sim_name = region_name; data.desc = mDescEditor->getText(); data.snapshot_id = mSnapshotCtrl->getImageAssetID(); data.parcel_id = mParcelID; diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index b9bf92b534..7dfc7b2444 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -111,6 +111,7 @@ protected: LLUUID mParcelID; LLUUID mRequestedID; LLVector3 mPosRegion; + std::string mParcelTitle; // used for pick title without coordinates std::string mCurrentTitle; S32 mScrollingPanelMinHeight; S32 mScrollingPanelWidth; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 0c7cc9af38..402d50ba9c 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -35,6 +35,7 @@ #include "llpanelplaceprofile.h" #include "llparcel.h" +#include "message.h" #include "lliconctrl.h" #include "lllineeditor.h" diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index e21eb01da3..685104a8b1 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -54,6 +54,7 @@ #include "llavatarpropertiesprocessor.h" #include "llfloaterworldmap.h" #include "llinventorybridge.h" +#include "llinventoryobserver.h" #include "llinventorymodel.h" #include "lllandmarkactions.h" #include "lllandmarklist.h" @@ -62,6 +63,7 @@ #include "llpanelpick.h" #include "llpanelplaceprofile.h" #include "llpanelteleporthistory.h" +#include "llremoteparcelrequest.h" #include "llteleporthistorystorage.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" @@ -85,8 +87,10 @@ static void onSLURLBuilt(std::string& slurl); class LLPlacesParcelObserver : public LLParcelObserver { public: - LLPlacesParcelObserver(LLPanelPlaces* places_panel) - : mPlaces(places_panel) {} + LLPlacesParcelObserver(LLPanelPlaces* places_panel) : + LLParcelObserver(), + mPlaces(places_panel) + {} /*virtual*/ void changed() { @@ -101,8 +105,10 @@ private: class LLPlacesInventoryObserver : public LLInventoryObserver { public: - LLPlacesInventoryObserver(LLPanelPlaces* places_panel) - : mPlaces(places_panel) {} + LLPlacesInventoryObserver(LLPanelPlaces* places_panel) : + LLInventoryObserver(), + mPlaces(places_panel) + {} /*virtual*/ void changed(U32 mask) { @@ -114,6 +120,59 @@ private: LLPanelPlaces* mPlaces; }; +class LLPlacesRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver +{ +public: + LLPlacesRemoteParcelInfoObserver(LLPanelPlaces* places_panel) : + LLRemoteParcelInfoObserver(), + mPlaces(places_panel) + {} + + ~LLPlacesRemoteParcelInfoObserver() + { + // remove any in-flight observers + std::set<LLUUID>::iterator it; + for (it = mParcelIDs.begin(); it != mParcelIDs.end(); ++it) + { + const LLUUID &id = *it; + LLRemoteParcelInfoProcessor::getInstance()->removeObserver(id, this); + } + mParcelIDs.clear(); + } + + /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data) + { + if (mPlaces) + { + mPlaces->changedGlobalPos(LLVector3d(parcel_data.global_x, + parcel_data.global_y, + parcel_data.global_z)); + } + + mParcelIDs.erase(parcel_data.parcel_id); + LLRemoteParcelInfoProcessor::getInstance()->removeObserver(parcel_data.parcel_id, this); + } + /*virtual*/ void setParcelID(const LLUUID& parcel_id) + { + if (!parcel_id.isNull()) + { + mParcelIDs.insert(parcel_id); + LLRemoteParcelInfoProcessor::getInstance()->addObserver(parcel_id, this); + LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(parcel_id); + } + } + /*virtual*/ void setErrorStatus(U32 status, const std::string& reason) + { + llerrs << "Can't complete remote parcel request. Http Status: " + << status << ". Reason : " << reason << llendl; + } + +private: + std::set<LLUUID> mParcelIDs; + LLPanelPlaces* mPlaces; +}; + + static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places"); LLPanelPlaces::LLPanelPlaces() @@ -131,6 +190,7 @@ LLPanelPlaces::LLPanelPlaces() { mParcelObserver = new LLPlacesParcelObserver(this); mInventoryObserver = new LLPlacesInventoryObserver(this); + mRemoteParcelObserver = new LLPlacesRemoteParcelInfoObserver(this); gInventory.addObserver(mInventoryObserver); @@ -149,6 +209,7 @@ LLPanelPlaces::~LLPanelPlaces() delete mInventoryObserver; delete mParcelObserver; + delete mRemoteParcelObserver; } BOOL LLPanelPlaces::postBuild() @@ -239,7 +300,6 @@ void LLPanelPlaces::onOpen(const LLSD& key) mItem = NULL; isLandmarkEditModeOn = false; togglePlaceInfoPanel(TRUE); - updateVerbs(); if (mPlaceInfoType == AGENT_INFO_TYPE) { @@ -282,6 +342,10 @@ void LLPanelPlaces::onOpen(const LLSD& key) { LLUUID parcel_id = key["id"].asUUID(); mPlaceProfile->setParcelID(parcel_id); + + // query the server to get the global 3D position of this + // parcel - we need this for teleport/mapping functions. + mRemoteParcelObserver->setParcelID(parcel_id); } else { @@ -306,6 +370,8 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } + updateVerbs(); + LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); if (!parcel_mgr) return; @@ -837,6 +903,12 @@ void LLPanelPlaces::changedInventory(U32 mask) gInventory.removeObserver(mInventoryObserver); } +void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos) +{ + mPosGlobal = global_pos; + updateVerbs(); +} + void LLPanelPlaces::updateVerbs() { bool is_place_info_visible; @@ -853,6 +925,7 @@ void LLPanelPlaces::updateVerbs() bool is_agent_place_info_visible = mPlaceInfoType == AGENT_INFO_TYPE; bool is_create_landmark_visible = mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE; + bool have_3d_pos = ! mPosGlobal.isExactlyZero(); mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); @@ -862,7 +935,7 @@ void LLPanelPlaces::updateVerbs() mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); - mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn); + mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); mOverflowBtn->setEnabled(is_place_info_visible && !is_create_landmark_visible); if (is_place_info_visible) @@ -871,12 +944,12 @@ void LLPanelPlaces::updateVerbs() { // We don't need to teleport to the current location // so check if the location is not within the current parcel. - mTeleportBtn->setEnabled(!mPosGlobal.isExactlyZero() && + mTeleportBtn->setEnabled(have_3d_pos && !LLViewerParcelMgr::getInstance()->inAgentParcel(mPosGlobal)); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mTeleportBtn->setEnabled(TRUE); + mTeleportBtn->setEnabled(have_3d_pos); } } else diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 5f9aed6357..5ee8704992 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -47,6 +47,7 @@ class LLPanelPlacesTab; class LLParcelSelection; class LLPlacesInventoryObserver; class LLPlacesParcelObserver; +class LLRemoteParcelInfoObserver; class LLTabContainer; class LLToggleableMenu; @@ -65,6 +66,8 @@ public: void changedParcelSelection(); // Called on agent inventory change to find out when inventory gets usable. void changedInventory(U32 mask); + // Called when we receive the global 3D position of a parcel. + void changedGlobalPos(const LLVector3d &global_pos); void setItem(LLInventoryItem* item); @@ -112,6 +115,7 @@ private: LLPlacesInventoryObserver* mInventoryObserver; LLPlacesParcelObserver* mParcelObserver; + LLRemoteParcelInfoObserver* mRemoteParcelObserver; // Pointer to a landmark item or to a linked landmark LLPointer<LLInventoryItem> mItem; diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 3fe51106e4..5cc9c1951b 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -57,6 +57,7 @@ #include "llsliderctrl.h" #include "llstring.h" #include "llviewercontrol.h" +#include "llviewerdisplay.h" #include "llviewerparcelmgr.h" #include "llviewermedia.h" #include "llviewermediafocus.h" @@ -66,8 +67,11 @@ #include "llfloatertools.h" // to enable hide if build tools are up +// Functions pulled from pipeline.cpp glh::matrix4f glh_get_current_modelview(); glh::matrix4f glh_get_current_projection(); +// Functions pulled from llviewerdisplay.cpp +bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model); // Warning: make sure these two match! const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM }; @@ -92,7 +96,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mTargetObjectNormal(LLVector3::zero), mZoomObjectID(LLUUID::null), mZoomObjectFace(0), - mVolumeSliderVisible(false) + mVolumeSliderVisible(0) { mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -112,6 +116,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this)); mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this)); @@ -368,8 +373,8 @@ void LLPanelPrimMediaControls::updateShape() mVolumeUpCtrl->setVisible(has_focus); mVolumeDownCtrl->setVisible(has_focus); mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible); - mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible); + mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible > 0); + mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible > 0); mWhitelistIcon->setVisible(false); mSecureLockIcon->setVisible(false); @@ -564,9 +569,6 @@ void LLPanelPrimMediaControls::updateShape() // // Calculate position and shape of the controls // - LLVector3 min, max; - - glh::matrix4f mat = glh_get_current_projection()*glh_get_current_modelview(); std::vector<LLVector3>::iterator vert_it; std::vector<LLVector3>::iterator vert_end; std::vector<LLVector3> vect_face; @@ -603,8 +605,18 @@ void LLPanelPrimMediaControls::updateShape() vert_it = vect_face.begin(); vert_end = vect_face.end(); - min = LLVector3(1,1,1); - max = LLVector3(-1,-1,-1); + glh::matrix4f mat; + if (!is_hud) + { + mat = glh_get_current_projection() * glh_get_current_modelview(); + } + else { + glh::matrix4f proj, modelview; + if (get_hud_matrices(proj, modelview)) + mat = proj * modelview; + } + LLVector3 min = LLVector3(1,1,1); + LLVector3 max = LLVector3(-1,-1,-1); for(; vert_it != vert_end; ++vert_it) { // project silhouette vertices into screen space @@ -633,10 +645,15 @@ void LLPanelPrimMediaControls::updateShape() media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight; // keep all parts of HUD on-screen - media_controls_rect.intersectWith(getParent()->getLocalRect()); + LLRect window_rect = getParent()->getLocalRect(); + media_controls_rect.intersectWith(window_rect); - // clamp to minimum size, keeping centered - media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(), + // clamp to minimum size, keeping rect inside window + S32 centerX = media_controls_rect.getCenterX(); + S32 centerY = media_controls_rect.getCenterY(); + window_rect.stretch(-mMinWidth/2, -mMinHeight/2); + window_rect.clampPointToRect(centerX, centerY); + media_controls_rect.setCenterAndSize(centerX, centerY, llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight())); setShape(media_controls_rect, true); @@ -698,7 +715,7 @@ void LLPanelPrimMediaControls::draw() setVisible(FALSE); mClearFaceOnFade = false; - mVolumeSliderVisible = false; + mVolumeSliderVisible = 0; mTargetImplID = LLUUID::null; mTargetObjectID = LLUUID::null; mTargetObjectFace = 0; @@ -1251,5 +1268,11 @@ void LLPanelPrimMediaControls::onToggleMute() void LLPanelPrimMediaControls::showVolumeSlider() { - mVolumeSliderVisible = true; + mVolumeSliderVisible++; +} + + +void LLPanelPrimMediaControls::hideVolumeSlider() +{ + mVolumeSliderVisible--; } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 17e65b8b0c..d899ee4473 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -110,6 +110,7 @@ private: void onCommitVolumeSlider(); void onToggleMute(); void showVolumeSlider(); + void hideVolumeSlider(); static void onScrollUp(void* user_data); static void onScrollUpHeld(void* user_data); @@ -204,7 +205,7 @@ private: LLUUID mZoomObjectID; S32 mZoomObjectFace; - bool mVolumeSliderVisible; + S32 mVolumeSliderVisible; }; #endif // LL_PANELPRIMMEDIACONTROLS_H diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 3274820174..c73ade53c8 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -144,6 +144,7 @@ BOOL LLPanelProfile::postBuild() void LLPanelProfile::onOpen(const LLSD& key) { + // open the desired panel if (key.has("open_tab_name")) { getTabContainer()[PANEL_PICKS]->onClosePanel(); @@ -155,6 +156,33 @@ void LLPanelProfile::onOpen(const LLSD& key) { getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId()); } + + // support commands to open further pieces of UI + if (key.has("show_tab_panel")) + { + std::string panel = key["show_tab_panel"].asString(); + if (panel == "create_classified") + { + LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); + if (picks) + { + picks->createNewClassified(); + } + } + else if (panel == "classified_details") + { + LLUUID classified_id = key["classified_id"].asUUID(); + LLUUID avatar_id = key["classified_avatar_id"].asUUID(); + LLUUID snapshot_id = key["classified_snapshot_id"].asUUID(); + std::string name = key["classified_name"].asString(); + std::string desc = key["classified_desc"].asString(); + LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); + if (picks) + { + picks->openClassifiedInfo(classified_id, avatar_id, snapshot_id, name, desc); + } + } + } } //*TODO redo panel toggling diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 43f80f6d6a..596bd2909a 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -505,7 +505,7 @@ void LLTeleportHistoryPanel::refresh() tab->setVisible(true); // Expand all accordion tabs when filtering - if(!mFilterSubString.empty()) + if(!sFilterSubString.empty()) { tab->setDisplayChildren(true); } @@ -521,7 +521,7 @@ void LLTeleportHistoryPanel::refresh() if (curr_flat_view) { - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString); + LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, sFilterSubString); curr_flat_view->addItem(item); if (mLastSelectedItemIndex == mCurrentItem) @@ -569,7 +569,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below &mContextMenu, history_items[history_items.size() - 1].mTitle, // Most recent item, it was - mFilterSubString); + sFilterSubString); // added instead of removed fv->addItem(item, LLUUID::null, ADD_TOP); diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index f646fea355..0c0f891f32 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -109,7 +109,6 @@ private: S32 mLastSelectedItemIndex; bool mDirty; S32 mCurrentItem; - std::string mFilterSubString; typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t; item_containers_t mItemContainers; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 48a7a32a3b..afb9892d12 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -42,21 +42,27 @@ #include "llavatarlist.h" #include "llspeakers.h" #include "llviewermenu.h" +#include "llvoiceclient.h" //LLParticipantList retrieves add, clear and remove events and updates view accordingly #if LL_MSVC #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif + +static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; + LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), mSortOrder(E_SORT_BY_NAME) , mParticipantListMenu(NULL) +, mExcludeAgent(true) { mSpeakerAddListener = new SpeakerAddListener(*this); mSpeakerRemoveListener = new SpeakerRemoveListener(*this); mSpeakerClearListener = new SpeakerClearListener(*this); mSpeakerModeratorListener = new SpeakerModeratorUpdateListener(*this); + mSpeakerMuteListener = new SpeakerMuteListener(*this); mSpeakerMgr->addListener(mSpeakerAddListener, "add"); mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); @@ -87,12 +93,15 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { const LLPointer<LLSpeaker>& speakerp = *it; + addAvatarIDExceptAgent(group_members, speakerp->mID); if ( speakerp->mIsModerator ) { mModeratorList.insert(speakerp->mID); } } + // we need to exclude agent id for non group chat + mExcludeAgent = !gAgent.isInGroup(mSpeakerMgr->getSessionID()); mAvatarList->setDirty(true); sort(); } @@ -103,8 +112,19 @@ LLParticipantList::~LLParticipantList() mAvatarListRefreshConnection.disconnect(); mAvatarListReturnConnection.disconnect(); - delete mParticipantListMenu; - mParticipantListMenu = NULL; + // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() + // See ticket EXT-3427 + // hide menu before deleting it to stop enable and check handlers from triggering. + if(mParticipantListMenu && !LLApp::isExiting()) + { + mParticipantListMenu->hide(); + } + + if (mParticipantListMenu) + { + delete mParticipantListMenu; + mParticipantListMenu = NULL; + } } void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible) @@ -184,6 +204,27 @@ void LLParticipantList::setSortOrder(EParticipantSortOrder order) } } +void LLParticipantList::refreshVoiceState() +{ + LLSpeakerMgr::speaker_list_t speakers; + mSpeakerMgr->getSpeakerList(&speakers, TRUE); + + for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); + iter != speakers.end(); ++iter) + { + LLSpeaker* speakerp = (*iter).get(); + const LLUUID& speaker_id = speakerp->mID; + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*> (mAvatarList->getItemByValue(speaker_id)); + if ( item ) + { + // if voice is disabled for this speaker show non voice speakers as disabled + bool is_in_voice = speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE + && speakerp->mStatus != LLSpeaker::STATUS_MUTED; + item->setOnline(!is_in_voice); + } + } +} + bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); @@ -248,6 +289,24 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e return true; } +bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource(); + if (speakerp.isNull()) return false; + + // update UI on confirmation of moderator mutes + if (event->getValue().asString() == "voice") + { + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mAvatarList->getItemByValue(speakerp->mID)); + if (item) + { + LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator"); + indicator->setIsMuted(speakerp->mModeratorMutedVoice); + } + } + return true; +} + void LLParticipantList::sort() { if ( !mAvatarList ) @@ -256,7 +315,16 @@ void LLParticipantList::sort() // TODO: Implement more sorting orders after specs updating (EM) switch ( mSortOrder ) { case E_SORT_BY_NAME : - mAvatarList->sortByName(); + // if mExcludeAgent == true , then no need to keep agent on top of the list + if(mExcludeAgent) + { + mAvatarList->sortByName(); + } + else + { + mAvatarList->setComparator(&AGENT_ON_TOP_NAME_COMPARATOR); + mAvatarList->sort(); + } break; default : llwarns << "Unrecognized sort order for " << mAvatarList->getName() << llendl; @@ -264,13 +332,21 @@ void LLParticipantList::sort() } } -// static void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id) { - if (gAgent.getID() != avatar_id) - { - existing_list.push_back(avatar_id); - } + if (mExcludeAgent && gAgent.getID() == avatar_id) return; + + existing_list.push_back(avatar_id); + adjustParticipant(avatar_id); +} + +void LLParticipantList::adjustParticipant(const LLUUID& speaker_id) +{ + LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id); + if (speakerp.isNull()) return; + + // add listener to process moderation changes + speakerp->addListener(mSpeakerMuteListener); } // @@ -315,6 +391,11 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL return mParent.onModeratorUpdateEvent(event, userdata); } +bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onSpeakerMuteEvent(event, userdata); +} + LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() { // set up the callbacks for all of the avatar menu items @@ -324,14 +405,27 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2)); registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2)); + registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, mUUIDs.front())); + registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, mUUIDs.front())); + registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs.front())); + registrar.add("Avatar.BlockUnblock", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteVoice, this, _2)); + registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, mUUIDs.front())); + registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs.front())); + registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, mUUIDs.front())); + registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2)); enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI - return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + + main_menu->setItemVisible("Moderator Options", isGroupModerator()); + main_menu->arrangeAndClear(); + + return main_menu; } void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) @@ -341,7 +435,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const if (uuids.size() == 0) return; const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat); + BOOL is_muted = isMuted(speaker_id); if (is_muted) { @@ -353,64 +447,17 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } - } void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) { - const LLUUID speaker_id = mUUIDs.front(); - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLSD data; - data["method"] = "mute update"; - data["session-id"] = mParent.mSpeakerMgr->getSessionID(); - data["params"] = LLSD::emptyMap(); - data["params"]["agent_id"] = speaker_id; - data["params"]["mute_info"] = LLSD::emptyMap(); - //current value represents ability to type, so invert - data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText; - - class MuteTextResponder : public LLHTTPClient::Responder + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) { - public: - MuteTextResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_moderator", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic", - mSessionID); - } - } - } - - private: - LLUUID mSessionID; - }; - - LLHTTPClient::post( - url, - data, - new MuteTextResponder(mParent.mSpeakerMgr->getSessionID())); + const LLUUID speaker_id = mUUIDs.front(); + mgr->toggleAllowTextChat(speaker_id); + } } void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) @@ -450,36 +497,59 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd toggleMute(userdata, LLMute::flagVoiceChat); } -void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) +bool LLParticipantList::LLParticipantListMenu::isGroupModerator() { + // Agent is in Group Call + if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID())) + { + // Agent is Moderator + return mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; + } + return false; +} +bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id) +{ + LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); + if (!selected_speakerp) return true; + + return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED; } -void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata) + +void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) { - LLSpeakerMgr::speaker_list_t speakers; - mParent.mSpeakerMgr->getSpeakerList(&speakers, true); + if (!gAgent.getRegion()) return; - const LLUUID& excluded_avatar_id = mUUIDs.front(); - bool should_mute = userdata.asString() == "mute"; - for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); - iter != speakers.end(); ++iter) - { - LLSpeaker* speakerp = (*iter).get(); - LLUUID speaker_id = speakerp->mID; - if (excluded_avatar_id == speaker_id) continue; + bool moderate_selected = userdata.asString() == "selected"; + const LLUUID& selected_avatar_id = mUUIDs.front(); + bool is_muted = isMuted(selected_avatar_id); - LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + if (moderate_selected) + { + moderateVoiceParticipant(selected_avatar_id, is_muted); + } + else + { + moderateVoiceOtherParticipants(selected_avatar_id, is_muted); + } +} - if (should_mute) - { - LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat); - } - else - { - LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat); - } +void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) + { + mgr->moderateVoiceParticipant(avatar_id, unmute); } +} +void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) +{ + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) + { + mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); + } } bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) @@ -492,9 +562,35 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_allow_text_chat" || "can_moderate_voice" == item) { - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID()); - return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; + return isGroupModerator(); } + else if (item == std::string("can_add")) + { + // We can add friends if: + // - there are selected people + // - and there are no friends among selection yet. + + bool result = (mUUIDs.size() > 0); + + std::vector<LLUUID>::const_iterator + id = mUUIDs.begin(), + uuids_end = mUUIDs.end(); + + for (;id != uuids_end; ++id) + { + if ( LLAvatarActions::isFriend(*id) ) + { + result = false; + break; + } + } + return result; + } + else if (item == "can_call") + { + return LLVoiceClient::voiceEnabled(); + } + return true; } @@ -502,17 +598,26 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& { std::string item = userdata.asString(); const LLUUID& id = mUUIDs.front(); + if (item == "is_muted") - return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat); - else - if (item == "is_allowed_text_chat") - { - LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id); + { + return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat); + } + else if (item == "is_allowed_text_chat") + { + LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id); - if (selected_speakerp.notNull()) - { - return !selected_speakerp->mModeratorMutedText; - } + if (selected_speakerp.notNull()) + { + return !selected_speakerp->mModeratorMutedText; } + } + else if(item == "is_blocked") + { + return LLMuteList::getInstance()->isMuted(id, LLMute::flagVoiceChat); + } + return false; } + +//EOF diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 83191a5b8d..72c413d188 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -52,10 +52,16 @@ class LLParticipantList } EParticipantSortOrder; /** - * Set and sort Avatarlist by given order - */ + * Set and sort Avatarlist by given order + */ void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); + /** + * Refreshes participants to display ones not in voice as disabled. + * TODO: mantipov: probably should be moved into derived class for LLFloaterCall + */ + void refreshVoiceState(); + protected: /** * LLSpeakerMgr event handlers @@ -64,6 +70,7 @@ class LLParticipantList bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); /** * Sorts the Avatarlist by stored order @@ -109,6 +116,14 @@ class LLParticipantList /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; + class SpeakerMuteListener : public BaseSpeakerListner + { + public: + SpeakerMuteListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} + + /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + }; + /** * Menu used in the participant list. */ @@ -129,9 +144,55 @@ class LLParticipantList void toggleMuteText(const LLSD& userdata); void toggleMuteVoice(const LLSD& userdata); + /** + * Return true if Agent is group moderator(and moderator of group call). + */ + bool isGroupModerator(); + // Voice moderation support + /** + * Check whether specified by argument avatar is muted for group chat or not. + */ + bool isMuted(const LLUUID& avatar_id); + + /** + * Processes Voice moderation menu items. + * + * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on + * passed parameter. + * + * @param userdata can be "selected" or "others". + * + * @see moderateVoiceParticipant() + * @see moderateVoiceOtherParticipants() + */ void moderateVoice(const LLSD& userdata); - void moderateVoiceOtherParticipants(const LLSD& userdata); + + /** + * Mutes/Unmutes avatar for current group voice chat. + * + * It only marks avatar as muted for session and does not use local Agent's Block list. + * It does not mute Agent itself. + * + * @param[in] avatar_id UUID of avatar to be processed + * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. + * + * @see moderateVoiceOtherParticipants() + */ + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + + /** + * Mutes/Unmutes all avatars except specified for current group voice chat. + * + * It only marks avatars as muted for session and does not use local Agent's Block list. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. + * + * @see moderateVoiceParticipant() + */ + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); }; private: @@ -140,8 +201,18 @@ class LLParticipantList /** * Adds specified avatar ID to the existing list if it is not Agent's ID + * + * @param[in, out] existing_list - vector with avatars' UUIDs already in the list + * @param[in] avatar_id - Avatar UUID to be added into the list */ - static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id); + void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id); + + /** + * Adjusts passed participant to work properly. + * + * Adds SpeakerMuteListener to process moderation actions. + */ + void adjustParticipant(const LLUUID& speaker_id); LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; @@ -153,10 +224,17 @@ class LLParticipantList LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener; LLPointer<SpeakerClearListener> mSpeakerClearListener; LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener; + LLPointer<SpeakerMuteListener> mSpeakerMuteListener; LLParticipantListMenu* mParticipantListMenu; EParticipantSortOrder mSortOrder; + /* + * This field manages an adding a new avatar_id in the mAvatarList + * If true, then agent_id wont be added into mAvatarList + * Also by default this field is controlling a sort procedure, @c sort() + */ + bool mExcludeAgent; // boost::connections boost::signals2::connection mAvatarListDoubleClickConnection; diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index c95882931b..0b0c03e9e9 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -150,6 +150,13 @@ void LLPreview::onCommit() LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->setDescription(childGetText("desc")); + + std::string new_name = childGetText("name"); + if ( (new_item->getName() != new_name) && !new_name.empty()) + { + new_item->rename(childGetText("name")); + } + if(mObjectUUID.notNull()) { // must be in an object diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 30cb21c83c..2a40cbaba0 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -59,7 +59,6 @@ #include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llradiogroup.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" @@ -495,6 +494,10 @@ BOOL LLPreviewGesture::postBuild() childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); + + childSetCommitCallback("name", LLPreview::onText, this); + childSetText("name", item->getName()); + childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe); } return LLPreview::postBuild(); diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 9d26539453..19fa1dcc37 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -33,8 +33,9 @@ #ifndef LL_LLPREVIEWGESTURE_H #define LL_LLPREVIEWGESTURE_H -#include "llpreview.h" +#include "llassettype.h" #include "llmultigesture.h" +#include "llpreview.h" class LLMultiGesture; class LLLineEditor; @@ -46,6 +47,7 @@ class LLScrollListItem; class LLButton; class LLGestureStep; class LLRadioGroup; +class LLVFS; class LLPreviewGesture : public LLPreview { diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 5d675fcda6..95756ac5f3 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -44,7 +44,6 @@ #include "llinventorymodel.h" #include "lllineeditor.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "roles_constants.h" #include "llscrollbar.h" diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 8d80310769..646c9fb6a4 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -61,7 +61,6 @@ #include "llvfile.h" #include "llagent.h" -#include "llnotify.h" #include "llmenugl.h" #include "roles_constants.h" #include "llselectmgr.h" diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 28a409d3ee..9d194c5557 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -51,6 +51,7 @@ struct LLEntryAndEdCore; class LLMenuBarGL; class LLFloaterScriptSearch; class LLKeywordToken; +class LLVFS; class LLViewerInventoryItem; // Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 26694ac433..26368fb0a8 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -422,8 +422,8 @@ void LLPreviewTexture::updateDimensions() if (mShowKeepDiscard || mCopyToInv) { //mCopyToInvBtn // add space for buttons - view_height += BTN_HEIGHT + CLIENT_RECT_VPAD; - button_height = BTN_HEIGHT + PREVIEW_PAD; + view_height += (BTN_HEIGHT + CLIENT_RECT_VPAD) * 3; + button_height = (BTN_HEIGHT + PREVIEW_PAD) * 3; } view_width = llmax(view_width, getMinWidth()); diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h index 3a16e25ef6..c04f6b1858 100644 --- a/indra/newview/llremoteparcelrequest.h +++ b/indra/newview/llremoteparcelrequest.h @@ -38,6 +38,7 @@ #include "llhttpclient.h" #include "llpanel.h" +class LLMessageSystem; class LLRemoteParcelInfoObserver; class LLRemoteParcelRequestResponder : public LLHTTPClient::Responder diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index f66f725070..bd256ec9c2 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -151,21 +151,49 @@ LLScreenChannel::~LLScreenChannel() } +std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher) +{ + std::list<LLToast*> res; + + // collect stored toasts + for (std::vector<ToastElem>::iterator it = mStoredToastList.begin(); it + != mStoredToastList.end(); it++) + { + if (matcher.matches(it->toast->getNotification())) + { + res.push_back(it->toast); + } + } + + // collect displayed toasts + for (std::vector<ToastElem>::iterator it = mToastList.begin(); it + != mToastList.end(); it++) + { + if (matcher.matches(it->toast->getNotification())) + { + res.push_back(it->toast); + } + } + + return res; +} + //-------------------------------------------------------------------------- void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { S32 right_delta = old_world_rect.mRight - new_world_rect.mRight; LLRect this_rect = getRect(); - this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); switch(mChannelAlignment) { case CA_LEFT : + this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); break; case CA_CENTRE : - this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); - break; + LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect); + return; case CA_RIGHT : + this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); this_rect.mLeft -= right_delta; this_rect.mRight -= right_delta; } @@ -375,6 +403,16 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) } } +void LLScreenChannel::killMatchedToasts(const Matcher& matcher) +{ + std::list<LLToast*> to_delete = findToasts(matcher); + for (std::list<LLToast*>::iterator it = to_delete.begin(); it + != to_delete.end(); it++) + { + killToastByNotificationID((*it)-> getNotificationID()); + } +} + //-------------------------------------------------------------------------- void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) { @@ -776,17 +814,19 @@ void LLScreenChannel::updateShowToastsState() return; } - // *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow? - // See EXT-3081 for details // for Message Well floater showed in a docked state - adjust channel's height - if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater)) + if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater) + || dynamic_cast<LLScriptFloater*>(floater)) { S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");; LLRect this_rect = getRect(); if(floater->getVisible() && floater->isDocked()) { channel_bottom += floater->getRect().getHeight(); - channel_bottom += floater->getDockControl()->getTongueHeight(); + if(floater->getDockControl()) + { + channel_bottom += floater->getDockControl()->getTongueHeight(); + } } if(channel_bottom != this_rect.mBottom) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index b8efbb148f..321fb244a1 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -151,6 +151,16 @@ public: LLScreenChannel(LLUUID& id); virtual ~LLScreenChannel(); + class Matcher + { + public: + Matcher(){} + virtual ~Matcher() {} + virtual bool matches(const LLNotificationPtr) const = 0; + }; + + std::list<LLToast*> findToasts(const Matcher& matcher); + // Channel's outfit-functions // update channel's size and position in the World View void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect); @@ -162,6 +172,7 @@ public: void addToast(const LLToast::Params& p); // kill or modify a toast by its ID void killToastByNotificationID(LLUUID id); + void killMatchedToasts(const Matcher& matcher); void modifyToastByNotificationID(LLUUID id, LLPanel* panel); // hide all toasts from screen, but not remove them from a channel void hideToastsFromScreen(); diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 5c4f6e8860..1962d871a6 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -66,6 +66,7 @@ LLScriptFloater::LLScriptFloater(const LLSD& key) : LLDockableFloater(NULL, true, key) , mScriptForm(NULL) { + setMouseDownCallback(boost::bind(&LLScriptFloater::onMouseDown, this)); } bool LLScriptFloater::toggle(const LLUUID& object_id) @@ -180,6 +181,23 @@ void LLScriptFloater::setVisible(BOOL visible) hideToastsIfNeeded(); } +void LLScriptFloater::onMouseDown() +{ + if(getObjectId().notNull()) + { + // Remove new message icon + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getObjectId()); + if (chiclet == NULL) + { + llerror("Dock chiclet for LLScriptFloater doesn't exist", 0); + } + else + { + chiclet->setShowNewMessagesIcon(false); + } + } +} + void LLScriptFloater::hideToastsIfNeeded() { using namespace LLNotificationsUI; @@ -191,6 +209,7 @@ void LLScriptFloater::hideToastsIfNeeded() if(channel) { channel->updateShowToastsState(); + channel->redrawToasts(); } } @@ -217,11 +236,18 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) script_notification_map_t::iterator it = mNotifications.find(object_id); if(it != mNotifications.end()) { + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(object_id); + if(chiclet) + { + // Pass the new_message icon state further. + set_new_message = chiclet->getShowNewMessagesIcon(); + } + LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->second.notification_id); if(floater) { - // Generate chiclet with a "new message" indicator if a docked window was opened. See EXT-3142. - set_new_message = floater->isShown(); + // Generate chiclet with a "new message" indicator if a docked window was opened but not in focus. See EXT-3142. + set_new_message |= !floater->hasFocus(); } onRemoveNotification(it->second.notification_id); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 95ec5a4d9c..ed10dc5fe9 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -169,6 +169,11 @@ protected: */ static void hideToastsIfNeeded(); + /** + * Removes chiclets new messages icon + */ + void onMouseDown(); + private: LLToastNotifyPanel* mScriptForm; LLUUID mObjectId; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 44930f03c5..60a095506b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2277,6 +2277,26 @@ BOOL LLSelectMgr::selectGetAllValid() return TRUE; } +//----------------------------------------------------------------------------- +// selectGetAllValidAndObjectsFound() - return TRUE if selections are +// valid and objects are found. +// +// For EXT-3114 - same as selectGetModify() without the modify check. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + } + return TRUE; +} //----------------------------------------------------------------------------- // selectGetModify() - return TRUE if current agent can modify all @@ -3494,7 +3514,7 @@ void LLSelectMgr::deselectAllIfTooFar() // HACK: Don't deselect when we're navigating to rate an object's // owner or creator. JC - if (gPieObject->getVisible() || gPieRate->getVisible() ) + if (gMenuObject->getVisible()) { return; } @@ -5493,11 +5513,15 @@ void dialog_refresh_all() gFloaterTools->dirty(); - gPieObject->needsArrange(); + gMenuObject->needsArrange(); - if( gPieAttachment->getVisible() ) + if( gMenuAttachmentSelf->getVisible() ) + { + gMenuAttachmentSelf->arrange(); + } + if( gMenuAttachmentOther->getVisible() ) { - gPieAttachment->arrange(); + gMenuAttachmentOther->arrange(); } LLFloaterProperties::dirtyAll(); diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 6641be335a..f8ecfd0674 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -535,6 +535,7 @@ public: // Returns TRUE if the viewer has information on all selected objects BOOL selectGetAllRootsValid(); BOOL selectGetAllValid(); + BOOL selectGetAllValidAndObjectsFound(); // returns TRUE if you can modify all selected objects. BOOL selectGetRootsModify(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index eb3695a371..30b0075c4b 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -113,9 +113,6 @@ BOOL LLSidepanelAppearance::postBuild() mEditAppearanceBtn = getChild<LLButton>("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); - mWearBtn = getChild<LLButton>("wear_btn"); - mWearBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onWearButtonClicked, this)); - mEditBtn = getChild<LLButton>("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); @@ -199,14 +196,6 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string) } } -void LLSidepanelAppearance::onWearButtonClicked() -{ - if (!mLookInfo->getVisible()) - { - mPanelOutfitsInventory->onWear(); - } -} - void LLSidepanelAppearance::onOpenOutfitButtonClicked() { const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink(); @@ -284,7 +273,6 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible) mLookInfo->setVisible(visible); mPanelOutfitsInventory->setVisible(!visible); mFilterEditor->setVisible(!visible); - mWearBtn->setVisible(!visible); mEditBtn->setVisible(!visible); mNewOutfitBtn->setVisible(!visible); mCurrOutfitPanel->setVisible(!visible); @@ -314,12 +302,10 @@ void LLSidepanelAppearance::updateVerbs() { const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); mEditBtn->setEnabled(is_correct_type); - mWearBtn->setEnabled(is_correct_type); } else { mEditBtn->setEnabled(FALSE); - mWearBtn->setEnabled(FALSE); } } diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 9c870f631a..8ef2088eda 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -67,7 +67,6 @@ private: void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); - void onWearButtonClicked(); void onEditButtonClicked(); void onNewOutfitButtonClicked(); void onBackButtonClicked(); @@ -82,7 +81,6 @@ private: LLButton* mOpenOutfitBtn; LLButton* mEditAppearanceBtn; - LLButton* mWearBtn; LLButton* mEditBtn; LLButton* mNewOutfitBtn; LLPanel* mCurrOutfitPanel; diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 793904faa8..56e342c3ce 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -95,7 +95,9 @@ void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit) BOOL LLSidepanelInventorySubpanel::getIsEditing() const { - return mIsEditing; + + return TRUE; // Default everything to edit mode since we're not using an edit button anymore. + // return mIsEditing; } void LLSidepanelInventorySubpanel::reset() diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 449bdefb8f..1965e634b6 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -109,19 +109,30 @@ BOOL LLSidepanelItemInfo::postBuild() { LLSidepanelInventorySubpanel::postBuild(); - // build the UI - // item name & description childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe); - //getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this)); + getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this)); childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe); - //getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this)); - + getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this)); // Creator information getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this)); - // owner information getChild<LLUICtrl>("BtnOwner")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickOwner,this)); - + // acquired date + // owner permissions + // Permissions debug text + // group permissions + getChild<LLUICtrl>("CheckShareWithGroup")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + // everyone permissions + getChild<LLUICtrl>("CheckEveryoneCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + // next owner permissions + getChild<LLUICtrl>("CheckNextOwnerModify")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + getChild<LLUICtrl>("CheckNextOwnerCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + // Mark for sale or not, and sale info + getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleType, this)); + // "Price" label for edit + getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); refresh(); return TRUE; } @@ -161,7 +172,7 @@ void LLSidepanelItemInfo::refresh() } } - if (!getIsEditing()) + if (!getIsEditing() || !item) { const std::string no_item_names[]={ "LabelItemName", @@ -250,18 +261,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLInventoryItem* item) GP_OBJECT_MANIPULATE) && is_obj_modify && is_complete; - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - bool item_in_trash = item->getUUID() == trash_id || gInventory.isObjectDescendentOf(item->getUUID(), trash_id); - - if (is_modifiable && !item_in_trash) - { - setIsEditing(TRUE); - } - else - { - setIsEditing(FALSE); - } - childSetEnabled("LabelItemNameTitle",TRUE); childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards childSetText("LabelItemName",item->getName()); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 2c40e948de..50cec3184d 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -101,13 +101,25 @@ BOOL LLSidepanelTaskInfo::postBuild() mBuyBtn = getChild<LLButton>("buy_btn"); mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this)); - childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe); - childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe); - mLabelGroupName = getChild<LLNameBox>("Group Name Proxy"); - childSetCommitCallback("checkbox for sale",onClickForSale,this); - + childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this); + childSetPrevalidate("Object Name", LLLineEditor::prevalidateASCIIPrintableNoPipe); + childSetCommitCallback("Object Description", LLSidepanelTaskInfo::onCommitDesc,this); + childSetPrevalidate("Object Description", LLLineEditor::prevalidateASCIIPrintableNoPipe); + getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this)); + childSetCommitCallback("checkbox share with group", &LLSidepanelTaskInfo::onCommitGroupShare,this); + childSetAction("button deed", &LLSidepanelTaskInfo::onClickDeedToGroup,this); + childSetCommitCallback("checkbox allow everyone move", &LLSidepanelTaskInfo::onCommitEveryoneMove,this); + childSetCommitCallback("checkbox allow everyone copy", &LLSidepanelTaskInfo::onCommitEveryoneCopy,this); + childSetCommitCallback("checkbox for sale", &LLSidepanelTaskInfo::onCommitSaleInfo,this); + childSetCommitCallback("sale type", &LLSidepanelTaskInfo::onCommitSaleType,this); + childSetCommitCallback("Edit Cost", &LLSidepanelTaskInfo::onCommitSaleInfo, this); + childSetCommitCallback("checkbox next owner can modify", &LLSidepanelTaskInfo::onCommitNextOwnerModify,this); + childSetCommitCallback("checkbox next owner can copy", &LLSidepanelTaskInfo::onCommitNextOwnerCopy,this); + childSetCommitCallback("checkbox next owner can transfer", &LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this); + childSetCommitCallback("clickaction", &LLSidepanelTaskInfo::onCommitClickAction,this); + childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this); return TRUE; } @@ -860,7 +872,7 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons return FALSE; } -void LLSidepanelTaskInfo::onClickDeedToGroup() +void LLSidepanelTaskInfo::onClickDeedToGroup(void *data) { LLNotificationsUtil::add("DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); } @@ -869,121 +881,149 @@ void LLSidepanelTaskInfo::onClickDeedToGroup() /// Permissions checkboxes ///---------------------------------------------------------------------------- -void LLSidepanelTaskInfo::onCommitPerm(LLCheckBoxCtrl *ctrl, U8 field, U32 perm) +// static +void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm) { - const LLViewerObject* object = mObjectSelection->getFirstRootObject(); - if (!object) return; + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); + if(!object) return; - BOOL new_state = ctrl->get(); + // Checkbox will have toggled itself + // LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; + BOOL new_state = check->get(); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm); } -void LLSidepanelTaskInfo::onCommitGroupShare() +// static +void LLSidepanelTaskInfo::onCommitGroupShare(LLUICtrl *ctrl, void *data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox share with group"); - onCommitPerm(ctrl, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY); + onCommitPerm(ctrl, data, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY); } -void LLSidepanelTaskInfo::onCommitEveryoneMove() +// static +void LLSidepanelTaskInfo::onCommitEveryoneMove(LLUICtrl *ctrl, void *data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone move"); - onCommitPerm(ctrl, PERM_EVERYONE, PERM_MOVE); + onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_MOVE); } -void LLSidepanelTaskInfo::onCommitEveryoneCopy() +// static +void LLSidepanelTaskInfo::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone copy"); - onCommitPerm(ctrl, PERM_EVERYONE, PERM_COPY); + onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY); } -void LLSidepanelTaskInfo::onCommitNextOwnerModify() +// static +void LLSidepanelTaskInfo::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can modify"); - onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_MODIFY); + //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << llendl; + onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY); } -void LLSidepanelTaskInfo::onCommitNextOwnerCopy() +// static +void LLSidepanelTaskInfo::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can copy"); - onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_COPY); + //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << llendl; + onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY); } -void LLSidepanelTaskInfo::onCommitNextOwnerTransfer() +// static +void LLSidepanelTaskInfo::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can transfer"); - onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_TRANSFER); + //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << llendl; + onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER); } -void LLSidepanelTaskInfo::onCommitName() +// static +void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data) { - LLLineEditor* tb = getChild<LLLineEditor>("Object Name"); - LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText()); + //llinfos << "LLSidepanelTaskInfo::onCommitName()" << llendl; + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + LLLineEditor* tb = self->getChild<LLLineEditor>("Object Name"); + if(tb) + { + LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText()); +// LLSelectMgr::getInstance()->selectionSetObjectName(self->mLabelObjectName->getText()); + } } -void LLSidepanelTaskInfo::onCommitDesc() + +// static +void LLSidepanelTaskInfo::onCommitDesc(LLUICtrl*, void* data) { - LLLineEditor* le = getChild<LLLineEditor>("Object Description"); - LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText()); + //llinfos << "LLSidepanelTaskInfo::onCommitDesc()" << llendl; + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + LLLineEditor* le = self->getChild<LLLineEditor>("Object Description"); + if(le) + { + LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText()); + } } -void LLSidepanelTaskInfo::onCommitSaleInfo() +// static +void LLSidepanelTaskInfo::onCommitSaleInfo(LLUICtrl*, void* data) { - setAllSaleInfo(); + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + self->setAllSaleInfo(); } -void LLSidepanelTaskInfo::onCommitSaleType() +// static +void LLSidepanelTaskInfo::onCommitSaleType(LLUICtrl*, void* data) { - setAllSaleInfo(); + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + self->setAllSaleInfo(); } + void LLSidepanelTaskInfo::setAllSaleInfo() { - llinfos << "LLSidepanelTaskInfo::setAllSaleInfo()" << llendl; - LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; + LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale"); + // Set the sale type if the object(s) are for sale. - if (checkPurchase && checkPurchase->get()) + if(checkPurchase && checkPurchase->get()) { sale_type = static_cast<LLSaleInfo::EForSale>(getChild<LLComboBox>("sale type")->getValue().asInteger()); } S32 price = -1; - const LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); + + LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger(); + // If somehow an invalid price, turn the sale off. if (price < 0) sale_type = LLSaleInfo::FS_NOT; - LLSaleInfo sale_info(sale_type, price); - LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info); - // If turned off for-sale, make sure click-action buy is turned - // off as well - if (sale_type == LLSaleInfo::FS_NOT) - { - U8 click_action = 0; - LLSelectMgr::getInstance()->selectionGetClickAction(&click_action); - if (click_action == CLICK_ACTION_BUY) - { - LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH); - } - } -} + LLSaleInfo old_sale_info; + LLSelectMgr::getInstance()->selectGetSaleInfo(old_sale_info); -// static -void LLSidepanelTaskInfo::onClickForSale(LLUICtrl* ctrl, void* data) -{ - LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; - self->updateUIFromSaleInfo(); -} + LLSaleInfo new_sale_info(sale_type, price); + LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info); + + U8 old_click_action = 0; + LLSelectMgr::getInstance()->selectionGetClickAction(&old_click_action); -void LLSidepanelTaskInfo::updateUIFromSaleInfo() -{ - /* - TODO: Update sale button enable/disable state and default - sale button settings when this sale button is enabled/disabled. - */ + if (old_sale_info.isForSale() + && !new_sale_info.isForSale() + && old_click_action == CLICK_ACTION_BUY) + { + // If turned off for-sale, make sure click-action buy is turned + // off as well + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_TOUCH); + } + else if (new_sale_info.isForSale() + && !old_sale_info.isForSale() + && old_click_action == CLICK_ACTION_TOUCH) + { + // If just turning on for-sale, preemptively turn on one-click buy + // unless user have a different click action set + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_BUY); + } } struct LLSelectionPayable : public LLSelectedObjectFunctor @@ -997,8 +1037,35 @@ struct LLSelectionPayable : public LLSelectedObjectFunctor } }; +static U8 string_value_to_click_action(std::string p_value) +{ + if (p_value == "Touch") + return CLICK_ACTION_TOUCH; + if (p_value == "Sit") + return CLICK_ACTION_SIT; + if (p_value == "Buy") + return CLICK_ACTION_BUY; + if (p_value == "Pay") + return CLICK_ACTION_PAY; + if (p_value == "Open") + return CLICK_ACTION_OPEN; + if (p_value == "Zoom") + return CLICK_ACTION_ZOOM; + return CLICK_ACTION_TOUCH; +} + +// static +void LLSidepanelTaskInfo::onCommitClickAction(LLUICtrl* ctrl, void*) +{ + LLComboBox* box = (LLComboBox*)ctrl; + if (!box) return; + std::string value = box->getValue().asString(); + U8 click_action = string_value_to_click_action(value); + doClickAction(click_action); +} + // static -void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action) +void LLSidepanelTaskInfo::doClickAction(U8 click_action) { if (click_action == CLICK_ACTION_BUY) { @@ -1020,7 +1087,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action) { // Verify object has script with money() handler LLSelectionPayable payable; - const BOOL can_pay = mObjectSelection->applyToObjects(&payable); + bool can_pay = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&payable); if (!can_pay) { // Warn, but do it anyway. @@ -1031,10 +1098,11 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action) } // static -void LLSidepanelTaskInfo::onCommitIncludeInSearch() +void LLSidepanelTaskInfo::onCommitIncludeInSearch(LLUICtrl* ctrl, void* data) { - LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("search_check"); - LLSelectMgr::getInstance()->selectionSetIncludeInSearch(ctrl->get()); + LLCheckBoxCtrl* box = (LLCheckBoxCtrl*)ctrl; + llassert(box); + LLSelectMgr::getInstance()->selectionSetIncludeInSearch(box->get()); } // virtual @@ -1042,13 +1110,15 @@ void LLSidepanelTaskInfo::updateVerbs() { LLSidepanelInventorySubpanel::updateVerbs(); + /* mOpenBtn->setVisible(!getIsEditing()); mPayBtn->setVisible(!getIsEditing()); mBuyBtn->setVisible(!getIsEditing()); - - mOpenBtn->setEnabled(enable_object_open()); //const LLViewerObject *obj = getFirstSelectedObject(); //mEditBtn->setEnabled(obj && obj->permModify()); + */ + + mOpenBtn->setEnabled(enable_object_open()); } void LLSidepanelTaskInfo::onOpenButtonClicked() @@ -1061,28 +1131,28 @@ void LLSidepanelTaskInfo::onOpenButtonClicked() void LLSidepanelTaskInfo::onPayButtonClicked() { - onCommitClickAction(CLICK_ACTION_PAY); + doClickAction(CLICK_ACTION_PAY); } void LLSidepanelTaskInfo::onBuyButtonClicked() { - onCommitClickAction(CLICK_ACTION_BUY); + doClickAction(CLICK_ACTION_BUY); } // virtual void LLSidepanelTaskInfo::save() { - onCommitGroupShare(); - onCommitEveryoneMove(); - onCommitEveryoneCopy(); - onCommitNextOwnerModify(); - onCommitNextOwnerCopy(); - onCommitNextOwnerTransfer(); - onCommitName(); - onCommitDesc(); - onCommitSaleInfo(); - onCommitSaleType(); - onCommitIncludeInSearch(); + onCommitGroupShare(getChild<LLCheckBoxCtrl>("checkbox share with group"), this); + onCommitEveryoneMove(getChild<LLCheckBoxCtrl>("checkbox allow everyone move"), this); + onCommitEveryoneCopy(getChild<LLCheckBoxCtrl>("checkbox allow everyone copy"), this); + onCommitNextOwnerModify(getChild<LLCheckBoxCtrl>("checkbox next owner can modify"), this); + onCommitNextOwnerCopy(getChild<LLCheckBoxCtrl>("checkbox next owner can copy"), this); + onCommitNextOwnerTransfer(getChild<LLCheckBoxCtrl>("checkbox next owner can transfer"), this); + onCommitName(getChild<LLLineEditor>("Object Name"), this); + onCommitDesc(getChild<LLLineEditor>("Object Description"), this); + onCommitSaleInfo(NULL, this); + onCommitSaleType(NULL, this); + onCommitIncludeInSearch(getChild<LLCheckBoxCtrl>("search_check"), this); } void LLSidepanelTaskInfo::setObjectSelection(LLObjectSelectionHandle selection) diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 7c6d9983ae..cf36c20767 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -72,28 +72,30 @@ protected: static void onClickRelease(void*); void onClickGroup(); void cbGroupID(LLUUID group_id); + static void onClickDeedToGroup(void*); - void onClickDeedToGroup(); - void onCommitPerm(LLCheckBoxCtrl* ctrl, U8 field, U32 perm); - void onCommitGroupShare(); - void onCommitEveryoneMove(); - void onCommitEveryoneCopy(); - void onCommitNextOwnerModify(); - void onCommitNextOwnerCopy(); - void onCommitNextOwnerTransfer(); - void onCommitName(); - void onCommitDesc(); - void onCommitSaleInfo(); - void onCommitSaleType(); - - void onCommitClickAction(U8 click_action); - void onCommitIncludeInSearch(); + static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm); + static void onCommitGroupShare(LLUICtrl *ctrl, void *data); + + static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data); + static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data); + + static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data); + static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data); + static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data); + + static void onCommitName(LLUICtrl* ctrl, void* data); + static void onCommitDesc(LLUICtrl* ctrl, void* data); + + static void onCommitSaleInfo(LLUICtrl* ctrl, void* data); + static void onCommitSaleType(LLUICtrl* ctrl, void* data); void setAllSaleInfo(); - static void onClickForSale(LLUICtrl* ctrl, void *data); - void updateUIFromSaleInfo(); + static void onCommitClickAction(LLUICtrl* ctrl, void* data); + static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*); + static void doClickAction(U8 click_action); void disableAll(); private: diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a1af2e5411..608165022f 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -354,8 +354,7 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i button->setLabel(name); button->setClickedCallback(callback); - if(tooltip!="Home") - button->setToolTip(tooltip); + button->setToolTip(tooltip); if(image.length()) { diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 5edc4804ca..fd39bde118 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -119,6 +119,9 @@ LLSpeakButton::LLSpeakButton(const Params& p) // never show "muted" because you can't mute yourself mOutputMonitor->setIsMuted(false); mOutputMonitor->setIsAgentControl(true); + + //*TODO find a better place to do that + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1)); } LLSpeakButton::~LLSpeakButton() diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 261bdbcfc0..3861a96355 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -36,6 +36,7 @@ #include "llagent.h" #include "llappviewer.h" +#include "llimview.h" #include "llmutelist.h" #include "llsdutil.h" #include "lluicolortable.h" @@ -575,6 +576,143 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } } +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; + +void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) +{ + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = speaker_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + //current value represents ability to type, so invert + data["params"]["mute_info"]["text"] = !findSpeaker(speaker_id)->mModeratorMutedText; + + LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); +} + +void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + if (gAgentID == avatar_id) return; // do not process myself + + LLPointer<LLSpeaker> speakerp = findSpeaker(avatar_id); + if (!speakerp) return; + + // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for + // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE) + bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + + // do not send voice moderation changes for avatars not in voice channel + if (!is_in_voice) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = avatar_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + data["params"]["mute_info"]["voice"] = !unmute; + + LLHTTPClient::post( + url, + data, + new ModerationResponder(getSessionID())); +} + +void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else) +{ + // *TODO: mantipov: add more intellectual processing of several following requests if it is needed. + /* + Such situation should be tested: + "Moderator sends the same second request before first response is come" + Moderator sends "mute everyone else" for A and then for B + two requests to disallow voice chat are sent + UUID of B is stored. + Then first response (to disallow voice chat) is come + request to allow voice for stored avatar (B) + Then second response (to disallow voice chat) is come + have nothing to do, the latest selected speaker is already enabled + + What can happen? + If request to allow voice for stored avatar (B) is processed on server BEFORE + second request to disallow voice chat all speakers will be disabled on voice. + But I'm not sure such situation is possible. + See EXT-3431. + */ + + mReverseVoiceModeratedAvatarID = excluded_avatar_id; + moderateVoiceSession(getSessionID(), !unmute_everyone_else); +} + +void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update) +{ + if (mReverseVoiceModeratedAvatarID.isNull()) return; + + if (session_update.has("moderated_mode") && + session_update["moderated_mode"].has("voice")) + { + BOOL voice_moderated = session_update["moderated_mode"]["voice"]; + + moderateVoiceParticipant(mReverseVoiceModeratedAvatarID, voice_moderated); + + mReverseVoiceModeratedAvatarID = LLUUID::null; + } +} + +void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice) +{ + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "session update"; + data["session-id"] = session_id; + data["params"] = LLSD::emptyMap(); + + data["params"]["update_info"] = LLSD::emptyMap(); + + data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); + data["params"]["update_info"]["moderated_mode"]["voice"] = disallow_voice; + + LLHTTPClient::post(url, data, new ModerationResponder(session_id)); +} + // // LLActiveSpeakerMgr diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 04046a8587..1a8c23f56a 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -158,8 +158,43 @@ public: void updateSpeakers(const LLSD& update); void setSpeakers(const LLSD& speakers); + + void toggleAllowTextChat(const LLUUID& speaker_id); + + /** + * Mutes/Unmutes avatar for current group voice chat. + * + * It only marks avatar as muted for session and does not use local Agent's Block list. + * It does not mute Agent itself. + * + * @param[in] avatar_id UUID of avatar to be processed + * @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted. + * + * @see moderateVoiceOtherParticipants() + */ + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + + /** + * Mutes/Unmutes all avatars except specified for current group voice chat. + * + * It only marks avatars as muted for session and does not use local Agent's Block list. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted. + * + * @see moderateVoiceParticipant() + */ + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else); + + void processSessionUpdate(const LLSD& session_update); + protected: virtual void updateSpeakerList(); + + void moderateVoiceSession(const LLUUID& session_id, bool disallow_voice); + + LLUUID mReverseVoiceModeratedAvatarID; }; class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr> diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 93655eb1f1..73e7d99815 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -121,7 +121,6 @@ #include "lllogininstance.h" // Host the login module. #include "llpanellogin.h" #include "llmutelist.h" -#include "llnotify.h" #include "llpanelavatar.h" #include "llavatarpropertiesprocessor.h" #include "llpanelevent.h" @@ -1635,11 +1634,15 @@ bool idle_startup() gSavedSettings.setString("TutorialURL", tutorial_url.asString()); } - LLSD use_tutorial = (*it)["use_tutorial"]; - if(use_tutorial.asString() == "true") - { - show_hud = true; - } + // For Viewer 2.0 we are not using the web-based tutorial + // If we reverse that decision, put this code back and use + // login.cgi to send a different URL with content that matches + // the Viewer 2.0 UI. + //LLSD use_tutorial = (*it)["use_tutorial"]; + //if(use_tutorial.asString() == "true") + //{ + // show_hud = true; + //} } } // Either we want to show tutorial because this is the first login diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 4915720036..9e72464237 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -50,7 +50,6 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" -#include "llnotify.h" #include "llimview.h" #include "llsd.h" #include "lltextbox.h" diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 1ebf624eeb..26f9824f9c 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llagent.h" + #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" @@ -46,11 +48,14 @@ #include "llchiclet.h" #include "lltoastpanel.h" #include "llnotificationmanager.h" +#include "llnotificationsutil.h" +#include "llspeakers.h" //--------------------------------------------------------------------------------- LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key), mChannel(NULL), mMessageList(NULL), + mSysWellChiclet(NULL), mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel") @@ -80,6 +85,10 @@ BOOL LLSysWellWindow::postBuild() mMessageList->addItem(mSeparator); + // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. + // mouse up callback is not called in this case. + setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); + return LLDockableFloater::postBuild(); } @@ -174,6 +183,11 @@ void LLSysWellWindow::setVisible(BOOL visible) mChannel->updateShowToastsState(); mChannel->redrawToasts(); } + + if (visible) + { + releaseNewMessagesState(); + } } //--------------------------------------------------------------------------------- @@ -227,6 +241,14 @@ void LLSysWellWindow::reshapeWindow() } } +void LLSysWellWindow::releaseNewMessagesState() +{ + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->setNewMessagesState(false); + } +} + //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { @@ -246,6 +268,24 @@ void LLSysWellWindow::handleItemAdded(EItemType added_item_type) // refresh list to recalculate mSeparator position mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); } + + //fix for EXT-3254 + //set limits for min_height. + S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + + std::vector<LLPanel*> items; + mMessageList->getItems(items); + + if(items.size()>1)//first item is separator + { + S32 min_height; + S32 min_width; + getResizeLimits(&min_width,&min_height); + + min_height = items[1]->getRect().getHeight() + 2 * mMessageList->getBorderWidth() + parent_list_delta_height; + + setResizeLimits(min_width,min_height); + } } void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type) @@ -312,6 +352,8 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } // Initialize chiclet. + mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2)); + mChiclet->enableCounterControl(true); mChiclet->setCounter(chicletCounter); mChiclet->setSessionId(sessionId); mChiclet->setIMSessionName(name); @@ -326,6 +368,16 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } //--------------------------------------------------------------------------------- +void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) +{ + LLTextBox* text = getChild<LLTextBox>("contact_name"); + S32 new_text_left = mChiclet->getRect().mRight + CHICLET_HPAD; + LLRect text_rect = text->getRect(); + text_rect.mLeft = new_text_left; + text->setRect(text_rect); +} + +//--------------------------------------------------------------------------------- LLIMWellWindow::RowPanel::~RowPanel() { } @@ -572,6 +624,23 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) } } +void LLNotificationWellWindow::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector<LLPanel*> items; + mMessageList->getItems(items); + for (std::vector<LLPanel*>::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLSysWellItem* sys_well_item = dynamic_cast<LLSysWellItem*>(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } +} + ////////////////////////////////////////////////////////////////////////// // PRIVATE METHODS void LLNotificationWellWindow::initChannel() @@ -673,15 +742,15 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id) == NULL) - { - S32 chicletCounter = LLIMModel::getInstance()->getNumUnread(session_id); - if (chicletCounter > -1) - { - addIMRow(session_id, chicletCounter, name, other_participant_id); - reshapeWindow(); - } - } + if (mMessageList->getItemByValue(session_id)) return; + + // For im sessions started as voice call chiclet gets created on the first incoming message + if (gIMMgr->isVoiceCall(session_id)) return; + + if (!gIMMgr->hasSession(session_id)) return; + + addIMRow(session_id, 0, name, other_participant_id); + reshapeWindow(); } //virtual @@ -752,6 +821,13 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, //--------------------------------------------------------------------------------- void LLIMWellWindow::delIMRow(const LLUUID& sessionId) { + //fix for EXT-3252 + //without this line LLIMWellWindow receive onFocusLost + //and hide itself. It was becaue somehow LLIMChicklet was in focus group for + //LLIMWellWindow... + //But I didn't find why this happen.. + gFocusMgr.clearLastFocusForGroup(this); + if (mMessageList->removeItemByValue(sessionId)) { handleItemRemoved(IT_INSTANT_MESSAGE); @@ -771,6 +847,10 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) { setVisible(FALSE); } + else + { + setFocus(true); + } } void LLIMWellWindow::addObjectRow(const LLUUID& object_id, bool new_message/* = false*/) @@ -810,4 +890,112 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) } } + +void LLIMWellWindow::addIMRow(const LLUUID& session_id) +{ + if (hasIMRow(session_id)) return; + + LLIMModel* im_model = LLIMModel::getInstance(); + addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id)); + reshapeWindow(); +} + +bool LLIMWellWindow::hasIMRow(const LLUUID& session_id) +{ + return mMessageList->getItemByValue(session_id); +} + +void LLIMWellWindow::onNewIM(const LLSD& data) +{ + LLUUID from_id = data["from_id"]; + if (from_id.isNull() || gAgentID == from_id) return; + + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + if (!gIMMgr->isVoiceCall(session_id)) return; + + if (hasIMRow(session_id)) return; + + //first real message, time to create chiclet + addIMRow(session_id); +} + + +void LLIMWellWindow::closeAll() +{ + // Generate an ignorable alert dialog if there is an active voice IM sesion + bool need_confirmation = false; + const LLIMModel& im_model = LLIMModel::instance(); + std::vector<LLSD> values; + mMessageList->getValues(values); + for (std::vector<LLSD>::iterator + iter = values.begin(), + iter_end = values.end(); + iter != iter_end; ++iter) + { + LLIMSpeakerMgr* speaker_mgr = im_model.getSpeakerManager(*iter); + if (speaker_mgr && speaker_mgr->isVoiceActive()) + { + need_confirmation = true; + break; + } + } + if ( need_confirmation ) + { + //Bring up a confirmation dialog + LLNotificationsUtil::add + ("ConfirmCloseAll", LLSD(), LLSD(), + boost::bind(&LLIMWellWindow::confirmCloseAll, this, _1, _2)); + } + else + { + closeAllImpl(); + } +} + +void LLIMWellWindow::closeAllImpl() +{ + std::vector<LLSD> values; + mMessageList->getValues(values); + + for (std::vector<LLSD>::iterator + iter = values.begin(), + iter_end = values.end(); + iter != iter_end; ++iter) + { + LLPanel* panel = mMessageList->getItemByValue(*iter); + + RowPanel* im_panel = dynamic_cast <RowPanel*> (panel); + if (im_panel) + { + gIMMgr->leaveSession(*iter); + continue; + } + + ObjectRowPanel* obj_panel = dynamic_cast <ObjectRowPanel*> (panel); + if (obj_panel) + { + LLScriptFloaterManager::instance() + .removeNotificationByObjectId(*iter); + } + } +} + +bool LLIMWellWindow::confirmCloseAll(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + switch(option) + { + case 0: + { + closeAllImpl(); + return true; + } + default: + break; + } + return false; +} + // EOF diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 43b2723df0..6cfa25b84d 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,6 +47,7 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; class LLScriptChiclet; +class LLSysWellChiclet; class LLSysWellWindow : public LLDockableFloater @@ -78,6 +79,8 @@ public: void onStartUpToastClick(S32 x, S32 y, MASK mask); + void setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; } + // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; @@ -104,12 +107,18 @@ protected: virtual const std::string& getAnchorViewName() = 0; void reshapeWindow(); + void releaseNewMessagesState(); // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; LLFlatListView* mMessageList; /** + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; + + /** * Special panel which is used as separator of Notifications & IM Rows. * It is always presents in the list and shown when it is necessary. * It should be taken into account when reshaping and checking list size @@ -138,6 +147,9 @@ public: // Operating with items void addItem(LLSysWellItem::Params p); + // Closes all notifications and removes them from the Notification Well + void closeAll(); + protected: /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; } @@ -179,9 +191,16 @@ public: /*virtual*/ void sessionRemoved(const LLUUID& session_id); /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + void onNewIM(const LLSD& data); + void addObjectRow(const LLUUID& object_id, bool new_message = false); void removeObjectRow(const LLUUID& object_id); + void addIMRow(const LLUUID& session_id); + bool hasIMRow(const LLUUID& session_id); + + void closeAll(); + protected: /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; } @@ -191,7 +210,8 @@ private: void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); void delIMRow(const LLUUID& sessionId); - + bool confirmCloseAll(const LLSD& notification, const LLSD& response); + void closeAllImpl(); /** * Scrolling row panel. @@ -206,6 +226,8 @@ private: void onMouseLeave(S32 x, S32 y, MASK mask); BOOL handleMouseDown(S32 x, S32 y, MASK mask); private: + static const S32 CHICLET_HPAD = 10; + void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param); void onClosePanel(); public: LLIMChiclet* mChiclet; diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 8d3dcf8a99..72ef383be9 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -31,8 +31,14 @@ */ #include "llviewerprecompiledheaders.h" -#include "llagent.h" + #include "lltexlayer.h" + +#include "llagent.h" +#include "llimagej2c.h" +#include "llimagetga.h" +#include "llvfile.h" +#include "llvfs.h" #include "llviewerstats.h" #include "llviewerregion.h" #include "llvoavatar.h" diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 0c7e61d00e..d55468841d 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -30,11 +30,14 @@ */ #include "llviewerprecompiledheaders.h" + +#include "lltexlayerparams.h" + #include "llagent.h" +#include "llimagetga.h" #include "lltexlayer.h" #include "llvoavatarself.h" #include "llwearable.h" -#include "lltexlayerparams.h" #include "llui.h" //----------------------------------------------------------------------------- diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index 2b80dbdba4..93d01352d4 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -34,7 +34,11 @@ #include "llviewervisualparam.h" +class LLImageRaw; +class LLImageTGA; class LLTexLayer; +class LLTexLayerInterface; +class LLViewerTexture; class LLVOAvatar; class LLWearable; diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index bc9c988648..4203cbbc43 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -40,6 +40,7 @@ #include "llworkerthread.h" +class LLImageFormatted; class LLTextureCacheWorker; class LLTextureCache : public LLWorkerThread diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index e29c96bec4..e80dafe245 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -43,8 +43,10 @@ #include "llhttpclient.h" #include "llhttpstatuscodes.h" #include "llimage.h" +#include "llimagej2c.h" #include "llimageworker.h" #include "llworkerthread.h" +#include "message.h" #include "llagent.h" #include "lltexturecache.h" @@ -156,7 +158,7 @@ public: void callbackHttpGet(const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer, - bool last_block, bool success); + bool partial, bool success); void callbackCacheRead(bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); void callbackCacheWrite(bool success); @@ -314,7 +316,7 @@ public: if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES) { success = true; - if (HTTP_PARTIAL_CONTENT == status) // partial information (i.e. last block) + if (HTTP_PARTIAL_CONTENT == status) // partial information { partial = true; } @@ -446,6 +448,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker() mFormattedImage = NULL; clearPackets(); unlockWorkMutex(); + mFetcher->removeFromHTTPQueue(mID); } void LLTextureFetchWorker::clearPackets() @@ -819,6 +822,13 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mFormattedImage.notNull()) { cur_size = mFormattedImage->getDataSize(); // amount of data we already have + if (mFormattedImage->getDiscardLevel() == 0) + { + // We already have all the data, just decode it + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + mState = DECODE_IMAGE; + return false; + } } mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; @@ -869,24 +879,26 @@ bool LLTextureFetchWorker::doWork(S32 param) llinfos << "HTTP GET failed for: " << mUrl << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; - if (cur_size == 0) + ++mHTTPFailCount; + if (mHTTPFailCount >= max_attempts) { - ++mHTTPFailCount; - if (mHTTPFailCount >= max_attempts) + if (cur_size > 0) { - resetFormattedData(); - return true; // failed + // Use available data + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + mState = DECODE_IMAGE; + return false; } else { - mState = SEND_HTTP_REQ; - return false; // retry + resetFormattedData(); + return true; // failed } } else { - mState = DECODE_IMAGE; - return false; // use what we have + mState = SEND_HTTP_REQ; + return false; // retry } } @@ -1205,7 +1217,7 @@ bool LLTextureFetchWorker::processSimulatorPackets() void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer, - bool last_block, bool success) + bool partial, bool success) { LLMutexLock lock(&mWorkMutex); @@ -1234,7 +1246,7 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, mBuffer = new U8[data_size]; buffer->readAfter(channels.in(), NULL, mBuffer, data_size); mBufferSize += data_size; - if (data_size < mRequestedSize || last_block == true) + if (data_size < mRequestedSize && mRequestedDiscard == 0) { mHaveAllData = TRUE; } diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp index e0358e1fca..1df73db9b0 100644 --- a/indra/newview/lltexturestatsuploader.cpp +++ b/indra/newview/lltexturestatsuploader.cpp @@ -34,6 +34,8 @@ #include "lltexturestatsuploader.h" +#include "llhttpclient.h" + LLTextureStatsUploader::LLTextureStatsUploader() { } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index b6e20608eb..98731f90f4 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -412,7 +412,7 @@ void LLGLTexMemBar::draw() F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); - S32 h_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f); + S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f); //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); @@ -428,14 +428,14 @@ void LLGLTexMemBar::draw() cache_usage, cache_max_usage); //, cache_entries, cache_max_entries - LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*3, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); //---------------------------------------------------------------------------- #if 0 S32 bar_left = 400; S32 bar_width = 200; - S32 top = line_height*3 - 2 + h_offset; + S32 top = line_height*3 - 2 + v_offset; S32 bottom = top - 6; S32 left = bar_left; S32 right = left + bar_width; @@ -494,17 +494,18 @@ void LLGLTexMemBar::draw() #endif //---------------------------------------------------------------------------- - text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d", + text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d", gTextureList.getNumImages(), LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(), LLLFSThread::sLocal->getPending(), - LLAppViewer::getImageDecodeThread()->getPending(), LLImageRaw::sRawImageCount, - LLAppViewer::getTextureFetch()->getNumHTTPRequests()); + LLAppViewer::getTextureFetch()->getNumHTTPRequests(), + LLAppViewer::getImageDecodeThread()->getPending(), + gTextureList.mCreateTextureList.size()); - LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*2, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*2, text_color, LLFontGL::LEFT, LLFontGL::TOP); @@ -514,40 +515,40 @@ void LLGLTexMemBar::draw() color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth); - LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, line_height*2, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, v_offset + line_height*2, color, LLFontGL::LEFT, LLFontGL::TOP); S32 dx1 = 0; if (LLAppViewer::getTextureFetch()->mDebugPause) { - LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); dx1 += 8; } if (mTextureView->mFreezeView) { - LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); dx1 += 8; } if (mTextureView->mOrderFetch) { - LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); } else { - LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); } - LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); - LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); - LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, h_offset + line_height, + LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, v_offset + line_height, text_color, LLFontGL::LEFT, LLFontGL::TOP); } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 4131e2755a..2a56b2cd3a 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -72,6 +72,8 @@ LLToast::LLToast(const LLToast::Params& p) { LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL); + setCanDrag(FALSE); + if(mPanel) { insertPanel(mPanel); diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 0c3c598704..3d25fd4f02 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -139,6 +139,7 @@ public: // set whether this toast considered as hidden or not void setIsHidden( bool is_toast_hidden ) { mIsHidden = is_toast_hidden; } + const LLNotificationPtr& getNotification() { return mNotification;} // Registers signals/callbacks for events toast_signal_t mOnFadeSignal; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index a4f5164a8d..c48301fa1e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -30,10 +30,6 @@ * $/LicenseInfo$ */ -// *NOTE: this module is a copy-paste of llui/llalertdialog.h -// Can we re-implement this as a subclass of LLAlertDialog and -// avoid all this code duplication? It already caused EXT-2232. - #include "llviewerprecompiledheaders.h" // must be first include #include "linden_common.h" @@ -60,7 +56,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f; const S32 MSG_PAD = 8; /*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL; -/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader; +/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader; //----------------------------------------------------------------------------- // Private methods diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index 2cd377b5a6..43e105a4f1 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -30,10 +30,6 @@ * $/LicenseInfo$ */ -// *NOTE: this module is a copy-paste of llui/llalertdialog.h -// Can we re-implement this as a subclass of LLAlertDialog and -// avoid all this code duplication? It already caused EXT-2232. - #ifndef LL_TOASTALERTPANEL_H #define LL_TOASTALERTPANEL_H @@ -41,12 +37,10 @@ #include "llfloater.h" #include "llui.h" #include "llnotificationptr.h" -#include "llalertdialog.h" #include "llerror.h" class LLButton; class LLCheckBoxCtrl; -class LLAlertDialogTemplate; class LLLineEditor; /** @@ -64,7 +58,16 @@ class LLToastAlertPanel public: typedef bool (*display_callback_t)(S32 modal); - static void setURLLoader(LLAlertURLLoader* loader) + class URLLoader + { + public: + virtual void load(const std::string& url, bool force_open_externally = 0) = 0; + virtual ~URLLoader() + { + } + }; + + static void setURLLoader(URLLoader* loader) { sURLLoader = loader; } @@ -97,7 +100,7 @@ private: BOOL hasTitleBar() const; private: - static LLAlertURLLoader* sURLLoader; + static URLLoader* sURLLoader; static LLControlGroup* sSettings; struct ButtonData diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index eacc077a65..e49044cdca 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -40,7 +40,6 @@ #include "lliconctrl.h" #include "llinventoryfunctions.h" #include "llnotifications.h" -#include "llnotify.h" #include "llviewertexteditor.h" #include "lluiconstants.h" diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index ed9e2e8818..b7add03e0e 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -34,6 +34,7 @@ #include "lltoastimpanel.h" #include "llnotifications.h" +#include "llinstantmessage.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 6b9bff7b9e..766cf83a01 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -38,6 +38,7 @@ #include "llviewercontrol.h" // library includes +#include "lldbstrings.h" #include "llnotifications.h" #include "lluiconstants.h" #include "llrect.h" diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index afb9e261b0..755e647777 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -80,7 +80,7 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) //Knowing the height is set to max allowed, getTextPixelHeight returns needed text height //Perhaps we need to pass maxLineCount as parameter to getTextPixelHeight to avoid previous reshape. - S32 requiredTextHeight = message->getContentsRect().getHeight(); + S32 requiredTextHeight = message->getTextBoundingRect().getHeight(); S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); //Calculate last delta height deducting previous heightDelta diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5ed8dc5fb9..74fbce890d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1243,8 +1243,6 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) return false; } - - // Does this face have media? const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace); if(!tep) @@ -1257,11 +1255,11 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL; - if (gSavedSettings.getBOOL("MediaOnAPrimUI") - && media_impl.notNull()) + if (gSavedSettings.getBOOL("MediaOnAPrimUI")) { - if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) ) + if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull()) { + // It's okay to give this a null impl LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal); } else @@ -1445,28 +1443,29 @@ BOOL LLToolPie::pickRightMouseDownCallback() { LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal ); gMenuHolder->setParcelSelection(selection); - gPieLand->show(x, y); + gMenuLand->show(x, y); showVisualContextMenuEffect(); } else if (mPick.mObjectID == gAgent.getID() ) { - if(!gPieSelf) + if(!gMenuAvatarSelf) { //either at very early startup stage or at late quitting stage, //this event is ignored. return TRUE ; } - gPieSelf->show(x, y); + gMenuAvatarSelf->show(x, y); } else if (object) { gMenuHolder->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); + bool is_other_attachment = (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner()); if (object->isAvatar() - || (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner())) + || is_other_attachment) { // Find the attachment's avatar while( object && object->isAttachment()) @@ -1477,20 +1476,30 @@ BOOL LLToolPie::pickRightMouseDownCallback() // Object is an avatar, so check for mute by id. LLVOAvatar* avatar = (LLVOAvatar*)object; std::string name = avatar->getFullname(); + std::string mute_msg; if (LLMuteList::getInstance()->isMuted(avatar->getID(), avatar->getFullname())) { - gMenuHolder->childSetText("Avatar Mute", std::string("Unmute")); // *TODO:Translate + mute_msg = LLTrans::getString("UnmuteAvatar"); } else { - gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate + mute_msg = LLTrans::getString("MuteAvatar"); } - gPieAvatar->show(x, y); + if (is_other_attachment) + { + gMenuAttachmentOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg); + gMenuAttachmentOther->show(x, y); + } + else + { + gMenuAvatarOther->getChild<LLUICtrl>("Avatar Mute")->setValue(mute_msg); + gMenuAvatarOther->show(x, y); + } } else if (object->isAttachment()) { - gPieAttachment->show(x, y); + gMenuAttachmentSelf->show(x, y); } else { @@ -1501,16 +1510,18 @@ BOOL LLToolPie::pickRightMouseDownCallback() { name = node->mName; } + std::string mute_msg; if (LLMuteList::getInstance()->isMuted(object->getID(), name)) { - gMenuHolder->childSetText("Object Mute", std::string("Unmute")); // *TODO:Translate + mute_msg = LLTrans::getString("UnmuteObject"); } else { - gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate + mute_msg = LLTrans::getString("MuteObject"); } - gPieObject->show(x, y); + gMenuHolder->childSetText("Object Mute", mute_msg); + gMenuObject->show(x, y); showVisualContextMenuEffect(); } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index f8c82f8b22..0b6bd4b401 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -41,6 +41,7 @@ #include "llfloaterurldisplay.h" #include "llfloaterworldmap.h" #include "llpanellogin.h" +#include "llregionhandle.h" #include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index a041f3ac98..bb49804aff 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -32,12 +32,13 @@ #include "llviewerprecompiledheaders.h" -#include "linden_common.h" - -#include "llagent.h" #include "llviewerassetstorage.h" + #include "llvfile.h" #include "llvfs.h" +#include "message.h" + +#include "llagent.h" LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, const LLHost &upstream_host) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 6339d23fa7..57434bd1e4 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -63,7 +63,6 @@ #include "llviewerjoystick.h" #include "llviewerparcelmgr.h" #include "llparcel.h" -#include "llnotify.h" #include "lloverlaybar.h" #include "llkeyboard.h" #include "llerrorcontrol.h" @@ -73,6 +72,8 @@ #include "llrender.h" #include "llbottomtray.h" #include "llnavigationbar.h" +#include "llfloatertools.h" +#include "llpaneloutfitsinventory.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -120,12 +121,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue) return true; } -static bool handleSetSelfInvisible( const LLSD& newvalue) -{ - LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() ); - return true; -} - static bool handleReleaseGLBufferChanged(const LLSD& newvalue) { if (gPipeline.isInit()) @@ -516,34 +511,25 @@ bool toggle_show_snapshot_button(const LLSD& newvalue) bool toggle_show_navigation_panel(const LLSD& newvalue) { - LLRect floater_view_rect = gFloaterView->getRect(); - LLRect notify_view_rect = gNotifyBoxView->getRect(); - LLNavigationBar* navbar = LLNavigationBar::getInstance(); - - //if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher, - //and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower. - int pm=newvalue.asBoolean()?-1:1; - floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); - notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); - gFloaterView->setRect(floater_view_rect); - floater_view_rect = gFloaterView->getRect(); - navbar->showNavigationPanel(newvalue.asBoolean()); + LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean()); return true; } bool toggle_show_favorites_panel(const LLSD& newvalue) { - LLRect floater_view_rect = gFloaterView->getRect(); - LLRect notify_view_rect = gNotifyBoxView->getRect(); - LLNavigationBar* navbar = LLNavigationBar::getInstance(); - - //if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher, - //and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower. - int pm=newvalue.asBoolean()?-1:1; - floater_view_rect.mTop += pm*navbar->getDefFavBarHeight(); - notify_view_rect.mTop += pm*navbar->getDefFavBarHeight(); - gFloaterView->setRect(floater_view_rect); - navbar->showFavoritesPanel(newvalue.asBoolean()); + LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean()); + return true; +} + +bool toggle_show_appearance_editor(const LLSD& newvalue) +{ + LLPanelOutfitsInventory::sShowDebugEditor = newvalue.asBoolean(); + return true; +} + +bool toggle_show_object_render_cost(const LLSD& newvalue) +{ + LLFloaterTools::sShowObjectCost = newvalue.asBoolean(); return true; } @@ -567,7 +553,6 @@ void settings_setup_listeners() gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2)); - gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _2)); gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2)); gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2)); gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); @@ -690,6 +675,8 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&toggle_show_snapshot_button, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); + gSavedSettings.getControl("ShowDebugAppearanceEditor")->getSignal()->connect(boost::bind(&toggle_show_appearance_editor, _2)); + gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 5b733ed817..3dac0ee452 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -713,7 +713,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first. F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time - max_image_decode_time = llclamp(max_image_decode_time, 0.001f, 0.005f ); // min 1ms/frame, max 5ms/frame) + max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame) gTextureList.updateImages(max_image_decode_time); //remove dead textures from GL @@ -1009,10 +1009,10 @@ void render_hud_attachments() glh_set_current_modelview(current_mod); } -BOOL setup_hud_matrices() +LLRect get_whole_screen_region() { LLRect whole_screen = gViewerWindow->getWindowRectScaled(); - + // apply camera zoom transform (for high res screenshots) F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor(); S16 sub_region = LLViewerCamera::getInstance()->getZoomSubRegion(); @@ -1024,52 +1024,43 @@ BOOL setup_hud_matrices() int tile_y = sub_region / num_horizontal_tiles; int tile_x = sub_region - (tile_y * num_horizontal_tiles); glh::matrix4f mat; - + whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWindowHeightScaled() - (tile_y * tile_height), tile_width, tile_height); } - - return setup_hud_matrices(whole_screen); + return whole_screen; } -BOOL setup_hud_matrices(const LLRect& screen_region) +bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model) { LLVOAvatar* my_avatarp = gAgent.getAvatarObject(); if (my_avatarp && my_avatarp->hasHUDAttachment()) { F32 zoom_level = gAgent.mHUDCurZoom; LLBBox hud_bbox = my_avatarp->getHUDBBox(); - - // set up transform to keep HUD objects in front of camera - glMatrixMode(GL_PROJECTION); + F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f); - glh::matrix4f proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth); + proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth); proj.element(2,2) = -0.01f; - + F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect(); - + glh::matrix4f mat; F32 scale_x = (F32)gViewerWindow->getWindowWidthScaled() / (F32)screen_region.getWidth(); F32 scale_y = (F32)gViewerWindow->getWindowHeightScaled() / (F32)screen_region.getHeight(); mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f)); mat.set_translate( glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWindowWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio), - clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y), - 0.f)); + clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y), + 0.f)); proj *= mat; - - glLoadMatrixf(proj.m); - glh_set_current_projection(proj); - - glMatrixMode(GL_MODELVIEW); - glh::matrix4f model((GLfloat*) OGL_TO_CFR_ROTATION); + + glh::matrix4f tmp_model((GLfloat*) OGL_TO_CFR_ROTATION); mat.set_scale(glh::vec3f(zoom_level, zoom_level, zoom_level)); mat.set_translate(glh::vec3f(-hud_bbox.getCenterLocal().mV[VX] + (hud_depth * 0.5f), 0.f, 0.f)); - - model *= mat; - glLoadMatrixf(model.m); - glh_set_current_modelview(model); - + + tmp_model *= mat; + model = tmp_model; return TRUE; } else @@ -1078,6 +1069,35 @@ BOOL setup_hud_matrices(const LLRect& screen_region) } } +bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model) +{ + LLRect whole_screen = get_whole_screen_region(); + return get_hud_matrices(whole_screen, proj, model); +} + +BOOL setup_hud_matrices() +{ + LLRect whole_screen = get_whole_screen_region(); + return setup_hud_matrices(whole_screen); +} + +BOOL setup_hud_matrices(const LLRect& screen_region) +{ + glh::matrix4f proj, model; + bool result = get_hud_matrices(screen_region, proj, model); + if (!result) return result; + + // set up transform to keep HUD objects in front of camera + glMatrixMode(GL_PROJECTION); + glLoadMatrixf(proj.m); + glh_set_current_projection(proj); + + glMatrixMode(GL_MODELVIEW); + glLoadMatrixf(model.m); + glh_set_current_modelview(model); + return TRUE; +} + static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); void render_ui(F32 zoom_factor, int subfield) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 35c9a1d367..00db11a767 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -94,6 +94,7 @@ #include "llfloaterregioninfo.h" #include "llfloaterreporter.h" #include "llfloaterscriptdebug.h" +#include "llfloaterscriptlimits.h" #include "llfloatersellland.h" #include "llfloatersettingsdebug.h" #include "llfloatersnapshot.h" @@ -241,6 +242,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebug>); LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebugOutput>); LLFloaterReg::add("script_floater", "floater_script.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLScriptFloater>); + LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>); LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h index 6e1f0945b8..6b0a2e5d81 100644 --- a/indra/newview/llviewergenericmessage.h +++ b/indra/newview/llviewergenericmessage.h @@ -36,6 +36,7 @@ class LLUUID; class LLDispatcher; +class LLMessageSystem; void send_generic_message(const std::string& method, diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index b8f91697e5..5af79b4fd3 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -81,8 +81,7 @@ void LLViewerHelp::showTopic(const std::string &topic) // work out the URL for this topic and display it showHelp(); - const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); - std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); + std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic ); setRawURL( helpURL ); } diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index df08470518..5ba4fc834c 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -34,12 +34,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewerhelputil.h" -#include "llcontrol.h" +#include "llsd.h" #include "llstring.h" -#include "llsys.h" #include "lluri.h" -#include "llversioninfo.h" - +#include "llweb.h" +#include "llviewercontrol.h" ////////////////////////////////////////////// // Build a help URL from a topic and formatter @@ -59,40 +58,14 @@ std::string LLViewerHelpUtil::helpURLEncode( const std::string &component ) return escaped; } -static std::string buildHelpVersion( const U32 ver_int ) -{ - std::ostringstream ver_str; - ver_str << ver_int; - return ver_str.str(); // not encoded - numbers are rfc3986-safe -} - //static -std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo ) +std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic) { - std::string helpURL = savedSettings.getString("HelpURLFormat"); LLSD substitution; substitution["TOPIC"] = helpURLEncode(topic); - substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName")); - - substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion()); - substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor()); - substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor()); - substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch()); - substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild()); - - substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple()); - - std::string language = savedSettings.getString("Language"); - if( language.empty() || language == "default" ) - { - language = savedSettings.getString("SystemLanguage"); - } - substitution["LANGUAGE"] = helpURLEncode(language); - - LLStringUtil::format(helpURL, substitution); - - return helpURL; + // get the help URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string helpURL = gSavedSettings.getString("HelpURLFormat"); + return LLWeb::expandURLSubstitutions(helpURL, substitution); } diff --git a/indra/newview/llviewerhelputil.h b/indra/newview/llviewerhelputil.h index 8ee0d96023..95e6744842 100644 --- a/indra/newview/llviewerhelputil.h +++ b/indra/newview/llviewerhelputil.h @@ -41,9 +41,7 @@ class LLViewerHelpUtil { public: static std::string helpURLEncode( const std::string &component ); - static std::string buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo); + static std::string buildHelpURL( const std::string &topic ); }; #endif // header guard diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index 58630978c4..6299b4fabd 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -35,12 +35,11 @@ #include "llviewerhome.h" #include "lllogininstance.h" +#include "llsd.h" #include "llui.h" #include "lluri.h" -#include "llsd.h" -#include "llversioninfo.h" #include "llviewercontrol.h" -#include "llviewernetwork.h" +#include "llweb.h" //static std::string LLViewerHome::getHomeURL() @@ -49,16 +48,12 @@ std::string LLViewerHome::getHomeURL() // this value from settings.xml and support various substitutions LLSD substitution; - substitution["VERSION"] = LLVersionInfo::getVersion(); - substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName")); - substitution["LANGUAGE"] = LLUI::getLanguage(); - substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); - substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey()); + // get the home URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) std::string homeURL = gSavedSettings.getString("HomeSidePanelURL"); - LLStringUtil::format(homeURL, substitution); - - return homeURL; + return LLWeb::expandURLSubstitutions(homeURL, substitution); } //static @@ -67,7 +62,13 @@ std::string LLViewerHome::getAuthKey() // return the value of the (optional) auth token returned by login.cgi // this lets the server provide an authentication token that we can // blindly pass to the Home web page for it to perform authentication. - static const std::string authKeyName("home_sidetray_token"); - return LLLoginInstance::getInstance()->getResponse(authKeyName); + // We use "home_sidetray_token", and fallback to "auth_token" if not + // present. + LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token"); + if (auth_token.asString().empty()) + { + auth_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + return auth_token.asString(); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 78cee15384..5605f425e0 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -43,7 +43,6 @@ #include "llviewercontrol.h" #include "llconsole.h" #include "llinventorymodel.h" -#include "llnotify.h" #include "llgesturemgr.h" #include "llinventorybridge.h" @@ -519,7 +518,7 @@ bool LLViewerInventoryCategory::fetchDescendents() std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); if (!url.empty()) //Capability found. Build up LLSD and use it. { - LLInventoryModel::startBackgroundFetch(mUUID); + gInventory.startBackgroundFetch(mUUID); } else { //Deprecated, but if we don't have a capability, use the old system. diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index 0e993a2ebe..08c4ec36fd 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -37,7 +37,6 @@ // Header Files //----------------------------------------------------------------------------- #include "lljoint.h" -#include "llapr.h" class LLFace; class LLViewerJointMesh; diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 543679c44b..d62b0ada85 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -37,7 +37,6 @@ #include "llviewertexture.h" #include "llpolymesh.h" #include "v4color.h" -#include "llapr.h" class LLDrawable; class LLFace; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 57e4ed0c1e..df62c9628d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -160,36 +160,25 @@ public: std::string media_type = content["content-type"].asString(); std::string::size_type idx1 = media_type.find_first_of(";"); std::string mime_type = media_type.substr(0, idx1); - completeAny(status, mime_type); - } - virtual void error( U32 status, const std::string& reason ) - { - if(status == 401) - { - // This is the "you need to authenticate" status. - // Treat this like an html page. - completeAny(status, "text/html"); - } - else - if(status == 403) - { - completeAny(status, "text/html"); - } - else - if(status == 404) - { - // 404 is content not found - sites often have bespoke 404 pages so - // treat them like an html page. - completeAny(status, "text/html"); - } - else - if(status == 406) + lldebugs << "status is " << status << ", media type \"" << media_type << "\"" << llendl; + + // 2xx status codes indicate success. + // Most 4xx status codes are successful enough for our purposes. + // 499 is the error code for host not found, timeout, etc. + if( ((status >= 200) && (status < 300)) || + ((status >= 400) && (status < 499)) ) { - // 406 means the server sent something that we didn't indicate was acceptable - // Eventually we should send what we accept in the headers but for now, - // treat 406s like an html page. - completeAny(status, "text/html"); + // The probe was successful. + + if(mime_type.empty()) + { + // Some sites don't return any content-type header at all. + // Treat an empty mime type as text/html. + mime_type = "text/html"; + } + + completeAny(status, mime_type); } else { @@ -200,6 +189,7 @@ public: mMediaImpl->mMediaSourceFailed = true; } } + } void completeAny(U32 status, const std::string& mime_type) @@ -249,6 +239,7 @@ static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap; static LLTimer sMediaCreateTimer; static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f; static F32 sGlobalVolume = 1.0f; +static F64 sLowestLoadableImplInterest = 0.0f; ////////////////////////////////////////////////////////////////////////////////////////// static void add_media_impl(LLViewerMediaImpl* media) @@ -558,6 +549,37 @@ bool LLViewerMedia::getInWorldMediaDisabled() return sInWorldMediaDisabled; } +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) +{ + bool result = false; + + if (NULL == object) + { + result = false; + } + // Focused? Then it is interesting! + else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID()) + { + result = true; + } + // Selected? Then it is interesting! + // XXX Sadly, 'contains()' doesn't take a const :( + else if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(object))) + { + result = true; + } + else + { + lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; + if(object_interest >= sLowestLoadableImplInterest) + result = true; + } + + return result; +} + LLViewerMedia::impl_list &LLViewerMedia::getPriorityList() { return sViewerMediaImplList; @@ -683,6 +705,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) // Setting max_cpu to 0.0 disables CPU usage checking. bool check_cpu_usage = (max_cpu != 0.0f); + LLViewerMediaImpl* lowest_interest_loadable = NULL; + // Notes on tweakable params: // max_instances must be set high enough to allow the various instances used in the UI (for the help browser, search, etc.) to be loaded. // If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow. @@ -769,6 +793,9 @@ void LLViewerMedia::updateMedia(void *dummy_arg) if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED)) { + // This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest. + lowest_interest_loadable = pimpl; + impl_count_total++; } @@ -799,6 +826,22 @@ void LLViewerMedia::updateMedia(void *dummy_arg) total_cpu += pimpl->getCPUUsage(); } + + // Re-calculate this every time. + sLowestLoadableImplInterest = 0.0f; + + // Only do this calculation if we've hit the impl count limit -- up until that point we always need to load media data. + if(lowest_interest_loadable && (impl_count_total >= (int)max_instances)) + { + // Get the interest value of this impl's object for use by isInterestingEnough + LLVOVolume *object = lowest_interest_loadable->getSomeObject(); + if(object) + { + // NOTE: Don't use getMediaInterest() here. We want the pixel area, not the total media interest, + // so that we match up with the calculation done in LLMediaDataClient. + sLowestLoadableImplInterest = object->getPixelArea(); + } + } if(gSavedSettings.getBOOL("MediaPerformanceManagerDebug")) { @@ -876,6 +919,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mMimeTypeProbe(NULL), mMediaAutoPlay(false), mInNearbyMediaList(false), + mClearCache(false), mIsUpdated(false) { @@ -1086,6 +1130,12 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); media_source->focus(mHasFocus); + if(mClearCache) + { + mClearCache = false; + media_source->clear_cache(); + } + mMediaSource = media_source; updateVolume(); @@ -1299,6 +1349,19 @@ std::string LLViewerMediaImpl::getCurrentMediaURL() } ////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clear_cache(); + } + else + { + mClearCache = true; + } +} + +////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); @@ -1580,7 +1643,12 @@ void LLViewerMediaImpl::navigateInternal() if(scheme.empty() || "http" == scheme || "https" == scheme) { - LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), 10.0f); + // If we don't set an Accept header, LLHTTPClient will add one like this: + // Accept: application/llsd+xml + // which is really not what we want. + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), headers, 10.0f); } else if("data" == scheme || "file" == scheme || "about" == scheme) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 349a66867a..28fb379960 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,6 +112,8 @@ class LLViewerMedia static void setInWorldMediaDisabled(bool disabled); static bool getInWorldMediaDisabled(); + static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); + // Returns the priority-sorted list of all media impls. static impl_list &getPriorityList(); @@ -186,6 +188,7 @@ public: std::string getCurrentMediaURL(); std::string getHomeURL() { return mHomeURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }; + void clearCache(); std::string getMimeType() { return mMimeType; } void scaleMouse(S32 *mouse_x, S32 *mouse_y); void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y); @@ -353,6 +356,7 @@ public: bool mMediaAutoPlay; std::string mMediaEntryURL; bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons + bool mClearCache; private: BOOL mIsUpdated ; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index f639c841e7..a0ac9c2091 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -51,6 +51,7 @@ #include "llkeyboard.h" #include "lltoolmgr.h" #include "llvovolume.h" +#include "llhelp.h" // // LLViewerMediaFocus @@ -144,9 +145,19 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac } mFocusedImplID = LLUUID::null; - mFocusedObjectID = LLUUID::null; - mFocusedObjectFace = 0; + if (objectp.notNull()) + { + // Still record the focused object...it may mean we need to load media data. + // This will aid us in determining this object is "important enough" + mFocusedObjectID = objectp->getID(); + mFocusedObjectFace = face; + } + else { + mFocusedObjectID = LLUUID::null; + mFocusedObjectFace = 0; + } } + } void LLViewerMediaFocus::clearFocus() @@ -292,7 +303,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) { media_impl->handleKeyHere(key, mask); - if (key == KEY_ESCAPE) + if (KEY_ESCAPE == key) { // Reset camera zoom in this case. if(mFocusedImplID.notNull()) @@ -305,6 +316,15 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) clearFocus(); } + + if ( KEY_F1 == key && LLUI::sHelpImpl && mMediaControls.get()) + { + std::string help_topic; + if (mMediaControls.get()->findHelpTopic(help_topic)) + { + LLUI::sHelpImpl->showTopic(help_topic); + } + } } return true; @@ -336,7 +356,7 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks) void LLViewerMediaFocus::update() { - if(mFocusedImplID.notNull() || mFocusedObjectID.notNull()) + if(mFocusedImplID.notNull()) { // We have a focused impl/face. if(!getFocus()) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 36d9e7935f..23bcca9603 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -56,6 +56,7 @@ #include "llfloatercustomize.h" #include "llfloaterchatterbox.h" #include "llfloatergodtools.h" +#include "llfloaterinventory.h" #include "llfloaterland.h" #include "llfloaterpay.h" #include "llfloaterreporter.h" @@ -134,11 +135,12 @@ LLMenuGL *gPopupMenuView = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus -LLContextMenu *gPieSelf = NULL; -LLContextMenu *gPieAvatar = NULL; -LLContextMenu *gPieObject = NULL; -LLContextMenu *gPieAttachment = NULL; -LLContextMenu *gPieLand = NULL; +LLContextMenu *gMenuAvatarSelf = NULL; +LLContextMenu *gMenuAvatarOther = NULL; +LLContextMenu *gMenuObject = NULL; +LLContextMenu *gMenuAttachmentSelf = NULL; +LLContextMenu *gMenuAttachmentOther = NULL; +LLContextMenu *gMenuLand = NULL; const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); @@ -146,7 +148,6 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents" LLMenuGL* gAttachSubMenu = NULL; LLMenuGL* gDetachSubMenu = NULL; LLMenuGL* gTakeOffClothes = NULL; -LLContextMenu* gPieRate = NULL; LLContextMenu* gAttachScreenPieMenu = NULL; LLContextMenu* gAttachPieMenu = NULL; LLContextMenu* gAttachBodyPartPieMenus[8]; @@ -376,25 +377,31 @@ void init_menus() gMenuHolder->addChild( gPopupMenuView ); /// - /// Pie menus + /// Context menus /// - gPieSelf = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + const widget_registry_t& registry = + LLViewerMenuHolderGL::child_registry_t::instance(); + gMenuAvatarSelf = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_avatar_self.xml", gMenuHolder, registry); + gMenuAvatarOther = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_avatar_other.xml", gMenuHolder, registry); - // TomY TODO: what shall we do about these? gDetachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach HUD", true); gDetachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach", true); - gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - - gPieObject = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuObject = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_object.xml", gMenuHolder, registry); gAttachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach HUD"); gAttachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach"); - gPieRate = gMenuHolder->getChild<LLContextMenu>("Rate Menu"); - gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuAttachmentSelf = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_attachment_self.xml", gMenuHolder, registry); + gMenuAttachmentOther = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_attachment_other.xml", gMenuHolder, registry); - gPieLand = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuLand = LLUICtrlFactory::createFromFile<LLContextMenu>( + "menu_land.xml", gMenuHolder, registry); /// /// set up the colors @@ -403,12 +410,13 @@ void init_menus() LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor"); - gPieSelf->setBackgroundColor( context_menu_color ); - gPieAvatar->setBackgroundColor( context_menu_color ); - gPieObject->setBackgroundColor( context_menu_color ); - gPieAttachment->setBackgroundColor( context_menu_color ); + gMenuAvatarSelf->setBackgroundColor( context_menu_color ); + gMenuAvatarOther->setBackgroundColor( context_menu_color ); + gMenuObject->setBackgroundColor( context_menu_color ); + gMenuAttachmentSelf->setBackgroundColor( context_menu_color ); + gMenuAttachmentOther->setBackgroundColor( context_menu_color ); - gPieLand->setBackgroundColor( context_menu_color ); + gMenuLand->setBackgroundColor( context_menu_color ); color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); @@ -431,6 +439,12 @@ void init_menus() // menu holder appears on top of menu bar so you can see the menu title // flash when an item is triggered (the flash occurs in the holder) gViewerWindow->getRootView()->addChild(gMenuHolder); + + // This removes tool tip view from main view and adds it + // to root view in front of menu holder. + // Otherwise tool tips for menu items would be overlapped by menu, since + // main view is behind of menu holder now. + gViewerWindow->getRootView()->addChild(gToolTipView); gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); @@ -626,6 +640,20 @@ class LLAdvancedCheckHUDInfo : public view_listener_t } }; + +////////////// +// FLYING // +////////////// + +class LLAdvancedAgentFlyingInfo : public view_listener_t +{ + bool handleEvent(const LLSD&) + { + return gAgent.getFlying(); + } +}; + + /////////////////////// // CLEAR GROUP CACHE // /////////////////////// @@ -2263,20 +2291,23 @@ void cleanup_menus() delete gMenuParcelObserver; gMenuParcelObserver = NULL; - delete gPieSelf; - gPieSelf = NULL; + delete gMenuAvatarSelf; + gMenuAvatarSelf = NULL; + + delete gMenuAvatarOther; + gMenuAvatarOther = NULL; - delete gPieAvatar; - gPieAvatar = NULL; + delete gMenuObject; + gMenuObject = NULL; - delete gPieObject; - gPieObject = NULL; + delete gMenuAttachmentSelf; + gMenuAttachmentSelf = NULL; - delete gPieAttachment; - gPieAttachment = NULL; + delete gMenuAttachmentOther; + gMenuAttachmentSelf = NULL; - delete gPieLand; - gPieLand = NULL; + delete gMenuLand; + gMenuLand = NULL; delete gMenuBarView; gMenuBarView = NULL; @@ -2519,8 +2550,6 @@ void handle_object_edit() void handle_object_inspect() { - // Disable sidepanel inspector - /* LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) @@ -2529,9 +2558,11 @@ void handle_object_inspect() key["task"] = "task"; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } - */ + /* + // Old floater properties LLFloaterReg::showInstance("inspect", LLSD()); + */ } //--------------------------------------------------------------------------- @@ -2630,7 +2661,7 @@ bool enable_object_edit() enable = LLViewerParcelMgr::getInstance()->allowAgentBuild() || LLSelectMgr::getInstance()->getSelection()->isAttachment(); } - else if (LLSelectMgr::getInstance()->selectGetModify()) + else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { enable = true; } @@ -4911,7 +4942,7 @@ class LLEditDelete : public view_listener_t // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return true; } }; @@ -4944,7 +4975,7 @@ void handle_object_delete() // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return; } @@ -5510,47 +5541,27 @@ void handle_viewer_disable_message_log(void*) gMessageSystem->stopLogging(); } -class LLShowFloater : public view_listener_t +void handle_customize_avatar() { - bool handleEvent(const LLSD& userdata) + if (gAgentWearables.areWearablesLoaded()) { - std::string floater_name = userdata.asString(); - if (floater_name == "appearance") - { - if (gAgentWearables.areWearablesLoaded()) - { - gAgent.changeCameraToCustomizeAvatar(); - } - } - else if (floater_name == "toolbar") - { - LLToolBar::toggle(NULL); - } - else if (floater_name == "buy land") - { - handle_buy_land(); - } - else if (floater_name == "script errors") - { - LLFloaterScriptDebug::show(LLUUID::null); - } - else if (floater_name == "complaint reporter") - { - // Prevent menu from appearing in screen shot. - gMenuHolder->hideMenus(); - LLFloaterReporter::showFromMenu(COMPLAINT_REPORT); - } - else if (floater_name == "buy currency") - { - LLFloaterBuyCurrency::buyCurrency(); - } - else - { - LLFloaterReg::toggleInstance(floater_name); - } - return true; + gAgent.changeCameraToCustomizeAvatar(); } -}; +} + +void handle_report_abuse() +{ + // Prevent menu from appearing in screen shot. + gMenuHolder->hideMenus(); + LLFloaterReporter::showFromMenu(COMPLAINT_REPORT); +} + +void handle_buy_currency() +{ + LLFloaterBuyCurrency::buyCurrency(); +} + + class LLFloaterVisible : public view_listener_t { @@ -5558,11 +5569,6 @@ class LLFloaterVisible : public view_listener_t { std::string floater_name = userdata.asString(); bool new_value = false; - if (floater_name == "toolbar") - { - new_value = LLToolBar::visible(NULL); - } - else { new_value = LLFloaterReg::instanceVisible(floater_name); } @@ -5586,7 +5592,15 @@ class LLShowSidetrayPanel : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string panel_name = userdata.asString(); - LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + // Open up either the sidepanel or new floater. + if (LLSideTray::getInstance()->isPanelActive(panel_name)) + { + LLFloaterInventory::showAgentInventory(); + } + else + { + LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + } return true; } }; @@ -5841,47 +5855,68 @@ void confirm_replace_attachment(S32 option, void* user_data) } } -class LLAttachmentDrop : public view_listener_t +bool callback_attachment_drop(const LLSD& notification, const LLSD& response) { - bool handleEvent(const LLSD& userdata) + // Called when the user clicked on an object attached to them + // and selected "Drop". + LLUUID object_id = notification["payload"]["object_id"].asUUID(); + LLViewerObject *object = gObjectList.findObject(object_id); + + if (!object) { - // Called when the user clicked on an object attached to them - // and selected "Drop". - LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (!object) - { - llwarns << "handle_drop_attachment() - no object to drop" << llendl; - return true; - } + llwarns << "handle_drop_attachment() - no object to drop" << llendl; + return true; + } - LLViewerObject *parent = (LLViewerObject*)object->getParent(); - while (parent) + LLViewerObject *parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if(parent->isAvatar()) { - if(parent->isAvatar()) - { - break; - } - object = parent; - parent = (LLViewerObject*)parent->getParent(); + break; } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } - if (!object) + if (!object) + { + llwarns << "handle_detach() - no object to detach" << llendl; + return true; + } + + if (object->isAvatar()) + { + llwarns << "Trying to detach avatar from avatar." << llendl; + return true; + } + + // reselect the object + LLSelectMgr::getInstance()->selectObjectAndFamily(object); + + LLSelectMgr::getInstance()->sendDropAttachment(); + + return true; +} + +class LLAttachmentDrop : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLSD payload; + LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + + if (object) { - llwarns << "handle_detach() - no object to detach" << llendl; - return true; + payload["object_id"] = object->getID(); } - - if (object->isAvatar()) + else { - llwarns << "Trying to detach avatar from avatar." << llendl; + llwarns << "Drop object not found" << llendl; return true; } - // The sendDropAttachment() method works on the list of selected - // objects. Thus we need to clear the list, make sure it only - // contains the object the user clicked, send the message, - // then clear the list. - LLSelectMgr::getInstance()->sendDropAttachment(); + LLNotificationsUtil::add("AttachmentDrop", LLSD(), payload, &callback_attachment_drop); return true; } }; @@ -6006,7 +6041,7 @@ public: protected: virtual void done() { - gPieAttachment->buildDrawLabels(); + gMenuAttachmentSelf->buildDrawLabels(); gInventory.removeObserver(this); delete this; } @@ -7597,6 +7632,7 @@ void initialize_menus() view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); + commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar)); // View menu view_listener_t::addMenu(new LLViewMouselook(), "View.Mouselook"); @@ -7693,6 +7729,9 @@ void initialize_menus() // Advanced Other Settings view_listener_t::addMenu(new LLAdvancedClearGroupCache(), "Advanced.ClearGroupCache"); + // Advanced > Shortcuts + view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); + // Advanced > Render > Types view_listener_t::addMenu(new LLAdvancedToggleRenderType(), "Advanced.ToggleRenderType"); view_listener_t::addMenu(new LLAdvancedCheckRenderType(), "Advanced.CheckRenderType"); @@ -7921,9 +7960,11 @@ void initialize_menus() view_listener_t::addMenu(new LLLandEdit(), "Land.Edit"); view_listener_t::addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass"); + commit.add("Land.Buy", boost::bind(&handle_buy_land)); // Generic actions - view_listener_t::addMenu(new LLShowFloater(), "ShowFloater"); + commit.add("ReportAbuse", boost::bind(&handle_report_abuse)); + commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 01a6b34170..d3c34f0de4 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -36,6 +36,7 @@ #include "llmenugl.h" #include "llsafehandle.h" +class LLMessageSystem; class LLSD; class LLUICtrl; class LLView; @@ -160,21 +161,13 @@ extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView; -// Pie menus -extern LLContextMenu *gPieSelf; -extern LLContextMenu *gPieAvatar; -extern LLContextMenu *gPieObject; -extern LLContextMenu *gPieAttachment; - -extern LLContextMenu *gPieLand; -extern LLContextMenu *gPieRate; - -// Pie menus -extern LLContextMenu *gPieSelfSimple; -extern LLContextMenu *gPieAvatarSimple; -extern LLContextMenu *gPieObjectSimple; -extern LLContextMenu *gPieAttachmentSimple; -extern LLContextMenu *gPieLandSimple; +// Context menus in 3D scene +extern LLContextMenu *gMenuAvatarSelf; +extern LLContextMenu *gMenuAvatarOther; +extern LLContextMenu *gMenuObject; +extern LLContextMenu *gMenuAttachmentSelf; +extern LLContextMenu *gMenuAttachmentOther; +extern LLContextMenu *gMenuLand; // Needed to build menus when attachment site list available extern LLMenuGL* gAttachSubMenu; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index a1c3806b27..6bad8843fd 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -40,6 +40,12 @@ #include "llfloaterreg.h" #include "llfloaterbuycurrency.h" #include "llfloatersnapshot.h" +#include "llimage.h" +#include "llimagebmp.h" +#include "llimagepng.h" +#include "llimagej2c.h" +#include "llimagejpeg.h" +#include "llimagetga.h" #include "llinventorymodel.h" // gInventory #include "llresourcedata.h" #include "llfloaterperms.h" @@ -47,6 +53,8 @@ #include "llviewercontrol.h" // gSavedSettings #include "llviewertexturelist.h" #include "lluictrlfactory.h" +#include "llvfile.h" +#include "llvfs.h" #include "llviewerinventory.h" #include "llviewermenu.h" // gMenuHolder #include "llviewerregion.h" @@ -67,6 +75,7 @@ #include "lltransactiontypes.h" #include "lluuid.h" #include "llvorbisencode.h" +#include "message.h" // system libraries #include <boost/tokenizer.hpp> diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index da78537a29..1e6d13f1c6 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -34,6 +34,7 @@ #define LLVIEWERMENUFILE_H #include "llfoldertype.h" +#include "llassetstorage.h" #include "llinventorytype.h" class LLTransactionID; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 31bd264e3a..6a31bbfa1e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -38,8 +38,14 @@ #include "lleconomy.h" #include "llfloaterreg.h" #include "llfollowcamparams.h" +#include "llregionhandle.h" #include "llsdserialize.h" +#include "llteleportflags.h" #include "lltransactionflags.h" +#include "llvfile.h" +#include "llvfs.h" +#include "llxfermanager.h" +#include "mean_collision_data.h" #include "llagent.h" #include "llcallingcard.h" @@ -59,7 +65,6 @@ #include "llnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelgrouplandmoney.h" #include "llpanelplaces.h" #include "llrecentpeople.h" @@ -926,34 +931,40 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f void inventory_offer_mute_callback(const LLUUID& blocked_id, const std::string& first_name, const std::string& last_name, - BOOL is_group) + BOOL is_group, LLOfferInfo* offer = NULL) { std::string from_name; LLMute::EType type; - if (is_group) { type = LLMute::GROUP; from_name = first_name; } + else if(offer && offer->mFromObject) + { + //we have to block object by name because blocked_id is an id of owner + type = LLMute::BY_NAME; + from_name = offer->mFromName; + } else { type = LLMute::AGENT; from_name = first_name + " " + last_name; } - LLMute mute(blocked_id, from_name, type); + // id should be null for BY_NAME mute, see LLMuteList::add for details + LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type); if (LLMuteList::getInstance()->add(mute)) { LLPanelBlockedList::showPanelAndSelect(blocked_id); } // purge the message queue of any previously queued inventory offers from the same source. - class OfferMatcher : public LLNotifyBoxView::Matcher + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher { public: OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - BOOL matches(const LLNotificationPtr notification) const + bool matches(const LLNotificationPtr notification) const { if(notification->getName() == "ObjectGiveItem" || notification->getName() == "ObjectGiveItemUnknownUser" @@ -966,7 +977,9 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, private: const LLUUID& blocked_id; }; - gNotifyBoxView->purgeMessagesMatching(OfferMatcher(blocked_id)); + + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } LLOfferInfo::LLOfferInfo(const LLSD& sd) @@ -1062,9 +1075,31 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // * we can't build two messages at once. if (2 == button) { - gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); + gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this)); } + // *NOTE dzaporozhan + // Restored from viewer-1-23 to fix EXT-3520 + // Saves Group Notice Attachments to inventory. + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ImprovedInstantMessage); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_MessageBlock); + msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); + msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); + msg->addUUIDFast(_PREHASH_ID, mTransactionID); + msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary + std::string name; + LLAgentUI::buildFullname(name); + msg->addStringFast(_PREHASH_FromAgentName, name); + msg->addStringFast(_PREHASH_Message, ""); + msg->addU32Fast(_PREHASH_ParentEstateID, 0); + msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); + msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); + std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. @@ -1116,6 +1151,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // Show falls through to accept. case IOR_ACCEPT: + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), sizeof(mFolderID.mData)); + msg->sendReliable(mHost); + //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { @@ -1196,7 +1235,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // * we can't build two messages at once. if (2 == button) { - gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); + gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this)); } LLMessageSystem* msg = gMessageSystem; @@ -1473,6 +1512,8 @@ void inventory_offer_handler(LLOfferInfo* info) // Note: sets inventory_task_offer_callback as the callback p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_task_offer_callback, info, _1, _2)); p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; + // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. + LLNotifications::instance().add(p); } else // Agent -> Agent Inventory Offer { @@ -1496,18 +1537,14 @@ void inventory_offer_handler(LLOfferInfo* info) // In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages). info->send_auto_receive_response(); - } - // Pop up inv offer notification and let the user accept (keep), or reject (and silently delete) the inventory. - LLNotifications::instance().add(p); - - // TODO(EM): Recheck this after we will know how script notifications should look like. - // Inform user that there is a script floater via toast system - // { - // payload["give_inventory_notification"] = TRUE; - // LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); - // LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID()); - // } + // Inform user that there is a script floater via toast system + { + payload["give_inventory_notification"] = TRUE; + LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); + LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID()); + } + } } bool lure_callback(const LLSD& notification, const LLSD& response) @@ -4831,24 +4868,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT)); // purge the message queue of any previously queued requests from the same source. DEV-4879 - class OfferMatcher : public LLNotifyBoxView::Matcher + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher { public: OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - BOOL matches(const LLNotificationPtr notification) const + bool matches(const LLNotificationPtr notification) const { if (notification->getName() == "ScriptQuestionCaution" || notification->getName() == "ScriptQuestion") { return (notification->getPayload()["item_id"].asUUID() == blocked_id); } - return FALSE; + return false; } private: const LLUUID& blocked_id; }; - // should do this via the channel - gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id)); + + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); } if (response["Details"]) @@ -5292,6 +5330,7 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { std::string text = response["message"].asString(); + text.append("\r\n").append(LLAgentUI::buildSLURL()); S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 1a98828010..8404d6fde0 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -33,10 +33,12 @@ #ifndef LL_LLVIEWERMESSAGE_H #define LL_LLVIEWERMESSAGE_H +#include "llassettype.h" #include "llinstantmessage.h" #include "llpointer.h" #include "lltransactiontypes.h" #include "lluuid.h" +#include "message.h" #include "stdenums.h" // @@ -47,6 +49,7 @@ class LLInventoryObject; class LLInventoryItem; class LLMeanCollisionData; class LLMessageSystem; +class LLVFS; class LLViewerObject; class LLViewerRegion; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 801c46035a..d7b55d7e97 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -34,8 +34,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewernetwork.h" -#include "llviewercontrol.h" + #include "llevents.h" +#include "net.h" + +#include "llviewercontrol.h" #include "lllogin.h" struct LLGridData diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 7a1abfd4e8..be68a2ef42 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -54,7 +54,6 @@ #include "llfloatergroups.h" #include "llfloatersellland.h" #include "llfloatertools.h" -#include "llnotify.h" #include "llparcelselection.h" #include "llresmgr.h" #include "llsdutil.h" diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 6a0ad5757f..50f905416c 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -41,17 +41,6 @@ #include "linden_common.h" -// We may want to take the windows.h include out, but it used to be in -// linden_common.h, and hence in all the libraries. This is better. JC -#if LL_WINDOWS - // Limit Windows API to small and manageable set. - // If you get undefined symbols, find the appropriate - // Windows header file and include that in your .cpp file. - #define WIN32_LEAN_AND_MEAN - #include <winsock2.h> - #include <windows.h> -#endif - // Work around stupid Microsoft STL warning #ifdef LL_WINDOWS #pragma warning (disable : 4702) // warning C4702: unreachable code @@ -76,21 +65,14 @@ //#include "llpreprocessor.h" #include "llallocator.h" #include "llapp.h" -#include "llapr.h" #include "llcriticaldamp.h" -//#include "lldarray.h" -//#include "lldarrayptr.h" #include "lldefs.h" #include "lldepthstack.h" -//#include "lldqueueptr.h" -#include "llendianswizzle.h" #include "llerror.h" #include "llfasttimer.h" #include "llframetimer.h" #include "llhash.h" #include "lllocalidhashmap.h" -#include "llmap.h" -//#include "llmemory.h" #include "llnametable.h" #include "llpointer.h" #include "llpriqueuemap.h" @@ -100,7 +82,6 @@ //#include "llsecondlifeurls.h" #include "llsd.h" #include "llsingleton.h" -#include "llstack.h" #include "llstat.h" #include "llstl.h" #include "llstrider.h" @@ -117,19 +98,7 @@ #include "timing.h" #include "u64.h" -// Library includes from llimage -//#include "llblockdata.h" -#include "llimage.h" -#include "llimagebmp.h" -#include "llimagepng.h" -#include "llimagej2c.h" -#include "llimagejpeg.h" -#include "llimagetga.h" -#include "llmapimagetype.h" - // Library includes from llmath project -//#include "camera.h" -//#include "coordframe.h" #include "llmath.h" #include "llbboxlocal.h" #include "llcamera.h" @@ -157,80 +126,11 @@ ////#include "vmath.h" #include "xform.h" -// Library includes from llmessage project -//#include "llassetstorage.h" -#include "llcachename.h" -#include "llcircuit.h" -#include "lldatapacker.h" -#include "lldbstrings.h" -#include "lldispatcher.h" -#include "lleventflags.h" -#include "llhost.h" -#include "llinstantmessage.h" -#include "llinvite.h" -//#include "llloginflags.h" -#include "llmail.h" -#include "llmessagethrottle.h" -#include "llnamevalue.h" -#include "llpacketack.h" -#include "llpacketbuffer.h" -#include "llpacketring.h" -#include "llpartdata.h" -//#include "llqueryflags.h" -//#include "llregionflags.h" -#include "llregionhandle.h" -#include "lltaskname.h" -#include "llteleportflags.h" -#include "llthrottle.h" -#include "lltransfermanager.h" -#include "lltransfersourceasset.h" -#include "lltransfersourcefile.h" -#include "lltransfertargetfile.h" -#include "lltransfertargetvfile.h" -#include "lluseroperation.h" -#include "llvehicleparams.h" -#include "llxfer.h" -#include "llxfer_file.h" -#include "llxfer_mem.h" -#include "llxfer_vfile.h" -#include "llxfermanager.h" -#include "machine.h" -#include "mean_collision_data.h" -#include "message.h" -#include "message_prehash.h" -#include "net.h" -//#include "network.h" -#include "partsyspacket.h" -#include "patch_code.h" -#include "patch_dct.h" -#include "sound_ids.h" - -// Builds work with all headers below commented out as of 2009-09-10 JC - -// Library includes from llprimitive -#include "imageids.h" -#include "legacy_object_types.h" -#include "llmaterialtable.h" -//#include "llprimitive.h" -#include "lltextureanim.h" -//#include "lltextureentry.h" -#include "lltreeparams.h" -//#include "llvolume.h" -#include "llvolumemgr.h" -#include "material_codes.h" - // Library includes from llvfs -#include "llassettype.h" #include "lldir.h" -//#include "lldir_linux.h" -//#include "lldir_mac.h" -//#include "lldir_win32.h" -#include "llvfile.h" -#include "llvfs.h" -// Library includes from llui -// In skinning-7, llui.h dependencies are changing too often. -//#include "llui.h" +// Library includes from llmessage project +#include "llcachename.h" // llxuixml #include "llinitparam.h" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index d1c9840a97..77d2d493bd 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1421,6 +1421,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url) setCapability("Seed", url); LLSD capabilityNames = LLSD::emptyArray(); + + capabilityNames.append("AttachmentResources"); capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("DispatchRegionInfo"); @@ -1434,6 +1436,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("GetTexture"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); + capabilityNames.append("LandResources"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("NewFileAgentInventory"); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 939d5e3970..8059f866ba 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llmemory.h" #include "lltimer.h" +#include "llvfile.h" #include "llappviewer.h" @@ -655,9 +656,9 @@ void update_statistics(U32 frame_count) gObjectBits = 0; // gDecodedBits = 0; - // Only update texture stats ones per second so that they are less noisy + // Only update texture stats periodically so that they are less noisy { - static const F32 texture_stats_freq = 1.f; + static const F32 texture_stats_freq = 10.f; static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index e0091145ce..300aea1620 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -51,7 +51,6 @@ #include "llmenugl.h" #include "llnotecard.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelplaces.h" #include "llpreview.h" #include "llpreviewnotecard.h" diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index a5a40e9c2c..ae9db94000 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -108,6 +108,19 @@ const F64 log_2 = log(2.0); //---------------------------------------------------------------------------------------------- //namespace: LLViewerTextureAccess //---------------------------------------------------------------------------------------------- + +LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb, + S32 discard_level, + BOOL need_imageraw, // Needs image raw for the callback + void* userdata ) + : mCallback(cb), + mLastUsedDiscard(MAX_DISCARD_LEVEL+1), + mDesiredDiscard(discard_level), + mNeedsImageRaw(need_imageraw), + mUserData(userdata) +{ +} + LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image) { return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ; @@ -1484,7 +1497,8 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { priority += 10000000.f; } - else if(mAdditionalDecodePriority > 0.0f) + + if(mAdditionalDecodePriority > 0.0f) { // 1-9 S32 additional_priority = (S32)(1.0f + mAdditionalDecodePriority*8.0f + .5f); // round diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 141979052d..d6fbd5d570 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -49,12 +49,14 @@ class LLFace; class LLImageGL ; +class LLImageRaw; class LLViewerObject; class LLViewerTexture; class LLViewerFetchedTexture ; class LLViewerMediaTexture ; class LLTexturePipelineTester ; + typedef void (*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); class LLVFile; @@ -68,14 +70,7 @@ public: LLLoadedCallbackEntry(loaded_callback_func cb, S32 discard_level, BOOL need_imageraw, // Needs image raw for the callback - void* userdata ) - : mCallback(cb), - mLastUsedDiscard(MAX_DISCARD_LEVEL+1), - mDesiredDiscard(discard_level), - mNeedsImageRaw(need_imageraw), - mUserData(userdata) - { - } + void* userdata ); loaded_callback_func mCallback; S32 mLastUsedDiscard; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e066546bd8..8252b7df00 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -588,7 +588,7 @@ void LLViewerTextureList::updateImages(F32 max_time) F32 total_max_time = max_time; max_time -= updateImagesFetchTextures(max_time); - max_time = llmax(max_time, total_max_time*.25f); // at least 25% of max_time + max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time max_time -= updateImagesCreateTextures(max_time); if (!mDirtyTextureList.empty()) diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 028f8441ab..ab55bfd04d 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -53,6 +53,7 @@ const BOOL GL_TEXTURE_NO = FALSE; const BOOL IMMEDIATE_YES = TRUE; const BOOL IMMEDIATE_NO = FALSE; +class LLImageJ2C; class LLMessageSystem; class LLTextureView; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8529a93527..5c86822787 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "llviewerwindow.h" + #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif @@ -46,7 +48,6 @@ #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" -#include "llviewerwindow.h" #include "llviewquery.h" #include "llxmltree.h" @@ -82,7 +83,6 @@ // newview includes #include "llagent.h" -#include "llalertdialog.h" #include "llbox.h" #include "llconsole.h" #include "llviewercontrol.h" @@ -129,7 +129,6 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" -#include "llnotify.h" #include "lloverlaybar.h" #include "llpreviewtexture.h" #include "llprogressview.h" @@ -259,19 +258,21 @@ public: virtual void recordMessage(LLError::ELevel level, const std::string& message) { - // only log warnings to chat console - if (level == LLError::LEVEL_WARN) - { - LLFloaterChat* chat_floater = LLFloaterReg::findTypedInstance<LLFloaterChat>("chat"); - if (chat_floater && gSavedSettings.getBOOL("WarningsAsChat")) - { - LLChat chat; - chat.mText = message; - chat.mSourceType = CHAT_SOURCE_SYSTEM; + //FIXME: this is NOT thread safe, and will do bad things when a warning is issued from a non-UI thread - chat_floater->addChat(chat, FALSE, FALSE); - } - } + // only log warnings to chat console + //if (level == LLError::LEVEL_WARN) + //{ + //LLFloaterChat* chat_floater = LLFloaterReg::findTypedInstance<LLFloaterChat>("chat"); + //if (chat_floater && gSavedSettings.getBOOL("WarningsAsChat")) + //{ + // LLChat chat; + // chat.mText = message; + // chat.mSourceType = CHAT_SOURCE_SYSTEM; + + // chat_floater->addChat(chat, FALSE, FALSE); + //} + //} } }; @@ -1012,7 +1013,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) { mActive = FALSE; - if (gSavedSettings.getBOOL("AllowIdleAFK")) + if (gSavedSettings.getS32("AFKTimeout")) { gAgent.setAFK(); } @@ -1450,7 +1451,6 @@ void LLViewerWindow::initBase() gDebugView = getRootView()->getChild<LLDebugView>("DebugView"); gDebugView->init(); - gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container"); gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view"); // Add the progress bar view (startup view), which overrides everything @@ -1529,12 +1529,12 @@ void LLViewerWindow::initWorldUI() if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { - toggle_show_navigation_panel(LLSD(0)); + navbar->showNavigationPanel(FALSE); } if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel")) { - toggle_show_favorites_panel(LLSD(0)); + navbar->showFavoritesPanel(FALSE); } if (!gSavedSettings.getBOOL("ShowCameraButton")) @@ -1628,8 +1628,6 @@ void LLViewerWindow::shutdownViews() gMorphView = NULL; gHUDView = NULL; - - gNotifyBoxView = NULL; } void LLViewerWindow::shutdownGL() @@ -1997,9 +1995,6 @@ void LLViewerWindow::draw() #if LL_DEBUG LLView::sIsDrawing = FALSE; #endif - - // UI post-draw Updates - gNotifyBoxView->updateNotifyBoxView(); } // Takes a single keydown event, usually when UI is visible @@ -2595,7 +2590,6 @@ void LLViewerWindow::updateUI() else if (dynamic_cast<LLUICtrl*>(viewp) && viewp != gMenuHolder && viewp != gFloaterView - && viewp != gNotifyBoxView && viewp != gConsole) { if (dynamic_cast<LLFloater*>(viewp)) @@ -3140,7 +3134,6 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback return; } - // push back pick info object BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) { @@ -3149,27 +3142,8 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback pick_transparent = TRUE; } - // center initial pick frame buffer region under mouse cursor - // since that area is guaranteed to be onscreen and hence a valid - // part of the framebuffer - if (mPicks.empty()) - { - mPickScreenRegion.setCenterAndSize(x, y_from_bot, PICK_DIAMETER, PICK_DIAMETER); - - if (mPickScreenRegion.mLeft < mWorldViewRectScaled.mLeft) mPickScreenRegion.translate(mWorldViewRectScaled.mLeft - mPickScreenRegion.mLeft, 0); - if (mPickScreenRegion.mBottom < mWorldViewRectScaled.mBottom) mPickScreenRegion.translate(0, mWorldViewRectScaled.mBottom - mPickScreenRegion.mBottom); - if (mPickScreenRegion.mRight > mWorldViewRectScaled.mRight ) mPickScreenRegion.translate(mWorldViewRectScaled.mRight - mPickScreenRegion.mRight, 0); - if (mPickScreenRegion.mTop > mWorldViewRectScaled.mTop ) mPickScreenRegion.translate(0, mWorldViewRectScaled.mTop - mPickScreenRegion.mTop); - } - - // set frame buffer region for picking results - // stack multiple picks left to right - LLRect screen_region = mPickScreenRegion; - screen_region.translate(mPicks.size() * PICK_DIAMETER, 0); - - LLPickInfo pick(LLCoordGL(x, y_from_bot), screen_region, mask, pick_transparent, TRUE, callback); - - schedulePick(pick); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, TRUE, callback); + schedulePick(pick_info); } void LLViewerWindow::schedulePick(LLPickInfo& pick_info) @@ -3184,10 +3158,11 @@ void LLViewerWindow::schedulePick(LLPickInfo& pick_info) return; } - llassert_always(pick_info.mScreenRegion.notEmpty()); mPicks.push_back(pick_info); // delay further event processing until we receive results of pick + // only do this for async picks so that handleMouseUp won't be called + // until the pick triggered in handleMouseDown has been processed, for example mWindow->delayInputProcessing(); } @@ -3235,20 +3210,18 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans return LLPickInfo(); } - pickAsync(x, y_from_bot, gKeyboard->currentMask(TRUE), NULL, pick_transparent); - // assume that pickAsync put the results in the back of the mPicks list - if(mPicks.size() != 0) - { - mLastPick = mPicks.back(); - mLastPick.fetchResults(); - mPicks.pop_back(); - } - else + BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); + if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) { - lldebugs << "List of last picks is empty: Using stub pick" << llendl; - mLastPick = LLPickInfo(); + // build mode allows interaction with all transparent objects + // "Show Debug Alpha" means no object actually transparent + pick_transparent = TRUE; } + // shortcut queueing in mPicks and just update mLastPick in place + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), gKeyboard->currentMask(TRUE), pick_transparent, TRUE, NULL); + mLastPick.fetchResults(); + return mLastPick; } @@ -4895,13 +4868,11 @@ LLPickInfo::LLPickInfo() } LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, - const LLRect& screen_region, MASK keyboard_mask, BOOL pick_transparent, BOOL pick_uv_coords, void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), - mScreenRegion(screen_region), mKeyMask(keyboard_mask), mPickCallback(pick_callback), mPickType(PICK_INVALID), diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 1d564a1338..b488276a18 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -50,6 +50,7 @@ #include "llmousehandler.h" #include "llcursortypes.h" #include "llhandle.h" +#include "llimage.h" #include <boost/function.hpp> #include <boost/signals2.hpp> @@ -88,7 +89,6 @@ public: public: LLPickInfo(); LLPickInfo(const LLCoordGL& mouse_pos, - const LLRect& screen_region, MASK keyboard_mask, BOOL pick_transparent, BOOL pick_surface_info, @@ -120,7 +120,6 @@ public: LLVector3 mNormal; LLVector3 mBinormal; BOOL mPickTransparent; - LLRect mScreenRegion; void getSurfaceInfo(); private: @@ -345,7 +344,6 @@ public: void performPick(); void returnEmptyPicks(); - void pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE); LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, @@ -397,7 +395,7 @@ public: private: bool shouldShowToolTipFor(LLMouseHandler *mh); static bool onAlert(const LLSD& notify); - + void switchToolByMask(MASK mask); void destroyWindow(); void drawMouselookInstructions(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 226d85ec99..6e93bf1bf2 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -45,6 +45,7 @@ #include "llaudioengine.h" #include "noise.h" +#include "sound_ids.h" #include "llagent.h" // Get state values from here #include "llagentwearables.h" @@ -64,7 +65,6 @@ #include "llkeyframewalkmotion.h" #include "llmutelist.h" #include "llmoveview.h" -#include "llnotify.h" #include "llquantize.h" #include "llregionhandle.h" #include "llresmgr.h" diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b4c45c23d4..ecd6b05ded 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2021,43 +2021,6 @@ void LLVOAvatarSelf::onCustomizeEnd() } } -// static -void LLVOAvatarSelf::onChangeSelfInvisible(BOOL newvalue) -{ - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if (avatarp) - { - if (newvalue) - { - // we have just requested to set the avatar's baked textures to invisible - avatarp->setInvisible(TRUE); - } - else - { - avatarp->setInvisible(FALSE); - } - } -} - -void LLVOAvatarSelf::setInvisible(BOOL newvalue) -{ - if (newvalue) - { - setCompositeUpdatesEnabled(FALSE); - for (U32 i = 0; i < mBakedTextureDatas.size(); i++ ) - { - setNewBakedTexture(mBakedTextureDatas[i].mTextureIndex, IMG_INVISIBLE); - } - gAgent.sendAgentSetAppearance(); - } - else - { - setCompositeUpdatesEnabled(TRUE); - invalidateAll(); - gAgent.sendAgentSetAppearance(); - } -} - // HACK: this will null out the avatar's local texture IDs before the TE message is sent // to ensure local texture IDs are not sent to other clients in the area. // this is a short-term solution. The long term solution will be to not set the texture diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index c7bd4eaadc..dc70996f0b 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -308,8 +308,6 @@ public: // Visibility //-------------------------------------------------------------------- public: - static void onChangeSelfInvisible(BOOL newvalue); - void setInvisible(BOOL newvalue); bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; /** Appearance diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 175b6f1d10..69d2458217 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -122,6 +122,7 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess mSessionID(session_id), mState(STATE_NO_CHANNEL_INFO), mSessionName(session_name), + mCallDirection(OUTGOING_CALL), mIgnoreNextSessionLeave(FALSE) { mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName; @@ -228,7 +229,6 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) { // if forceably removed from channel // update the UI and revert to default channel - LLNotificationsUtil::add("VoiceChannelDisconnected", mNotifyArgs); deactivate(); } mIgnoreNextSessionLeave = FALSE; @@ -316,8 +316,6 @@ void LLVoiceChannel::activate() } } - sCurrentVoiceChannelChangedSignal(this->mSessionID); - if (mState == STATE_NO_CHANNEL_INFO) { // responsible for setting status to active @@ -327,6 +325,9 @@ void LLVoiceChannel::activate() { setState(STATE_CALL_STARTED); } + + //do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state + sCurrentVoiceChannelChangedSignal(this->mSessionID); } void LLVoiceChannel::getChannelInfo() @@ -405,7 +406,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) EState old_state = mState; mState = new_state; if (!mStateChangedCallback.empty()) - mStateChangedCallback(old_state, mState); + mStateChangedCallback(old_state, mState, mCallDirection); } //static @@ -740,6 +741,7 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) case STATUS_LEFT_CHANNEL: if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended) { + // *TODO: use it to show DECLINE voice notification if (mState == STATE_RINGING) { // other user declined call @@ -747,8 +749,7 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } else { - // other user hung up - LLNotificationsUtil::add("VoiceChannelDisconnectedP2P", mNotifyArgs); + // other user hung up } deactivate(); } diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 1bed329ba2..77801142cb 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -52,7 +52,13 @@ public: STATE_CONNECTED } EState; - typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state)> state_changed_signal_t; + typedef enum e_voice_channel_direction + { + INCOMING_CALL, + OUTGOING_CALL + } EDirection; + + typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction)> state_changed_signal_t; // on current channel changed signal typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t; @@ -87,6 +93,9 @@ public: void updateSessionID(const LLUUID& new_session_id); const LLSD& getNotifyArgs() { return mNotifyArgs; } + void setCallDirection(EDirection direction) {mCallDirection = direction;} + EDirection getCallDirection() {return mCallDirection;} + static LLVoiceChannel* getChannelByID(const LLUUID& session_id); static LLVoiceChannel* getChannelByURI(std::string uri); static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } @@ -103,6 +112,9 @@ protected: void doSetState(const EState& state); void setURI(std::string uri); + // there can be two directions ICOMING and OUTGOING + EDirection mCallDirection; + std::string mURI; std::string mCredentials; LLUUID mSessionID; @@ -175,9 +187,6 @@ public: void setSessionHandle(const std::string& handle, const std::string &inURI); - // returns TRUE if call is incoming and FALSE otherwise - BOOL isIncomingCall() { return mReceivedCall; } - protected: virtual void setState(EState state); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index aa69b46857..cfa1f05ec0 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -113,23 +113,15 @@ static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) static int scale_mic_volume(float volume) { // incoming volume has the range [0.0 ... 2.0], with 1.0 as the default. - // Map it as follows: 0.0 -> 40, 1.0 -> 44, 2.0 -> 75 - - volume -= 1.0f; // offset volume to the range [-1.0 ... 1.0], with 0 at the default. - int scaled_volume = 44; // offset scaled_volume by its default level - if(volume < 0.0f) - scaled_volume += ((int)(volume * 4.0f)); // (44 - 40) - else - scaled_volume += ((int)(volume * 31.0f)); // (75 - 44) - - return scaled_volume; + // Map it to Vivox levels as follows: 0.0 -> 30, 1.0 -> 50, 2.0 -> 70 + return 30 + (int)(volume * 20.0f); } static int scale_speaker_volume(float volume) { // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default. - // Map it as follows: 0.0 -> 0, 0.5 -> 50, 1.0 -> 100 - return (int)(volume * 100.0f); + // Map it to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70 + return 30 + (int)(volume * 40.0f); } class LLViewerVoiceAccountProvisionResponder : @@ -4271,7 +4263,6 @@ void LLVoiceClient::mediaStreamUpdatedEvent( { // Send the voice chat invite to the GUI layer // *TODO: Question: Should we correlate with the mute list here? - session->mIncoming = true; session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); session->mVoiceInvitePending = true; if(session->mName.empty()) @@ -6346,20 +6337,6 @@ LLVoiceClient::sessionState *LLVoiceClient::findSession(const LLUUID &participan return result; } -bool LLVoiceClient::isSessionIncoming(const LLUUID &session_id) -{ - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *session = *iter; - if(session->mIMSessionID == session_id) - { - return session->mIncoming; - break; - } - } - return false; -} - LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, const std::string &handle) { sessionState *result = NULL; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 92e79a004d..347fae6156 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -125,7 +125,7 @@ class LLVoiceClient: public LLSingleton<LLVoiceClient> void tuningCaptureStartSendMessage(int duration); void tuningCaptureStopSendMessage(); - void tuningSetMicVolume(float volume=0.5f); + void tuningSetMicVolume(float volume); void tuningSetSpeakerVolume(float volume); float tuningGetEnergy(void); @@ -527,8 +527,6 @@ static void updatePosition(void); // Currently this will be false only for PSTN P2P calls. // NOTE: this will return true if the session can't be found. bool isSessionTextIMPossible(const LLUUID &session_id); - - bool isSessionIncoming(const LLUUID &session_id); private: diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 08e12f4ad9..f98aa361e0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -68,6 +68,7 @@ #include "llmediaentry.h" #include "llmediadataclient.h" #include "llagent.h" +#include "llviewermediafocus.h" const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; @@ -138,8 +139,7 @@ public: } virtual bool isInterestingEnough() const { - // TODO: use performance manager to control this - return true; + return LLViewerMedia::isInterestingEnough(mObject, getMediaInterest()); } virtual std::string getCapabilityUrl(const std::string &name) const @@ -204,8 +204,8 @@ void LLVOVolume::markDead() if (!mDead) { LLMediaDataClientObject::ptr_t obj = new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false); - sObjectMediaClient->removeFromQueue(obj); - sObjectMediaNavigateClient->removeFromQueue(obj); + if (sObjectMediaClient) sObjectMediaClient->removeFromQueue(obj); + if (sObjectMediaNavigateClient) sObjectMediaNavigateClient->removeFromQueue(obj); // Detach all media impls from this object for(U32 i = 0 ; i < mMediaImplList.size() ; i++) @@ -222,15 +222,18 @@ void LLVOVolume::markDead() void LLVOVolume::initClass() { // gSavedSettings better be around - const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); - const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); - const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); - const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); - const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); - sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, - max_sorted_queue_size, max_round_robin_queue_size); - sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, - max_retries, max_sorted_queue_size, max_round_robin_queue_size); + if (gSavedSettings.getBOOL("PrimMediaMasterEnabled")) + { + const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); + const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); + const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); + const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); + const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); + sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, + max_sorted_queue_size, max_round_robin_queue_size); + sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, + max_retries, max_sorted_queue_size, max_round_robin_queue_size); + } } // static @@ -1719,14 +1722,15 @@ LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id) void LLVOVolume::requestMediaDataUpdate(bool isNew) { - sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); + if (sObjectMediaClient) + sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); } bool LLVOVolume::isMediaDataBeingFetched() const { // I know what I'm doing by const_casting this away: this is just // a wrapper class that is only going to do a lookup. - return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)); + return (sObjectMediaClient) ? sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)) : false; } void LLVOVolume::cleanUpMediaImpls() @@ -1925,7 +1929,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu // "bounce back" to the current URL from the media entry mediaNavigateBounceBack(face_index); } - else + else if (sObjectMediaNavigateClient) { llinfos << "broadcasting navigate with URI " << new_location << llendl; @@ -1994,7 +1998,8 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, void LLVOVolume::sendMediaDataUpdate() { - sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); + if (sObjectMediaClient) + sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); } void LLVOVolume::removeMediaImpl(S32 texture_index) @@ -2089,6 +2094,9 @@ viewer_media_t LLVOVolume::getMediaImpl(U8 face_id) const F64 LLVOVolume::getTotalMediaInterest() const { + if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == getID()) + return F64_MAX; + F64 interest = (F64)-1.0; // means not interested; int i = 0; const int end = getNumTEs(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 7433404942..a287d34402 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -37,7 +37,6 @@ #include "llviewertexture.h" #include "llviewermedia.h" #include "llframetimer.h" -#include "llapr.h" #include "m3math.h" // LLMatrix3 #include "m4math.h" // LLMatrix4 #include <map> diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 697fefee3a..8be8f494da 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -51,16 +51,13 @@ #include "llsdserialize.h" #include "v4math.h" -#include "llviewerdisplay.h" #include "llviewercontrol.h" -#include "llviewerwindow.h" #include "lldrawpoolwater.h" #include "llagent.h" #include "llviewerregion.h" #include "llwlparammanager.h" #include "llwaterparamset.h" -#include "llpostprocess.h" #include "llfloaterwater.h" #include "curl/curl.h" diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 0405b9d28b..b789bd3650 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -356,7 +356,7 @@ BOOL LLWearable::importFile( LLFILE* file ) if( num_parameters != mVisualParamIndexMap.size() ) { - llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. " << llendl; + llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. type: " << mType << llendl; } // parameters diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 82d388ab7e..7a579b248e 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -127,6 +127,7 @@ public: void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake ); void revertValues(); + void saveValues(); BOOL isOnTop() const; @@ -143,7 +144,6 @@ private: void createLayers(S32 te); void createVisualParams(); - void saveValues(); void syncImages(te_map_t &src, te_map_t &dst); void destroyTextures(); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 31047413ef..5636256856 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -41,7 +41,6 @@ #include "llviewerinventory.h" #include "llviewerstats.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llinventorymodel.h" #include "lltrans.h" @@ -250,9 +249,13 @@ LLWearable* LLWearableList::createNewWearable( EWearableType type ) wearable->setParamsToDefaults(); wearable->setTexturesToDefaults(); + //mark all values (params & images) as saved + wearable->saveValues(); + // Send to the dataserver wearable->saveNewAsset(); + return wearable; } diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 72431bd22f..f8bb7336db 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,14 +38,20 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() -#include "llviewerwindow.h" -#include "llviewercontrol.h" +#include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" -#include "llalertdialog.h" +#include "lllogininstance.h" +#include "llsd.h" #include "lltoastalertpanel.h" +#include "llui.h" +#include "lluri.h" +#include "llversioninfo.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerwindow.h" -class URLLoader : public LLAlertURLLoader +class URLLoader : public LLToastAlertPanel::URLLoader { virtual void load(const std::string& url , bool force_open_externally) { @@ -65,7 +71,6 @@ static URLLoader sAlertURLLoader; // static void LLWeb::initClass() { - LLAlertDialog::setURLLoader(&sAlertURLLoader); LLToastAlertPanel::setURLLoader(&sAlertURLLoader); } @@ -124,3 +129,24 @@ std::string LLWeb::escapeURL(const std::string& url) } return escaped_url; } + +//static +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) +{ + LLSD substitution = default_subs; + substitution["VERSION"] = LLVersionInfo::getVersion(); + substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor(); + substitution["VERSION_MINOR"] = LLVersionInfo::getMinor(); + substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); + substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); + substitution["CHANNEL"] = LLVersionInfo::getChannel(); + substitution["LANGUAGE"] = LLUI::getLanguage(); + substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + + std::string expanded_url = url; + LLStringUtil::format(expanded_url, substitution); + + return LLWeb::escapeURL(expanded_url); +} diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index 96a53db2ca..f4666c9280 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -57,8 +57,11 @@ public: /// Load the given url in the operating system's web browser static void loadURLExternal(const std::string& url); - // Returns escaped url (eg, " " to "%20") - used by all loadURL methods + /// Returns escaped url (eg, " " to "%20") - used by all loadURL methods static std::string escapeURL(const std::string& url); + /// Expands various strings like [LANG], [VERSION], etc. in a URL + static std::string expandURLSubstitutions(const std::string &url, + const LLSD &default_subs); }; #endif diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index fcc43c2b1f..000d50795f 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -33,11 +33,13 @@ #include "llviewerprecompiledheaders.h" #include "llwldaycycle.h" -#include "llsdserialize.h" -#include "llwlparammanager.h" + #include "llnotificationsutil.h" +#include "llsdserialize.h" #include "llxmlnode.h" +#include "llwlparammanager.h" + #include <map> LLWLDayCycle::LLWLDayCycle() : mDayRate(120) diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index c3a70705cf..7cac564619 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -42,17 +42,12 @@ #include "llspinctrl.h" #include "llcheckboxctrl.h" #include "lluictrlfactory.h" -#include "llviewercamera.h" #include "llcombobox.h" #include "lllineeditor.h" #include "llsdserialize.h" #include "v4math.h" -#include "llviewerdisplay.h" #include "llviewercontrol.h" -#include "llviewerwindow.h" -#include "lldrawpoolwater.h" -#include "llviewerregion.h" #include "llwlparamset.h" #include "llpostprocess.h" diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 6a074d9697..06040a574c 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llworldmapmessage.h" +#include "message.h" #include "llworldmap.h" #include "llagent.h" diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index af8cb6b9fb..15417614af 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -21,13 +21,14 @@ // external library headers #include <boost/scoped_ptr.hpp> #include <boost/range.hpp> // boost::begin(), boost::end() +#include <xmlrpc-epi/xmlrpc.h> +#include "curl/curl.h" + // other Linden headers #include "llerror.h" #include "stringize.h" #include "llxmlrpctransaction.h" -#include <xmlrpc-epi/xmlrpc.h> - #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 282eddf380..73b5222ee3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7268,13 +7268,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) updateCull(camera, ref_result, 1); stateSort(camera, ref_result); } - else - { - gGL.setColorMask(true, true); - mWaterRef.clear(); - gGL.setColorMask(true, false); - } - + ref_mask = mRenderTypeMask; mRenderTypeMask = mask; } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index cdbeed111e..88e77f11ee 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -60,17 +60,14 @@ name="Red" value="1 0 0 1" /> <color - name="Green" - value="0 1 0 1" /> - <color name="Blue" value="0 0 1 1" /> <color name="Yellow" - value="1 1 0 1" /> + value="0.114 0.65 0.1" /> <color - name="Unused?" - value="1 0.5 0 1" /> + name="Green" + value="0 .39 .10 1" /> <color name="Transparent" value="0 0 0 0" /> @@ -378,7 +375,7 @@ reference="White_25" /> <color name="InventorySearchStatusColor" - reference="Black" /> + reference="EmphasisColor" /> <color name="LabelDisabledColor" reference="White_25" /> @@ -435,7 +432,7 @@ reference="DkGray" /> <color name="MenuBarGodBgColor" - reference="DkGray2" /> + reference="Green" /> <color name="MenuDefaultBgColor" reference="DkGray2" /> @@ -513,7 +510,7 @@ reference="White" /> <color name="ObjectChatColor" - reference="0.7 0.8 0.9 1" /> + reference="EmphasisColor" /> <color name="OverdrivenColor" value="1 0 0 1" /> @@ -687,5 +684,7 @@ <color name="ChatToastAgentNameColor" reference="EmphasisColor" /> - + <color + name="ColorSwatchBorderColor" + value="0.45098 0.517647 0.607843 1"/> </colors> diff --git a/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png Binary files differindex aa3898ca99..0ac5b72b8f 100644 --- a/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png +++ b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png diff --git a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png Binary files differindex 598342ea80..5c0c85b864 100644 --- a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png +++ b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png Binary files differindex 60676b43fd..dd9133bcc4 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png Binary files differindex 98cde96aff..0080e71f41 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 24d3512bcb..412f8b6d68 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -50,8 +50,10 @@ with the same filename but different name <texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" /> <texture name="Arrow_Right_Press" file_name="navbar/Arrow_Right_Press.png" preload="true" /> +<!-- <texture name="Arrow_Left" file_name="widgets/Arrow_Left.png" preload="true" /> <texture name="Arrow_Right" file_name="widgets/Arrow_Right.png" preload="true" /> +--> <texture name="Arrow_Small_Up" file_name="widgets/Arrow_Small_Up.png" preload="true" /> <texture name="Arrow_Small_Left" file_name="widgets/Arrow_Small_Left.png" preload="true" /> @@ -143,6 +145,7 @@ with the same filename but different name <texture name="DropDown_Over" file_name="widgets/DropDown_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="DropDown_Press" file_name="widgets/DropDown_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="DropDown_Selected" file_name="widgets/DropDown_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="DropDown_On" file_name="widgets/DropDown_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="DropDown_Off" file_name="widgets/DropDown_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" /> @@ -453,6 +456,7 @@ with the same filename but different name <texture name="SegmentedBtn_Left_Press" file_name="widgets/SegmentedBtn_Left_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Disabled" file_name="widgets/SegmentedBtn_Left_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Selected" file_name="widgets/SegmentedBtn_Left_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Selected_Over" file_name="widgets/SegmentedBtn_Left_Selected_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Selected_Press" file_name="widgets/SegmentedBtn_Left_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Selected_Disabled" file_name="widgets/SegmentedBtn_Left_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> @@ -592,9 +596,9 @@ with the same filename but different name <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="false" /> <texture name="Unread_Msg" file_name="bottomtray/Unread_Msg.png" preload="false" /> - - <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" /> - <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" /> + + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="VoicePTT_Lvl1" file_name="bottomtray/VoicePTT_Lvl1.png" preload="false" /> <texture name="VoicePTT_Lvl2" file_name="bottomtray/VoicePTT_Lvl2.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index f89ad2f997..6956b73371 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -18,6 +18,7 @@ single_instance="true" width="320"> <string name="nudge_parabuild">Nudge 1</string> + <string name="test_the_vlt">This string is extracted.</string> <chat_history allow_html="true" bg_readonly_color="ChatHistoryBgColor" diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 10b72144e7..a581190d18 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -274,7 +274,7 @@ <button enabled="false" follows="left|top" - height="23S" + height="23" label="Deed" layout="topleft" left_pad="2" @@ -472,6 +472,16 @@ top="328" width="100" /> <button + enabled="true" + follows="left|top" + height="23" + label="Script Info" + layout="topleft" + left="10" + name="Scripts..." + top="352" + width="100" /> + <button enabled="false" follows="left|top" height="23" @@ -1093,11 +1103,11 @@ <name_list.columns label="Count" name="count" - width="70" /> + width="60" /> <name_list.columns label="Most Recent" name="mostrecent" - width="160" /> + width="170" /> </name_list> </panel> <panel @@ -1561,7 +1571,7 @@ Only large parcels can be listed in search. left="10" name="at URL:" width="100"> - Home URL: + Home Page: </text> <line_editor follows="left|top" @@ -1590,7 +1600,7 @@ Only large parcels can be listed in search. left="10" name="CurrentURL:" width="100"> - Current URL: + Current Page: </text> <button follows="top|right" @@ -1672,9 +1682,7 @@ Only large parcels can be listed in search. name="replace_texture_help" width="300" word_wrap="true"> - Objects using this texture will show the movie or web page after you click the play arrow. - -Select the thumbnail to choose a different texture. + Objects using this texture will show the movie or web page after you click the play arrow. Select the thumbnail to choose a different texture. </text> <check_box height="16" diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index a0cb94eb69..54b6edb0ec 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="950" + height="650" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" @@ -16,9 +16,9 @@ length="1" height="16" layout="topleft" - left="10" + left="30" name="label" - top="24" + top="40" width="80"> Baked Textures </text> @@ -27,7 +27,7 @@ length="1" height="16" layout="topleft" - left_pad="60" + left_pad="50" name="composite_label" top_delta="0" width="120"> @@ -40,16 +40,37 @@ layout="topleft" left_pad="530" name="Dump" - top_delta="1" + top_delta="0" width="150" /> + <scroll_container + color="DkGray2" + opaque="true" + follows="all" + height="590" + layout="topleft" + left="5" + top_pad="5" + name="profile_scroll" + reserve_scroll_corner="false" + width="1240"> + <panel + name="scroll_content_panel" + follows="left|top" + min_height="300" + layout="topleft" + top="0" + background_visible="false" + height="950" + left="0" + width="1250"> <texture_picker height="143" label="Hair" layout="topleft" left="10" name="hair-baked" - top="47" + top="17" width="128" /> <texture_picker height="143" @@ -74,7 +95,7 @@ layout="topleft" left="10" name="head-baked" - top="197" + top="167" width="128" /> <texture_picker height="143" @@ -107,7 +128,7 @@ layout="topleft" left="10" name="eyes-baked" - top="347" + top="317" width="128" /> <texture_picker height="143" @@ -132,7 +153,7 @@ layout="topleft" left="10" name="upper-baked" - top="497" + top="467" width="128" /> <texture_picker height="143" @@ -197,7 +218,7 @@ layout="topleft" left="10" name="lower-baked" - top="647" + top="617" width="128" /> <texture_picker height="143" @@ -270,7 +291,7 @@ layout="topleft" left="10" name="skirt-baked" - top="797" + top="767" width="128" /> <texture_picker height="143" @@ -280,5 +301,6 @@ name="skirt" top_delta="0" width="128" /> - +</panel> +</scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index d378b427f1..a797d54749 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -2,8 +2,8 @@ <floater legacy_header_height="18" can_dock="true" - can_minimize="false" - can_close="true" + can_minimize="true" + can_close="false" center_horiz="true" follows="bottom" height="152" @@ -108,7 +108,7 @@ image_unselected="Cam_Rotate_Out" layout="topleft" left="45" - mouse_opaque="false" + mouse_opaque="false" name="cam_rotate_stick" quadrant="left" scale_image="false" diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 275ab5bb8b..ffdb59d44c 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -3,7 +3,7 @@ legacy_header_height="18" can_minimize="false" follows="left|top" - height="540" + height="607" layout="topleft" left_delta="-3" name="floater customize" @@ -11,30 +11,51 @@ save_rect="true" title="APPEARANCE" top_delta="-185" - width="494"> + width="524"> + <check_box + enabled="true" + height="23" + label="Show Attachments in Previews" + layout="topleft" + left="110" + name="show attachments" + tool_tip="Display attachments on your avatar in the preview panels below." + top="20" + width="146" /> <tab_container - height="483" + height="517" layout="topleft" - left="0" + left="10" name="customize tab container" tab_min_width="96" tab_position="left" - top="24" - width="492"> - <placeholder - label="Body Parts" - layout="topleft" - name="body_parts_placeholder" /> + tab_height="50" + top="50" + width="506"> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="5" + name="body_parts_placeholder" + font="SansSerifSmallBold" + top="10" + width="100"> + Body Parts + </text> + <placeholder /> <panel - border="true" + border="false" + background_visible="true" + bg_alpha_color="DkGray2" follows="left|top|right|bottom" - height="481" + height="508" label="Shape" layout="topleft" - left_delta="0" name="Shape" - top_delta="0" - width="389"> + width="400"> <icon follows="top|right" height="18" @@ -47,134 +68,132 @@ width="18" /> <icon height="16" + top="10" + left="10" layout="topleft" - left_delta="-325" mouse_opaque="true" - top_delta="3" width="16" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" - left="299" + right="390" name="Revert" - top="458" + top="477" width="82" /> <button follows="left|top" - height="16" + height="23" label="Body" label_selected="Body" layout="topleft" - left="8" + left="10" name="Body" - top="65" + top="63" width="82" /> <button follows="left|top" - height="16" + height="23" label="Head" label_selected="Head" layout="topleft" left_delta="0" name="Head" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Eyes" label_selected="Eyes" layout="topleft" left_delta="0" name="Eyes" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Ears" label_selected="Ears" layout="topleft" left_delta="0" name="Ears" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Nose" label_selected="Nose" layout="topleft" left_delta="0" name="Nose" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Mouth" label_selected="Mouth" layout="topleft" left_delta="0" name="Mouth" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Chin" label_selected="Chin" layout="topleft" left_delta="0" name="Chin" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Torso" label_selected="Torso" layout="topleft" left_delta="0" name="Torso" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Legs" label_selected="Legs" layout="topleft" left_delta="0" name="Legs" - top_pad="16" + top_pad="4" width="82" /> <radio_group control_name="AvatarSex" height="34" layout="topleft" - left_delta="0" name="sex radio" - top_pad="16" + top_pad="10" width="82"> <radio_item height="16" label="Female" layout="topleft" - left="1" name="radio" - top="1" + value="0" width="82" /> <radio_item height="16" label="Male" layout="topleft" - left_delta="0" name="radio2" - top_delta="16" + value="1" + top="32" width="82" /> </radio_group> <text @@ -184,9 +203,9 @@ font="SansSerif" height="16" layout="topleft" - left="8" + left="31" name="title" - top="8" + top="10" width="355"> [DESC] </text> @@ -197,9 +216,9 @@ font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_no_modify" - top_delta="0" + top="10" width="355"> [DESC]: cannot modify </text> @@ -210,9 +229,9 @@ font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_loading" - top_delta="0" + top="10" width="355"> [DESC]: loading... </text> @@ -223,9 +242,9 @@ font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_not_worn" - top_delta="0" + top="10" width="355"> [DESC]: not worn </text> @@ -233,11 +252,11 @@ type="string" length="1" follows="left|top" - height="14" + height="16" layout="topleft" - left="8" + left="10" name="path" - top="24" + top="36" width="373"> Located in [PATH] </text> @@ -247,9 +266,9 @@ follows="left|top|right" height="28" layout="topleft" - left_delta="0" + left="10" name="not worn instructions" - top_pad="8" + top="31" width="373"> Put on a new shape by dragging one from your inventory to your avatar. Alternately, you create a new one from @@ -270,58 +289,58 @@ scratch and wear it. <text type="string" length="1" - bottom="486" + top="488" follows="left|top|right" font="SansSerif" halign="right" - height="28" + height="23" layout="topleft" name="Item Action Label" - right="117" + right="132" width="100"> Shape: </text> <button follows="left|top" - height="24" + height="23" label="Create New Shape" label_selected="Create New Shape" layout="topleft" - left="8" + left="10" name="Create New" top="104" width="140" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" - left="123" name="Save" - top="458" + right="218" + top="477" width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="6" name="Save As" - top_delta="0" + top="477" + right="304" width="82" /> </panel> <panel - border="true" + border="false" + background_visible="true" + bg_alpha_color="DkGray2" follows="left|top|right|bottom" - height="481" + height="508" label="Skin" layout="topleft" - left_delta="0" name="Skin" - top_delta="0" - width="389"> + width="400"> <icon follows="top|right" height="18" @@ -333,52 +352,51 @@ scratch and wear it. top="4" width="18" /> <icon - follows="left|top" height="16" + top="10" + left="10" layout="topleft" - left="8" mouse_opaque="true" - top_delta="3" width="16" /> <button follows="left|top" - height="16" + height="23" label="Skin Color" label_selected="Skin Color" layout="topleft" - left_delta="0" + left="10" name="Skin Color" - top_pad="41" + top="63" width="82" /> <button follows="left|top" - height="16" + height="23" label="Face Detail" label_selected="Face Detail" layout="topleft" left_delta="0" name="Face Detail" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Makeup" label_selected="Makeup" layout="topleft" left_delta="0" name="Makeup" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Body Detail" label_selected="Body Detail" layout="topleft" left_delta="0" name="Body Detail" - top_pad="16" + top_pad="4" width="82" /> <text type="string" @@ -387,9 +405,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="8" + left="31" name="title" - top="8" + top="10" width="355"> [DESC] </text> @@ -400,9 +418,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_no_modify" - top_delta="0" + top="10" width="355"> [DESC]: cannot modify </text> @@ -413,9 +431,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_loading" - top_delta="0" + top="10" width="355"> [DESC]: loading... </text> @@ -426,9 +444,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_not_worn" - top_delta="0" + top="10" width="355"> [DESC]: not worn </text> @@ -438,9 +456,9 @@ scratch and wear it. follows="left|top|right" height="14" layout="topleft" - left="8" + left="10" name="path" - top="24" + top="36" width="373"> Located in [PATH] </text> @@ -450,9 +468,9 @@ scratch and wear it. follows="left|top|right" height="28" layout="topleft" - left_delta="0" + left="10" name="not worn instructions" - top_pad="8" + top="31" width="373"> Put on a new skin by dragging one from your inventory to your avatar. Alternately, you create a new one from @@ -473,14 +491,14 @@ scratch and wear it. <text type="string" length="1" - bottom="486" + top="488" follows="left|top|right" font="SansSerif" halign="right" - height="28" + height="23" layout="topleft" name="Item Action Label" - right="117" + right="132" width="100"> Skin: </text> @@ -489,43 +507,43 @@ scratch and wear it. can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="108" label="Head Tattoos" layout="topleft" - left="8" + left="10" name="Head Tattoos" tool_tip="Click to choose a picture" - top="193" - width="74" /> + top="176" + width="82" /> <texture_picker allow_no_texture="true" can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="108" label="Upper Tattoos" layout="topleft" left_delta="0" name="Upper Tattoos" tool_tip="Click to choose a picture" - top_delta="80" - width="74" /> + top_delta="102" + width="82" /> <texture_picker allow_no_texture="true" can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="108" label="Lower Tattoos" layout="topleft" left_delta="0" name="Lower Tattoos" tool_tip="Click to choose a picture" - top_delta="80" - width="74" /> + top_delta="102" + width="82" /> <button follows="left|top" - height="24" + height="23" label="Create New Skin" label_selected="Create New Skin" layout="topleft" @@ -535,45 +553,45 @@ scratch and wear it. width="120" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" - left="123" + right="218" name="Save" - top="458" + top="477" width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="6" + right="304" name="Save As" - top_delta="0" + top="477" width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="6" + right="390" name="Revert" - top_delta="0" + top="477" width="82" /> </panel> <panel - border="true" + border="false" + background_visible="true" + bg_alpha_color="DkGray2" follows="left|top|right|bottom" - height="481" + height="508" label="Hair" layout="topleft" - left_delta="0" name="Hair" - top_delta="0" - width="389"> + width="400"> <icon follows="top|right" height="18" @@ -586,50 +604,48 @@ scratch and wear it. width="18" /> <icon height="16" + top="10" + left="10" layout="topleft" - left="8" mouse_opaque="true" - top_delta="3" width="16" /> <button follows="left|top" - height="16" + height="23" label="Color" label_selected="Color" layout="topleft" - left_delta="0" + left="10" name="Color" - top_pad="41" + top="63" width="82" /> <button follows="left|top" - height="16" + height="23" label="Style" label_selected="Style" layout="topleft" left_delta="0" name="Style" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Eyebrows" label_selected="Eyebrows" layout="topleft" - left_delta="0" name="Eyebrows" - top_pad="16" + top_pad="4" width="82" /> <button follows="left|top" - height="16" + height="23" label="Facial" label_selected="Facial" layout="topleft" - left_delta="0" name="Facial" - top_pad="16" + top_pad="4" width="82" /> <text type="string" @@ -638,9 +654,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left="8" + left="31" name="title" - top="8" + top="10" width="355"> [DESC] </text> @@ -651,9 +667,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_no_modify" - top_delta="0" + top="10" width="355"> [DESC]: cannot modify </text> @@ -664,9 +680,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_loading" - top_delta="0" + top="10" width="355"> [DESC]: loading... </text> @@ -677,9 +693,9 @@ scratch and wear it. font="SansSerif" height="16" layout="topleft" - left_delta="0" + left="31" name="title_not_worn" - top_delta="0" + top="10" width="355"> [DESC]: not worn </text> @@ -689,9 +705,9 @@ scratch and wear it. follows="left|top|right" height="14" layout="topleft" - left="8" + left="10" name="path" - top="24" + top="36" width="373"> Located in [PATH] </text> @@ -701,9 +717,9 @@ scratch and wear it. follows="left|top|right" height="28" layout="topleft" - left_delta="0" + left="10" name="not worn instructions" - top_pad="8" + top="31" width="373"> Put on a new hair by dragging one from your inventory to your avatar. Alternately, you create a new one from @@ -724,14 +740,14 @@ scratch and wear it. <text type="string" length="1" - bottom="486" + top="488" follows="left|top|right" font="SansSerif" halign="right" - height="28" + height="23" layout="topleft" name="Item Action Label" - right="117" + right="132" width="100"> Hair: </text> @@ -739,17 +755,17 @@ scratch and wear it. can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="108" label="Texture" layout="topleft" - left="8" + left="10" name="Texture" tool_tip="Click to choose a picture" - top="193" - width="64" /> + top="176" + width="82" /> <button follows="left|top" - height="24" + height="23" label="Create New Hair" label_selected="Create New Hair" layout="topleft" @@ -759,33 +775,33 @@ scratch and wear it. width="120" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" - left="123" + right="218" name="Save" - top="458" + top="477" width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="6" + right="304" name="Save As" - top_delta="0" + top="477" width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="6" + right="390" name="Revert" - top_delta="0" + top="477" width="82" /> </panel> <panel @@ -933,7 +949,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Eyes" label_selected="Create New Eyes" layout="topleft" @@ -943,7 +959,7 @@ scratch and wear it. width="120" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -953,7 +969,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -963,7 +979,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -972,10 +988,20 @@ scratch and wear it. top_delta="0" width="82" /> </panel> - <placeholder - label="Clothes" - layout="topleft" - name="clothes_placeholder" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="5" + name="clothes_placeholder" + font="SansSerifSmallBold" + top="125" + width="100"> + Clothes + </text> + <placeholder /> <panel border="true" follows="left|top|right|bottom" @@ -1016,7 +1042,6 @@ scratch and wear it. top_pad="41" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -1029,7 +1054,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Shirt" label_selected="Create New Shirt" layout="topleft" @@ -1039,7 +1064,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -1049,7 +1074,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -1059,7 +1084,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -1069,7 +1094,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -1222,7 +1247,6 @@ scratch and wear it. top_pad="41" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -1235,7 +1259,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Pants" label_selected="Create New Pants" layout="topleft" @@ -1245,7 +1269,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -1255,7 +1279,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -1265,7 +1289,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -1275,7 +1299,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -1532,7 +1556,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -1545,7 +1568,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Shoes" label_selected="Create New Shoes" layout="topleft" @@ -1555,7 +1578,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -1565,7 +1588,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -1575,7 +1598,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -1585,7 +1608,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -1738,7 +1761,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -1751,7 +1773,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Socks" label_selected="Create New Socks" layout="topleft" @@ -1761,7 +1783,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -1771,7 +1793,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -1781,7 +1803,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -1791,7 +1813,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -1956,7 +1978,6 @@ scratch and wear it. top_delta="80" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -1969,7 +1990,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Jacket" label_selected="Create New Jacket" layout="topleft" @@ -1979,7 +2000,7 @@ scratch and wear it. width="140" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -1989,7 +2010,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -1999,7 +2020,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -2009,7 +2030,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -2162,7 +2183,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -2175,7 +2195,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Gloves" label_selected="Create New Gloves" layout="topleft" @@ -2185,7 +2205,7 @@ scratch and wear it. width="130" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -2195,7 +2215,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -2205,7 +2225,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -2215,7 +2235,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -2368,7 +2388,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -2381,7 +2400,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Undershirt" label_selected="Create New Undershirt" layout="topleft" @@ -2391,7 +2410,7 @@ scratch and wear it. width="160" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -2401,7 +2420,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -2411,7 +2430,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -2421,7 +2440,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -2574,7 +2593,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -2587,7 +2605,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Underpants" label_selected="Create New Underpants" layout="topleft" @@ -2597,7 +2615,7 @@ scratch and wear it. width="160" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -2607,7 +2625,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -2617,7 +2635,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -2627,7 +2645,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -2780,7 +2798,6 @@ scratch and wear it. top="65" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -2793,7 +2810,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Skirt" label_selected="Create New Skirt" layout="topleft" @@ -2803,7 +2820,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -2813,7 +2830,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -2823,7 +2840,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -2833,7 +2850,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -3080,7 +3097,7 @@ scratch and wear it. width="16" /> <button follows="left|top" - height="24" + height="23" label="Create New Alpha" label_selected="Create New Alpha" layout="topleft" @@ -3090,7 +3107,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -3100,7 +3117,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -3110,7 +3127,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -3120,7 +3137,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -3298,7 +3315,7 @@ scratch and wear it. width="64" /> <button follows="left|top" - height="24" + height="23" label="Create New Tattoo" label_selected="Create New Tattoo" layout="topleft" @@ -3308,7 +3325,7 @@ scratch and wear it. width="120" /> <button follows="left|top" - height="20" + height="23" label="Take Off" label_selected="Take Off" layout="topleft" @@ -3318,7 +3335,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save" label_selected="Save" layout="topleft" @@ -3328,7 +3345,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Save As..." label_selected="Save As..." layout="topleft" @@ -3338,7 +3355,7 @@ scratch and wear it. width="82" /> <button follows="right|bottom" - height="20" + height="23" label="Revert" label_selected="Revert" layout="topleft" @@ -3350,12 +3367,12 @@ scratch and wear it. </tab_container> <scroll_container follows="left|top|right|bottom" - height="382" + height="409" layout="topleft" - left="197" + left="211" mouse_opaque="false" name="panel_container" - top="94" + top="116" width="292"> <scrolling_panel_list follows="left|bottom" @@ -3363,19 +3380,29 @@ scratch and wear it. name="panel_list" /> </scroll_container> <button - bottom="536" - follows="right|bottom" + bottom="598" + follows="right|left" height="20" + label="Script Info" + label_selected="Script Info" + layout="topleft" + name="script_info" + left="2" + width="98" /> + <button + bottom="598" + follows="right|bottom" + height="23" label="Make Outfit" label_selected="Make Outfit" layout="topleft" name="make_outfit_btn" - right="-216" + right="-218" width="100" /> <button - bottom="536" + bottom="598" follows="right|bottom" - height="20" + height="23" label="Cancel" label_selected="Cancel" layout="topleft" @@ -3383,13 +3410,13 @@ scratch and wear it. right="-10" width="100" /> <button - bottom="536" + bottom="598" follows="right|bottom" - height="20" + height="23" label="OK" label_selected="OK" layout="topleft" name="Ok" - right="-116" + right="-114" width="100" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml index 35f3e643c3..8c5af2283d 100644 --- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml @@ -65,11 +65,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12am" follows="left|top|right" - height="6" + height="16" layout="topleft" left="8" name="WL12am" @@ -80,11 +78,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL3am" @@ -95,11 +91,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL6am" @@ -110,11 +104,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL9amHash" @@ -125,11 +117,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL12pmHash" @@ -140,11 +130,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL3pm" @@ -155,11 +143,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL6pm" @@ -170,11 +156,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL9pm" @@ -185,11 +169,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12am2" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL12am2" @@ -200,9 +182,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12amHash" follows="left|top|right" font="SansSerif" height="14" @@ -210,135 +190,119 @@ left="20" name="WL12amHash" top="54" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3amHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL3amHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6amHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL6amHash" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9amHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL9amHash2" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12pmHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL12pmHash2" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3pmHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL3pmHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6pmHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL6pmHash" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9pmHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL9pmHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12amHash2" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL12amHash2" top_delta="-3" - width="4"> + width="6"> | </text> <button @@ -346,9 +310,9 @@ label="Add Key" label_selected="Add Key" layout="topleft" - left="550" + left="555" name="WLAddKey" - top="20" + top="30" width="80" /> <button height="20" @@ -362,9 +326,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -378,9 +340,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -424,9 +384,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WLCurKeyTimeText" follows="left|top|right" font="SansSerif" height="16" @@ -456,9 +414,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -481,9 +437,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -542,9 +496,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -560,7 +512,7 @@ label="Play" label_selected="Play" layout="topleft" - left_delta="0" + left_delta="60" name="WLAnimSky" top_pad="5" width="50" /> @@ -581,7 +533,7 @@ left_pad="5" name="WLUseLindenTime" top_delta="0" - width="140" /> + width="150" /> <button height="20" label="Save Test Day" diff --git a/indra/newview/skins/default/xui/en/floater_env_settings.xml b/indra/newview/skins/default/xui/en/floater_env_settings.xml index 5e78037ee1..8c87bd42dd 100644 --- a/indra/newview/skins/default/xui/en/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_env_settings.xml @@ -98,7 +98,6 @@ Water Color </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.5 0.5 0.5 1" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 645c2973d8..57e92cdeec 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -8,18 +8,18 @@ left="0" name="panel_im" top="0" - can_close="true" can_dock="false" - can_minimize="false" + can_minimize="true" + can_close="true" visible="true" - width="300" + width="360" can_resize="true" - min_width="300" + min_width="360" min_height="350"> <layout_stack follows="all" height="320" - width="300" + width="360" layout="topleft" orientation="horizontal" name="im_panels" @@ -30,14 +30,15 @@ layout="topleft" follows="left" label="IM Control Panel" + min_width="115" auto_resize="false" - user_resize="false" /> + user_resize="true" /> <layout_panel left="0" top="0" height="200" - width="185" - user_resize="false"> + width="245" + user_resize="true"> <button height="20" follows="left|top" @@ -63,17 +64,17 @@ parse_highlights="true" allow_html="true" left="1" - width="180"> + width="240"> </chat_history> <line_editor - bottom="0" + bottom="0" follows="left|right|bottom" font="SansSerifSmall" height="20" label="To" layout="bottomleft" name="chat_editor" - width="180"> + width="240"> </line_editor> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index acd59b6f09..81c54ae55e 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -26,6 +26,10 @@ name="VoiceInviteAdHoc"> has joined a Voice Chat call with a conference chat. </floater.string> + <floater.string + name="VoiceInviteGroup"> + has joined a Voice Chat call with the group [GROUP]. + </floater.string> <avatar_icon enabled="false" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index d6b20c8015..4b280ac59f 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -171,7 +171,7 @@ enabled="false" follows="left|top" height="20" - label="Send Current URL to Parcel" + label="Send Current Page to Parcel" layout="topleft" left="0" name="assign" diff --git a/indra/newview/skins/default/xui/en/floater_media_settings.xml b/indra/newview/skins/default/xui/en/floater_media_settings.xml index 8122386fae..681731b0da 100644 --- a/indra/newview/skins/default/xui/en/floater_media_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_media_settings.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - bottom="666" can_close="true" can_drag_on_left="false" can_minimize="true" diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index cff0c29dfc..0bdcbf30df 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -2,8 +2,8 @@ <floater legacy_header_height="18" can_dock="true" - can_close="true" - can_minimize="false" + can_minimize="true" + can_close="false" center_horiz="true" follows="bottom" height="110" @@ -38,12 +38,12 @@ Fly Backwards (press Down Arrow or S) </string> <panel - border="false" + border="false" height="83" - follows="left|top" + follows="left|top" layout="topleft" left="0" - mouse_opaque="false" + mouse_opaque="false" name="panel_actions" top="0" width="115"> @@ -130,7 +130,7 @@ </panel> <!-- Width and height of this panel should be synchronized with panel_stand_stop_flying.xml --> <panel - border="false" + border="false" height="27" layout="topleft" left="0" @@ -141,7 +141,7 @@ follows="left|bottom" height="23" image_overlay="Move_Walk_Off" - image_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" label="" layout="topleft" name="mode_walk_btn" @@ -151,10 +151,10 @@ top="2" width="31" /> <button - follows="left|bottom" + follows="left|bottom" height="23" image_overlay="Move_Run_Off" - image_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" label="" layout="topleft" left_pad="0" @@ -168,7 +168,7 @@ follows="left|bottom" height="23" image_overlay="Move_Fly_Off" - image_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" label="" layout="topleft" left_pad="0" @@ -179,7 +179,7 @@ top="2" width="31" /> <button - visible="false" + visible="false" follows="left|bottom" height="20" label="Stop Flying" diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index c8aab2c1e0..fb8893678d 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater - border_visible = "false" - border_drop_shadow_visible = "false" - drop_shadow_visible = "false" - border = "false" + border_visible="false" + border_drop_shadow_visible="false" + drop_shadow_visible="false" + border="false" bg_opaque_image="Inspector_Background" - bg_alpha_image="Toast_Background" + bg_alpha_image="Toast_Background" bg_alpha_color="0 0 0 0" legacy_header_height="18" - can_minimize="false" + can_minimize="true" can_tear_off="false" can_resize="true" can_drag_on_left="false" - can_close="true" + can_close="false" can_dock="true" bevel_style="in" height="300" @@ -29,10 +29,10 @@ bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" follows="all" - left="5" + left="5" top="20" layout="topleft" - height="275" + height="275" name="chat_history" parse_highlights="true" text_color="ChatHistoryTextColor" diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index ae4d5042ef..c6bc093c6c 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -69,7 +69,29 @@ Calling [CALLEE_NAME] word_wrap="true"> No Answer. Please try again later. </text> - <text + <text + font="SansSerifLarge" + height="40" + layout="topleft" + left="77" + name="nearby" + top="27" + width="315" + word_wrap="true"> + You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. + </text> + <text + font="SansSerifLarge" + height="40" + layout="topleft" + left="77" + name="nearby_P2P" + top="27" + width="315" + word_wrap="true"> + [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. + </text> + <text font="SansSerif" height="50" layout="topleft" @@ -80,7 +102,7 @@ No Answer. Please try again later. word_wrap="true"> Leaving [CURRENT_CHAT]. </text> - <button + <button height="24" label="Cancel" label_selected="Cancel" diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index 8cc2c91ef5..3dc546aee3 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -39,6 +39,28 @@ name="Title"> Gesture: [NAME] </floater.string> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + name="name_text" + top="20" + font.style="BOLD" + width="100"> + Name: + </text> + <line_editor + follows="left|top" + height="20" + layout="topleft" + left_delta="84" + name="name" + top_delta="-4" + width="180" /> <text type="string" length="1" @@ -48,7 +70,7 @@ layout="topleft" left="10" name="desc_label" - top="25" + top_pad="10" font.style="BOLD" width="100"> Description: diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 602a18ea56..552902d1d9 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -3,15 +3,15 @@ legacy_header_height="18" auto_tile="true" can_resize="true" - follows="left|bottom" - height="331" + follows="left|top" + height="350" layout="topleft" - min_height="120" - min_width="300" + min_height="200" + min_width="370" name="preview_texture" help_topic="preview_texture" - width="300"> - <floater.string + width="370"> + <floater.string name="Title"> Texture: [NAME] </floater.string> @@ -43,72 +43,38 @@ max_length="127" name="desc" width="190" /> - <button - follows="left|bottom" - height="22" - label="OK" - layout="topleft" - left="80" - name="Keep" - top="302" - width="100" /> - <button - follows="left|bottom" - height="22" - label="Cancel" - layout="topleft" - left_pad="5" - name="Discard" - top_delta="0" - width="100" /> - <button - follows="left|bottom" - height="22" - label="Save As" - layout="topleft" - left_pad="5" - name="save_tex_btn" - top_delta="0" - width="100" /> <text type="string" + halign="right" length="1" - follows="left|bottom" + follows="right|bottom" height="16" layout="topleft" - left="13" + left="110" name="dimensions" - top="309" - width="303"> + top="255" + width="200"> [WIDTH]px x [HEIGHT]px </text> <text type="string" + halign="right" length="1" - bg_visible="false" - border_drop_shadow_visible="false" - border_visible="false" - top="309" - drop_shadow_visible="true" - enabled="true" follows="right|bottom" - font="SansSerifSmall" - h_pad="0" - halign="right" - height="14" - left="54" - mouse_opaque="true" - name="aspect_ratio" - v_pad="0" - width="110"> - Preview Aspect Ratio + height="16" + layout="topleft" + left_delta="-110" + name="dimensions" + top_pad="5" + width="200"> + Preview aspect ratio </text> <combo_box allow_text_entry="true" - top="306" + top_delta="-3" follows="right|bottom" - height="20" - left="176" + height="23" + left_pad="10" max_chars="20" mouse_opaque="true" enabled="true" @@ -140,4 +106,31 @@ 2:1 </combo_item> </combo_box> + <button + follows="right|bottom" + height="22" + label="OK" + layout="topleft" + left="6" + name="keep" + top_pad="5" + width="100" /> + <button + follows="right|bottom" + height="22" + label="Cancel" + layout="topleft" + left_pad="5" + name="discard" + top_delta="0" + width="100" /> + <button + follows="right|bottom" + height="22" + label="Save As" + layout="topleft" + left_pad="5" + name="save_tex_btn" + top_delta="0" + width="100" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_script_limits.xml b/indra/newview/skins/default/xui/en/floater_script_limits.xml new file mode 100644 index 0000000000..98c44ad1b3 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_script_limits.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + height="570" + help_topic="scriptlimits" + layout="topleft" + name="scriptlimits" + save_rect="true" + title="SCRIPT INFORMATION" + width="480"> + <tab_container + bottom="555" + follows="left|right|top|bottom" + layout="topleft" + left="1" + name="scriptlimits_panels" + right="-1" + tab_position="top" + top="20" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index e6bdcdf78e..9c1a5499db 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -13,10 +13,6 @@ title="FIND" width="670"> <floater.string - name="search_url"> - http://int.searchwww-phx0.damballah.lindenlab.com/viewer - </floater.string> - <floater.string name="loading_text"> Loading... </floater.string> diff --git a/indra/newview/skins/default/xui/en/floater_select_key.xml b/indra/newview/skins/default/xui/en/floater_select_key.xml index 6050aede79..93aa1f0e31 100644 --- a/indra/newview/skins/default/xui/en/floater_select_key.xml +++ b/indra/newview/skins/default/xui/en/floater_select_key.xml @@ -21,7 +21,7 @@ word_wrap="true" width="220"> Press a key to set your -Speak button toggle +Speak button trigger. </text> <button height="23" diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml index 409f46b960..afc44c41b8 100644 --- a/indra/newview/skins/default/xui/en/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml @@ -2,7 +2,8 @@ <floater legacy_header_height="18" can_minimize="false" - height="450" + can_resize="true" + height="535" layout="topleft" name="sell land" help_topic="sell_land" @@ -12,7 +13,7 @@ <scroll_container color="DkGray2" follows="left|top|right|bottom" - height="435" + height="520" layout="topleft" name="profile_scroll" reserve_scroll_corner="true" @@ -31,63 +32,47 @@ enabled="false" follows="top|left" height="135" - layout="topleft" left="60" name="info_image" top="20" width="180" /> <text - type="string" - length="1" top="150" follows="top|left" - layout="topleft" left="16" name="info_parcel_label" width="48"> Parcel: </text> <text - type="string" - length="1" top_delta="0" follows="top|left" height="16" - layout="topleft" left="56" name="info_parcel" right="-20"> PARCEL NAME </text> <text - type="string" - length="1" follows="top|left" - layout="topleft" left="16" name="info_size_label" width="48"> Size: </text> <text - type="string" - length="1" follows="top|left" top_delta="0" height="32" - layout="topleft" left="56" name="info_size" right="-20"> [AREA] m² </text> <text - type="string" - length="1" follows="top|left" font="SansSerifBig" height="24" - layout="topleft" left="16" name="info_action" text_color="white" @@ -96,42 +81,30 @@ To sell this parcel: </text> <text - type="string" - length="1" follows="top|left" font="SansSerif" height="16" - layout="topleft" left="30" name="price_label"> 1. Set a price: </text> <text - type="string" - length="1" follows="top|left" height="16" - layout="topleft" left="40" name="price_text"> Choose an appropriate price. </text> <text - type="string" - length="1" height="16" - layout="topleft" left="40" name="price_ld" width="20"> L$ </text> <line_editor - type="string" - length="1" follows="top|left" height="18" - layout="topleft" left_delta="20" name="price" top_delta="0" @@ -139,10 +112,7 @@ 0 </line_editor> <text - type="string" - length="1" height="16" - layout="topleft" left="40" name="price_per_m" top_delta="25" @@ -150,22 +120,16 @@ (L$[PER_METER] per m²) </text> <text - type="string" - length="1" follows="top|left" font="SansSerif" height="16" - layout="topleft" left="30" name="sell_to_label"> 2. Sell the land to: </text> <text - type="string" - length="1" follows="top|left" height="25" - layout="topleft" left="40" word_wrap="true" name="sell_to_text" @@ -173,9 +137,8 @@ Choose whether to sell to anyone or a particular buyer. </text> <combo_box - follows="top|right" + follows="top|left" height="18" - layout="topleft" left_delta="0" name="sell_to" top_delta="32" @@ -196,9 +159,8 @@ </combo_box> <line_editor enabled="false" - follows="top|right" + follows="top|left" height="18" - layout="topleft" left_delta="0" name="sell_to_agent" top_pad="4" @@ -206,29 +168,22 @@ <button height="20" label="Select" - layout="topleft" left_pad="5" name="sell_to_select_agent" top_delta="0" width="60" /> <text - type="string" - length="1" follows="top|left" font="SansSerif" height="16" - layout="topleft" left="30" name="sell_objects_label"> 3. Sell the objects with the land? </text> <text - type="string" - length="1" font="SansSerifSmall" follows="top|left" height="25" - layout="topleft" word_wrap="true" left="40" name="sell_objects_text"> @@ -236,16 +191,14 @@ </text> <radio_group top_pad="5" - follows="top|right" + follows="top|left" height="40" - layout="topleft" left="40" name="sell_objects" - right="420"> + right="-20"> <radio_item bottom="40" height="0" - layout="topleft" left="10" name="none" visible="false" /> @@ -253,33 +206,27 @@ bottom="20" height="16" label="No, keep ownership of objects" - layout="topleft" left="10" name="no" /> <radio_item bottom="40" height="16" label="Yes, sell objects with land" - layout="topleft" left="10" name="yes" /> </radio_group> <button height="20" label="Show Objects" - layout="topleft" name="show_objects" left="70" top_pad="10" width="110" /> <text - type="string" - length="1" bottom_delta="30" follows="top|left" font="SansSerifBig" height="16" - layout="topleft" left="16" name="nag_message_label" right="-20"> @@ -289,16 +236,14 @@ follows="bottom|left" height="20" label="Set Land For Sale" - layout="topleft" left_delta="0" name="sell_btn" top_pad="10" width="130" /> <button - follows="bottom|right" + follows="bottom|left" height="20" label="Cancel" - layout="topleft" left_pad="30" name="cancel_btn" top_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml index ffb11f3f18..3ed2bd7206 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml @@ -30,26 +30,29 @@ top_pad="10" width="320" word_wrap="true" /> - <combo_box - follows="top|left" - height="20" - layout="topleft" - left_delta="0" - name="boolean_combo" - top_pad="10" - visible="false" - width="100"> - <combo_box.item - label="TRUE" - name="TRUE" - value="true" /> - <combo_box.item - label="FALSE" - name="FALSE" - value="" /> - <combo_box.commit_callback - function="CommitSettings" /> - </combo_box> + <radio_group + follows="top|left" + height="30" + layout="topleft" + left_delta="0" + name="boolean_combo" + top_pad="10" + visible="false" + tab_stop="true" + width="100"> + <radio_item + top_pad="5" + label="TRUE" + name="TRUE" + value="true" /> + <radio_item + top_pad="5" + label="FALSE" + name="FALSE" + value="" /> + <commit_callback + function="CommitSettings" /> + </radio_group> <line_editor height="20" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 8860ac1e50..ec54522d3e 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -2,8 +2,9 @@ <floater legacy_header_height="18" can_minimize="false" + can_close="true" follows="left|top" - height="526" + height="516" layout="topleft" name="Snapshot" help_topic="snapshot" @@ -14,94 +15,84 @@ name="unknown"> unknown </floater.string> - <text - type="string" - length="1" - follows="top|left" - height="15" - layout="topleft" - left="10" - name="type_label" - top="25" - width="195"> - Snapshot destination - </text> <radio_group - height="60" + height="58" label="Snapshot type" layout="topleft" - left_delta="0" + left="10" name="snapshot_type_radio" - top_pad="5" - width="195"> + top="25" + width="205"> <radio_item bottom="19" height="16" - label="Send via email" + label="Email" layout="topleft" name="postcard" /> <radio_item bottom="38" height="16" - label="Save to your inventory (L$[AMOUNT])" + label="My inventory (L$[AMOUNT])" layout="topleft" name="texture" /> <radio_item bottom="57" height="16" - label="Save to your hard drive" + label="Save to my computer" layout="topleft" name="local" /> </radio_group> <text type="string" + font="SansSerifSmall" length="1" follows="left|top" - height="25" + height="14" layout="topleft" + right="-5" left_delta="0" + halign="right" name="file_size_label" top_pad="106" width="195"> - File size: [SIZE] KB + [SIZE] KB </text> <button follows="left|top" - height="20" - label="Refresh Snapshot" + height="22" + image_overlay="Refresh_Off" layout="topleft" - left_delta="0" + left="10" name="new_snapshot_btn" - top_delta="15" - width="195" /> + width="23" /> <button follows="left|top" - height="20" + height="23" label="Send" layout="topleft" - left_delta="0" + left_pad="5" + right="-5" name="send_btn" - top_pad="2" - width="105" /> + width="100" /> <button follows="left|top" - height="20" + height="23" label="Save (L$[AMOUNT])" layout="topleft" - left_delta="0" + right="-5" name="upload_btn" top_delta="0" - width="105" /> + width="100" /> <flyout_button follows="left|top" - height="20" + height="23" label="Save" layout="topleft" - left_delta="0" + right="-5" name="save_btn" tool_tip="Save image to a file" top_delta="0" - width="105"> + width="100"> <flyout_button.item label="Save" value="save" /> @@ -109,52 +100,51 @@ label="Save As..." value="save as" /> </flyout_button> - <button + <button follows="left|top" - height="20" - label="Cancel" - layout="topleft" - left_pad="5" - name="discard_btn" - top_delta="0" - width="85" /> - <button - follows="left|top" - height="20" - label="More >>" + height="23" + label="More" layout="topleft" left="10" name="more_btn" tool_tip="Advanced options" - top="270" width="80" /> <button follows="left|top" - height="20" - label="<< Less" + height="23" + label="Less" layout="topleft" left_delta="0" name="less_btn" tool_tip="Advanced options" top_delta="0" width="80" /> + <button + follows="left|top" + height="23" + label="Cancel" + layout="topleft" + right="-5" + left_pad="5" + name="discard_btn" + width="100" /> <text type="string" length="1" follows="top|left" - height="15" + height="12" layout="topleft" - left_delta="0" + left="10" name="type_label2" top_pad="5" - width="115"> + width="120"> Size </text> <text type="string" length="1" follows="top|left" - height="15" + height="12" layout="topleft" left_pad="5" name="format_label" @@ -163,13 +153,12 @@ Format </text> <combo_box - height="20" + height="23" label="Resolution" layout="topleft" left="10" name="postcard_size_combo" - top="312" - width="115"> + width="120"> <combo_box.item label="Current Window" name="CurrentWindow" @@ -192,13 +181,13 @@ value="[i-1,i-1]" /> </combo_box> <combo_box - height="20" + height="23" label="Resolution" layout="topleft" left_delta="0" name="texture_size_combo" top_delta="0" - width="115"> + width="120"> <combo_box.item label="Current Window" name="CurrentWindow" @@ -221,13 +210,13 @@ value="[i-1,i-1]" /> </combo_box> <combo_box - height="20" + height="23" label="Resolution" layout="topleft" left_delta="0" name="local_size_combo" top_delta="0" - width="115"> + width="120"> <combo_box.item label="Current Window" name="CurrentWindow" @@ -262,12 +251,11 @@ value="[i-1,i-1]" /> </combo_box> <combo_box - height="20" + height="23" label="Format" layout="topleft" left_pad="5" name="local_format_combo" - top_delta="0" width="70"> <combo_box.item label="PNG" @@ -286,13 +274,13 @@ height="20" increment="32" label="Width" - label_width="30" + label_width="40" layout="topleft" left="10" max_val="6016" min_val="32" name="snapshot_width" - top="337" + top_pad="10" width="95" /> <spinner allow_text_entry="false" @@ -301,7 +289,7 @@ height="20" increment="32" label="Height" - label_width="35" + label_width="40" layout="topleft" left_pad="5" max_val="6016" @@ -311,7 +299,7 @@ width="95" /> <check_box bottom_delta="20" - label="Constrain Proportions" + label="Constrain proportions" layout="topleft" left="10" name="keep_aspect_check" /> @@ -321,32 +309,32 @@ height="15" increment="1" initial_value="75" - label="Image Quality" + label="Image quality" + label_width="100" layout="topleft" left_delta="0" max_val="100" name="image_quality_slider" top_pad="5" - width="210" /> + width="205" /> <text type="string" length="1" follows="left|top" - height="20" + height="13" layout="topleft" - left_delta="0" + left="10" name="layer_type_label" - top_pad="8" + top_pad="5" width="50"> Capture: </text> <combo_box - height="20" + height="23" label="Image Layers" layout="topleft" - left_delta="50" + left="30" name="layer_types" - top_delta="-3" width="145"> <combo_box.item label="Colors" @@ -362,33 +350,38 @@ value="objects" /> </combo_box> <check_box - bottom_delta="20" - label="Show interface in snapshot" + label="Interface" layout="topleft" - left="10" + left="30" + top_pad="10" + width="180" name="ui_check" /> <check_box - bottom_delta="20" - label="Show HUD objects in snapshot" + label="HUDs" layout="topleft" - left="10" + left="30" + top_pad="10" + width="180" name="hud_check" /> <check_box - bottom_delta="20" label="Keep open after saving" layout="topleft" left="10" + top_pad="8" + width="180" name="keep_open_check" /> <check_box - bottom_delta="20" - label="Freeze frame (fullscreen preview)" + label="Freeze frame (fullscreen)" layout="topleft" left="10" + top_pad="8" + width="180" name="freeze_frame_check" /> <check_box - bottom_delta="20" label="Auto-refresh" layout="topleft" left="10" + top_pad="8" + width="180" name="auto_snapshot_check" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml index bb463edd4d..da412ed8a0 100644 --- a/indra/newview/skins/default/xui/en/floater_telehub.xml +++ b/indra/newview/skins/default/xui/en/floater_telehub.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Explicit left edge to avoid overlapping build tools --> <floater legacy_header_height="18" height="250" layout="topleft" + left="300" name="telehub" help_topic="telehub" title="TELEHUB" diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml index a2055d8c52..84adabe4fa 100644 --- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml +++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml @@ -355,7 +355,6 @@ line to actually fit <!-- "color_swatch" displays a color and spawns a color picker when clicked. --> <color_swatch - border_color="1 0 0 1" can_apply_immediately="true" color="0.3 0.6 0.9 1" follows="left|top" @@ -368,7 +367,6 @@ line to actually fit top="10" width="80" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="1 0 1 1" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index 113da9ea4d..695021f755 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -101,7 +101,7 @@ <filter_editor follows="left|top|right" height="23" - label="Filter textures" + label="Filter Textures" layout="topleft" left="175" name="inventory search editor" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 5e68850e30..e55453f772 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2264,7 +2264,6 @@ even though the user gets a free copy. top="8" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" @@ -2676,6 +2675,7 @@ even though the user gets a free copy. height="18" layout="topleft" left="10" + use_ellipsis="true" read_only="true" name="media_info" width="180" /> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index c1a211967c..474b703ae5 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater can_resize="true" + can_minimize="true" + can_close="false" height="270" layout="topleft" min_height="146" - min_width="190" + min_width="190" name="floater_voice_controls" title="Voice Controls" save_visibility="true" @@ -31,12 +33,14 @@ No one near </string> <panel - bevel_style="in" + bevel_style="out" + border="true" follows="left|right|top" height="62" layout="topleft" left="0" name="control_panel" + top="0" width="282"> <panel height="18" @@ -64,7 +68,7 @@ name="user_text" text_color="white" top="4" - use_ellipses="true" + use_ellipses="true" value="Mya Avatar:" width="210" /> <output_monitor @@ -75,55 +79,18 @@ layout="topleft" name="speaking_indicator" right="-1" - top="2" + top="2" visible="true" width="20" /> </panel> - <layout_stack - animate="false" - bottom="10" - clip="false" + <button follows="left|right|top" height="24" - layout="bottomleft" - orientation="horizontal" - width="262"> - <layout_panel - auto_resize="false" - follows="left" - layout="topleft" - min_width="24" - name="microphone_icon_panel" - top="0" - user_resize="false" - width="24"> - <icon - height="24" - image_name="Microphone_On" - layout="topleft" - name="Microphone_On" - top="0" - width="24" /> - </layout_panel> - <layout_panel - auto_resize="false" - layout="topleft" - min_width="100" - name="leave_btn_panel" - top="0" - user_resize="false" - visible="false" - width="100"> - <button - follows="left|right|top" - height="24" - label="Leave Call" - left="0" - name="leave_call_btn" - top="0" - width="100" /> - </layout_panel> - </layout_stack> + label="Leave Call" + left="91" + name="leave_call_btn" + top_pad="6" + width="100" /> </panel> <avatar_list follows="all" @@ -143,4 +110,12 @@ name="non_avatar_caller" top="70" width="282" /> + <view_border + bevel_style="out" + follows="left|top|right|bottom" + height="206" + layout="topleft" + left="0" + top="63" + width="282" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml index 439d68282f..7f31692ad9 100644 --- a/indra/newview/skins/default/xui/en/floater_water.xml +++ b/indra/newview/skins/default/xui/en/floater_water.xml @@ -71,7 +71,6 @@ width="700"> <panel border="true" - border_color="EmphasisColor" follows="all" height="180" label="Settings" diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index 16f6e49092..00e00b9694 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -9,7 +9,7 @@ bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="148" + height="150" layout="topleft" name="inspect_object" single_instance="true" @@ -71,13 +71,15 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about width="196"> L$300,000 </text> - <text + <text + clip_partial="true" follows="all" font="SansSerifSmall" - height="36" + height="37" left="8" name="object_description" top_pad="0" + use_ellipses="true" width="220" word_wrap="true"> This is a really long description for an object being as how it is at least 80 characters in length and maybe more like 120 at this point. Who knows, really? @@ -90,8 +92,8 @@ This is a really long description for an object being as how it is at least 80 c height="13" left_delta="0" name="object_media_url" - top_pad="0" - width="291" + bottom_pad="2" + width="200" max_length = "50" use_ellipses="true"> http://www.superdupertest.com @@ -102,7 +104,7 @@ This is a really long description for an object being as how it is at least 80 c label="Buy" left="8" name="buy_btn" - top="119" + top="121" width="80" /> <button follows="top|left" diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml new file mode 100644 index 0000000000..5b94645b60 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- *NOTE: See also menu_avatar_other.xml --> +<context_menu + layout="topleft" + name="Avatar Pie"> + <menu_item_call + label="View Profile" + name="Profile..."> + <menu_item_call.on_click + function="ShowAgentProfile" + parameter="hit object" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Add Friend" + name="Add Friend"> + <menu_item_call.on_click + function="Avatar.AddFriend" /> + <menu_item_call.on_enable + function="Avatar.EnableAddFriend" /> + </menu_item_call> + <menu_item_call + label="IM" + name="Send IM..."> + <menu_item_call.on_click + function="Avatar.SendIM" /> + </menu_item_call> + <menu_item_call + label="Call" + name="Call"> + <menu_item_call.on_click + function="Avatar.Call" /> + </menu_item_call> + <menu_item_call + label="Invite to Group" + name="Invite..."> + <menu_item_call.on_click + function="Avatar.InviteToGroup" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + enabled="false" + label="Block" + name="Avatar Mute"> + <menu_item_call.on_click + function="Avatar.Mute" /> + <menu_item_call.on_enable + function="Avatar.EnableMute" /> + </menu_item_call> + <menu_item_call + label="Report" + name="abuse"> + <menu_item_call.on_click + function="Avatar.ReportAbuse" /> + </menu_item_call> + <menu_item_call + label="Freeze" + name="Freeze..."> + <menu_item_call.on_click + function="Avatar.Freeze" /> + <menu_item_call.on_visible + function="Avatar.EnableFreezeEject"/> + </menu_item_call> + <menu_item_call + label="Eject" + name="Eject..."> + <menu_item_call.on_click + function="Avatar.Eject" /> + <menu_item_call.on_visible + function="Avatar.EnableFreezeEject"/> + </menu_item_call> + <menu_item_call + label="Debug" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> + <menu_item_call + label="Zoom In" + name="Zoom In"> + <menu_item_call.on_click + function="Tools.LookAtSelection" + parameter="zoom" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Pay" + name="Pay..."> + <menu_item_call.on_click + function="PayObject" /> + <menu_item_call.on_enable + function="EnablePayAvatar" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + label="Object Profile" + name="Object Inspect"> + <menu_item_call.on_click + function="Object.Inspect" /> + <menu_item_call.on_enable + function="Object.EnableInspect" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml new file mode 100644 index 0000000000..281ec5a7c3 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Attachment Pie"> + <menu_item_call + enabled="false" + label="Touch" + layout="topleft" + name="Attachment Object Touch"> + <menu_item_call.on_click + function="Object.Touch" /> + <menu_item_call.on_enable + function="Object.EnableTouch" + name="EnableTouch" + parameter="Touch" /> + </menu_item_call> + <!--menu_item_call + label="Stand Up" + layout="topleft" + name="Stand Up"> + <menu_item_call.on_click + function="Self.StandUp" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableStandUp" /> + </menu_item_call--> + <menu_item_call + enabled="false" + label="Edit" + layout="topleft" + name="Edit..."> + <menu_item_call.on_click + function="Object.Edit" /> + <menu_item_call.on_enable + function="EnableEdit" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Detach" + layout="topleft" + name="Detach"> + <menu_item_call.on_click + function="Attachment.Detach" /> + <menu_item_call.on_enable + function="Attachment.EnableDetach" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Drop" + layout="topleft" + name="Drop"> + <menu_item_call.on_click + function="Attachment.Drop" /> + <menu_item_call.on_enable + function="Attachment.EnableDrop" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + + <menu_item_call + label="Stand Up" + layout="topleft" + name="Stand Up"> + <menu_item_call.on_click + function="Self.StandUp" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableStandUp" /> + </menu_item_call> + <menu_item_call + label="My Appearance" + name="Appearance..."> + <menu_item_call.on_click + function="CustomizeAvatar" /> + <menu_item_call.on_enable + function="Edit.EnableCustomizeAvatar" /> + </menu_item_call> + <menu_item_call + label="My Friends" + layout="topleft" + name="Friends..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="friends_panel" /> + </menu_item_call> + <menu_item_call + label="My Groups" + layout="topleft" + name="Groups..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="groups_panel" /> + </menu_item_call> + <menu_item_call + label="My Profile" + layout="topleft" + name="Profile..."> + <menu_item_call.on_click + function="ShowAgentProfile" + parameter="agent" /> + </menu_item_call> + +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml new file mode 100644 index 0000000000..0ad41546d2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- *NOTE: See also menu_attachment_other.xml --> +<context_menu + layout="topleft" + name="Avatar Pie"> + <menu_item_call + label="View Profile" + name="Profile..."> + <menu_item_call.on_click + function="ShowAgentProfile" + parameter="hit object" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Add Friend" + name="Add Friend"> + <menu_item_call.on_click + function="Avatar.AddFriend" /> + <menu_item_call.on_enable + function="Avatar.EnableAddFriend" /> + </menu_item_call> + <menu_item_call + label="IM" + name="Send IM..."> + <menu_item_call.on_click + function="Avatar.SendIM" /> + </menu_item_call> + <menu_item_call + label="Call" + name="Call"> + <menu_item_call.on_click + function="Avatar.Call" /> + </menu_item_call> + <menu_item_call + label="Invite to Group" + name="Invite..."> + <menu_item_call.on_click + function="Avatar.InviteToGroup" /> + </menu_item_call> + <menu_item_separator /> + <menu_item_call + enabled="false" + label="Block" + name="Avatar Mute"> + <menu_item_call.on_click + function="Avatar.Mute" /> + <menu_item_call.on_enable + function="Avatar.EnableMute" /> + </menu_item_call> + <menu_item_call + label="Report" + name="abuse"> + <menu_item_call.on_click + function="Avatar.ReportAbuse" /> + </menu_item_call> + <menu_item_call + label="Freeze" + name="Freeze..."> + <menu_item_call.on_click + function="Avatar.Freeze" /> + <menu_item_call.on_visible + function="Avatar.EnableFreezeEject"/> + </menu_item_call> + <menu_item_call + label="Eject" + name="Eject..."> + <menu_item_call.on_click + function="Avatar.Eject" /> + <menu_item_call.on_visible + function="Avatar.EnableFreezeEject"/> + </menu_item_call> + <menu_item_call + label="Debug" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> + <menu_item_call + label="Zoom In" + name="Zoom In"> + <menu_item_call.on_click + function="Tools.LookAtSelection" + parameter="zoom" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Pay" + name="Pay..."> + <menu_item_call.on_click + function="PayObject" /> + <menu_item_call.on_enable + function="EnablePayAvatar" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml new file mode 100644 index 0000000000..9212d2d648 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -0,0 +1,218 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Self Pie"> + <menu_item_call + label="Stand Up" + layout="topleft" + name="Stand Up"> + <menu_item_call.on_click + function="Self.StandUp" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableStandUp" /> + </menu_item_call> + <context_menu + label="Take Off >" + layout="topleft" + name="Take Off >"> + <context_menu + label="Clothes >" + layout="topleft" + name="Clothes >"> + <menu_item_call + enabled="false" + label="Shirt" + layout="topleft" + name="Shirt"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="shirt" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="shirt" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Pants" + layout="topleft" + name="Pants"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="pants" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="pants" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Skirt" + layout="topleft" + name="Skirt"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="skirt" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="skirt" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Shoes" + layout="topleft" + name="Shoes"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="shoes" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="shoes" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Socks" + layout="topleft" + name="Socks"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="socks" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="socks" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Jacket" + layout="topleft" + name="Jacket"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="jacket" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="jacket" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Gloves" + layout="topleft" + name="Gloves"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="gloves" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="gloves" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Undershirt" + layout="topleft" + name="Self Undershirt"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="undershirt" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="undershirt" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Underpants" + layout="topleft" + name="Self Underpants"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="underpants" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="underpants" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Tattoo" + layout="topleft" + name="Self Tattoo"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="tattoo" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="tattoo" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Alpha" + layout="topleft" + name="Self Alpha"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="alpha" /> + <menu_item_call.on_enable + function="Edit.EnableTakeOff" + parameter="alpha" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="All Clothes" + layout="topleft" + name="All Clothes"> + <menu_item_call.on_click + function="Edit.TakeOff" + parameter="all" /> + </menu_item_call> + </context_menu> + <context_menu + label="HUD >" + layout="topleft" + name="Object Detach HUD" /> + <context_menu + label="Detach >" + layout="topleft" + name="Object Detach" /> + <menu_item_call + label="Detach All" + layout="topleft" + name="Detach All"> + <menu_item_call.on_click + function="Self.RemoveAllAttachments" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableRemoveAllAttachments" /> + </menu_item_call> + </context_menu> + <menu_item_call + label="My Appearance" + layout="topleft" + name="Appearance..."> + <menu_item_call.on_click + function="CustomizeAvatar" /> + <menu_item_call.on_enable + function="Edit.EnableCustomizeAvatar" /> + </menu_item_call> + <menu_item_call + label="My Friends" + layout="topleft" + name="Friends..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="friends_panel" /> + </menu_item_call> + <menu_item_call + label="My Groups" + layout="topleft" + name="Groups..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="groups_panel" /> + </menu_item_call> + <menu_item_call + label="My Profile" + layout="topleft" + name="Profile..."> + <menu_item_call.on_click + function="ShowAgentProfile" + parameter="agent" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_im_well_button.xml b/indra/newview/skins/default/xui/en/menu_im_well_button.xml new file mode 100644 index 0000000000..f8dfba91ff --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_im_well_button.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="IM Well Button Context Menu"> + <menu_item_call + label="Close All" + layout="topleft" + name="Close All"> + <menu_item_call.on_click + function="IMWellChicletMenu.Action" + parameter="close all" /> + <menu_item_call.on_enable + function="IMWellChicletMenu.EnableItem" + parameter="can close all" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index ef0bf72058..01df208850 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -48,7 +48,17 @@ label="Block" name="block"> <menu_item_call.on_click - function="InspectAvatar.Block"/> + function="InspectAvatar.ToggleMute"/> + <menu_item_call.on_visible + function="InspectAvatar.EnableMute" /> + </menu_item_call> + <menu_item_call + label="Unblock" + name="unblock"> + <menu_item_call.on_click + function="InspectAvatar.ToggleMute"/> + <menu_item_call.on_visible + function="InspectAvatar.EnableUnmute" /> </menu_item_call> <menu_item_call label="Report" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 9894a01701..9dc2611663 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -19,8 +19,7 @@ label="My Appearance" name="my_appearance"> <menu_item_call.on_click - function="ShowFloater" - parameter="appearance" /> + function="CustomizeAvatar" /> <menu_item_call.on_enable function="Edit.EnableCustomizeAvatar" /> </menu_item_call> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 660e3858ac..d29dfa7034 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -339,6 +339,9 @@ function="Inventory.DoToSelected" parameter="open" /> </menu_item_call> + <menu_item_separator + layout="topleft" + name="Folder Wearables Separator" /> <menu_item_call label="Replace Current Outfit" layout="topleft" @@ -423,7 +426,8 @@ parameter="copy_uuid" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Copy Separator" /> <menu_item_call label="Copy" layout="topleft" @@ -449,7 +453,8 @@ parameter="paste_link" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Paste Separator" /> <menu_item_call label="Remove Link" layout="topleft" @@ -466,6 +471,14 @@ function="Inventory.DoToSelected" parameter="delete" /> </menu_item_call> + <menu_item_call + label="Delete System Folder" + layout="topleft" + name="Delete System Folder"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="delete_system_folder" /> + </menu_item_call> <menu_item_separator layout="topleft" /> <menu_item_separator @@ -500,7 +513,8 @@ parameter="about" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Animation Separator" /> <menu_item_call label="Play in World" layout="topleft" @@ -518,7 +532,8 @@ parameter="playlocal" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Send Instant Message Separator" /> <menu_item_call label="Send Instant Message" layout="topleft" @@ -544,7 +559,8 @@ parameter="selected" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Gesture Separator" /> <menu_item_call label="Activate" layout="topleft" @@ -562,7 +578,8 @@ parameter="deactivate" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Texture Separator" /> <menu_item_call label="Save As" layout="topleft" @@ -572,7 +589,8 @@ parameter="save_as" /> </menu_item_call> <menu_item_separator - layout="topleft" /> + layout="topleft" + name="Attach Separator"/> <menu_item_call label="Detach From Yourself" layout="topleft" @@ -608,6 +626,9 @@ label="Attach To HUD" layout="topleft" name="Attach To HUD" /> + <menu_item_separator + layout="topleft" + name="Wearable Separator"/> <menu_item_call label="Edit" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml new file mode 100644 index 0000000000..cc6d8ad9c1 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Land Pie"> + <menu_item_call + label="About Land" + name="Place Information..."> + <menu_item_call.on_click + function="Floater.Show" + parameter="about_land" /> + </menu_item_call> + <!-- <menu_item_call + label="Go Here" + name="Go Here"> + <menu_item_call.on_click + function="GoToObject" /> + </menu_item_call>--> + <menu_item_call + label="Sit Here" + name="Sit Here"> + <menu_item_call.on_click + function="Land.Sit" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + enabled="false" + label="Buy This Land" + name="Land Buy"> + <menu_item_call.on_click + function="Land.Buy" /> + <menu_item_call.on_enable + function="World.EnableBuyLand" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Buy Pass" + name="Land Buy Pass"> + <menu_item_call.on_click + function="Land.BuyPass" /> + <menu_item_call.on_enable + function="Land.EnableBuyPass" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + enabled="false" + label="Build" + name="Create"> + <menu_item_call.on_click + function="Land.Build" /> + <menu_item_call.on_enable + function="EnableEdit" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Edit Terrain" + name="Edit Terrain"> + <menu_item_call.on_click + function="Land.Edit" /> + <menu_item_call.on_enable + function="EnableEdit" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 53be40d7fd..7a0b11872a 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -16,7 +16,7 @@ name="Preferences..." shortcut="control|P"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Toggle" parameter="preferences" /> </menu_item_call> <menu_item_separator /> @@ -53,7 +53,7 @@ label="About [APP_NAME]" name="About Second Life"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="sl_about" /> </menu_item_call> </menu> @@ -175,16 +175,18 @@ name="UI Preview Tool" shortcut="control|T"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Toggle" parameter="ui_preview" /> </menu_item_call> <menu_item_separator /> + <!-- Broken <menu_item_call label="Show Side Tray" name="Show Side Tray"> <menu_item_call.on_click function="Advanced.ShowSideTray" /> </menu_item_call> + --> <menu label="UI Tests" name="UI Tests" @@ -194,7 +196,7 @@ name="Textbox" shortcut="control|1"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="test_textbox" /> </menu_item_call> <menu_item_call @@ -202,7 +204,7 @@ name="Text Editor" shortcut="control|2"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="test_text_editor" /> </menu_item_call> <menu_item_call @@ -210,14 +212,14 @@ name="Widgets" shortcut="control|shift|T"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="test_widgets" /> </menu_item_call> <menu_item_call label="Inspectors" name="Inspectors"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="test_inspectors" /> </menu_item_call> </menu> @@ -235,14 +237,14 @@ label="Show TOS" name="TOS"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="message_tos" /> </menu_item_call> <menu_item_call label="Show Critical Message" name="Critical"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="message_critical" /> </menu_item_call> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml index 8d0edf018d..f5ea3e735b 100644 --- a/indra/newview/skins/default/xui/en/menu_mini_map.xml +++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml @@ -51,7 +51,7 @@ label="World Map" name="World Map"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="world_map" /> </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_notification_well_button.xml b/indra/newview/skins/default/xui/en/menu_notification_well_button.xml new file mode 100644 index 0000000000..263ac40f4e --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_notification_well_button.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Notification Well Button Context Menu"> + <menu_item_call + label="Close All" + layout="topleft" + name="Close All"> + <menu_item_call.on_click + function="NotificationWellChicletMenu.Action" + parameter="close all" /> + <menu_item_call.on_enable + function="NotificationWellChicletMenu.EnableItem" + parameter="can close all" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml new file mode 100644 index 0000000000..62500c5116 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Object Pie"> + <menu_item_call + enabled="false" + label="Touch" + name="Object Touch"> + <menu_item_call.on_click + function="Object.Touch" /> + <menu_item_call.on_enable + function="Object.EnableTouch" + name="EnableTouch" + parameter="Touch" /> + </menu_item_call> + <menu_item_call + label="Edit" + name="Edit..."> + <menu_item_call.on_click + function="Object.Edit" /> + <menu_item_call.on_visible + function="EnableEdit"/> + </menu_item_call> + <menu_item_call + label="Build" + name="Build"> + <menu_item_call.on_click + function="Object.Edit" /> + <menu_item_call.on_visible + function="VisibleBuild"/> + </menu_item_call> + <menu_item_call + enabled="false" + label="Open" + name="Open"> + <menu_item_call.on_click + function="Object.Open" /> + <menu_item_call.on_enable + function="Object.EnableOpen" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Sit Here" + name="Object Sit"> + <menu_item_call.on_click + function="Object.SitOrStand" /> + <menu_item_call.on_enable + function="Object.EnableSitOrStand" + name="EnableSitOrStand" + parameter="Sit Here,Stand Up" /> + </menu_item_call> + <menu_item_call + label="Object Profile" + name="Object Inspect"> + <menu_item_call.on_click + function="Object.Inspect" /> + <menu_item_call.on_enable + function="Object.EnableInspect" /> + </menu_item_call> +<menu_item_separator layout="topleft" /> + <context_menu + label="Put On >" + name="Put On" > + <menu_item_call + enabled="false" + label="Wear" + name="Wear"> + <menu_item_call.on_click + function="Object.AttachToAvatar" /> + <menu_item_call.on_enable + function="Object.EnableWear" /> + </menu_item_call> + <context_menu + label="Attach >" + name="Object Attach" /> + <context_menu + label="Attach HUD >" + name="Object Attach HUD" /> + </context_menu> + <context_menu + label="Remove >" + name="Remove"> + <menu_item_call + enabled="false" + label="Take" + name="Pie Object Take"> + <menu_item_call.on_click + function="Tools.BuyOrTake" /> + <menu_item_call.on_enable + function="Tools.EnableBuyOrTake" + parameter="Buy,Take" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Report Abuse" + name="Report Abuse..."> + <menu_item_call.on_click + function="Object.ReportAbuse" /> + <menu_item_call.on_enable + function="Object.EnableReportAbuse" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Block" + name="Object Mute"> + <menu_item_call.on_click + function="Object.Mute" /> + <menu_item_call.on_enable + function="Object.EnableMute" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Return" + name="Return..."> + <menu_item_call.on_click + function="Object.Return" /> + <menu_item_call.on_enable + function="Object.EnableReturn" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Delete" + name="Delete"> + <menu_item_call.on_click + function="Object.Delete" /> + <menu_item_call.on_enable + function="Object.EnableDelete" /> + </menu_item_call> + </context_menu> + <menu_item_separator layout="topleft" /> + <menu_item_call + enabled="false" + label="Take Copy" + name="Take Copy"> + <menu_item_call.on_click + function="Tools.TakeCopy" /> + <menu_item_call.on_enable + function="Tools.EnableTakeCopy" /> + </menu_item_call> + <menu_item_call + enabled="false" + label="Pay" + name="Pay..."> + <menu_item_call.on_click + function="PayObject" /> + <menu_item_call.on_enable + function="EnablePayObject" /> +</menu_item_call> + <menu_item_call + enabled="false" + label="Buy" + name="Buy..."> + <menu_item_call.on_click + function="Object.Buy" /> + <menu_item_call.on_enable + function="Object.EnableBuy" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 0422972cd4..faf33bd1b1 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -16,7 +16,7 @@ <menu_item_call.on_click function="Avatar.AddFriend" /> <menu_item_call.on_enable - function="Avatar.EnableItem" + function="ParticipantList.EnableItem" parameter="can_add" /> </menu_item_call> <menu_item_call @@ -30,11 +30,14 @@ label="Call" layout="topleft" name="Call"> - <menu_item_call.on_click + <menu_item_call.on_click function="Avatar.Call" /> + <menu_item_call.on_enable + function="ParticipantList.EnableItem" + parameter="can_call" /> </menu_item_call> <menu_item_call - enabled="false" + enabled="true" label="Share" layout="topleft" name="Share"> @@ -48,23 +51,23 @@ <menu_item_call.on_click function="Avatar.Pay" /> </menu_item_call> + <menu_item_separator + layout="topleft" /> <menu_item_check - label="Block/Unblock" + label="Block Voice" layout="topleft" name="Block/Unblock"> <menu_item_check.on_click function="Avatar.BlockUnblock" /> <menu_item_check.on_check - function="Avatar.CheckItem" + function="ParticipantList.CheckItem" parameter="is_blocked" /> <menu_item_check.on_enable - function="Avatar.EnableItem" + function="ParticipantList.EnableItem" parameter="can_block" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> <menu_item_check - label="Mute Text" + label="Block Text" layout="topleft" name="MuteText"> <on_check @@ -76,6 +79,12 @@ function="ParticipantList.EnableItem" parameter="can_mute_text" /> </menu_item_check> + <menu_item_separator + layout="topleft" /> + <context_menu + label="Moderator Options >" + layout="topleft" + name="Moderator Options" > <menu_item_check label="Allow text chat" layout="topleft" @@ -136,4 +145,5 @@ function="ParticipantList.EnableItem" parameter="can_moderate_voice" /> </menu_item_call> + </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index 304492bedb..df3cb26b04 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -19,5 +19,7 @@ name="Leave Selected Group"> <menu_item_call.on_click function="People.Group.Minus.Action"/> + <menu_item_call.on_enable + function="People.Group.Minus.Enable"/> </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index 39469f7101..5f2e6e0f6c 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -32,6 +32,9 @@ name="Call"> <menu_item_call.on_click function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_call" /> </menu_item_call> <menu_item_call label="Share" diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml index df74d2dcd4..0d3dd3366d 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml @@ -27,6 +27,9 @@ name="Call"> <on_click function="Avatar.Call" /> + <on_enable + function="Avatar.EnableItem" + parameter="can_call" /> </menu_item_call> <menu_item_call enabled="false" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0891afaf76..b4ce32ea1d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -32,8 +32,7 @@ layout="topleft" name="Buy and Sell L$"> <menu_item_call.on_click - function="ShowFloater" - parameter="buy currency" /> + function="BuyCurrency" /> </menu_item_call> <menu_item_separator layout="topleft" /> @@ -50,8 +49,7 @@ layout="topleft" name="Appearance"> <menu_item_call.on_click - function="ShowFloater" - parameter="appearance" /> + function="CustomizeAvatar" /> <menu_item_call.on_enable function="Edit.EnableCustomizeAvatar" /> </menu_item_call> @@ -82,7 +80,7 @@ name="Gestures" shortcut="control|G"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Toggle" parameter="gestures" /> </menu_item_call> <menu @@ -240,30 +238,55 @@ layout="topleft" name="World" tear_off="true"> - <menu_item_check - label="Move" + <menu_item_check + label="Mini-Map" layout="topleft" - name="Movement Controls"> + name="Mini-Map" + shortcut="control|shift|M"> <menu_item_check.on_check function="Floater.Visible" - parameter="moveview" /> + parameter="mini_map" /> <menu_item_check.on_click function="Floater.Toggle" - parameter="moveview" /> + parameter="mini_map" /> </menu_item_check> - <menu_item_check - label="View" + <menu_item_check + label="World Map" layout="topleft" - name="Camera Controls"> + name="World Map" + shortcut="control|M" + use_mac_ctrl="true"> <menu_item_check.on_check function="Floater.Visible" - parameter="camera" /> + parameter="world_map" /> <menu_item_check.on_click function="Floater.Toggle" - parameter="camera" /> + parameter="world_map" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_call + label="Snapshot" + layout="topleft" + name="Take Snapshot" + shortcut="control|shift|S"> + <menu_item_call.on_click + function="Floater.Show" + parameter="snapshot" /> + </menu_item_call> + <menu_item_call + label="Landmark This Place" + layout="topleft" + name="Create Landmark Here"> + <menu_item_call.on_click + function="World.CreateLandmark" /> + <menu_item_call.on_enable + function="World.EnableCreateLandmark" /> + </menu_item_call> + <menu + create_jump_keys="true" + label="About This Place" + layout="topleft" + name="Land" + tear_off="true"> <menu_item_call label="About Land" layout="topleft" @@ -280,13 +303,15 @@ function="Floater.Show" parameter="region_info" /> </menu_item_call> + </menu> + <menu_item_separator + layout="topleft" /> <menu_item_call label="Buy Land" layout="topleft" name="Buy Land"> <menu_item_call.on_click - function="ShowFloater" - parameter="buy land" /> + function="Land.Buy" /> <menu_item_call.on_enable function="World.EnableBuyLand" /> </menu_item_call> @@ -295,7 +320,7 @@ layout="topleft" name="My Land"> <menu_item_call.on_click - function="ShowFloater" + function="Floater.Show" parameter="land_holdings" /> </menu_item_call> <menu @@ -304,6 +329,28 @@ layout="topleft" name="Land" tear_off="true"> + <menu_item_check + label="Move Controls" + layout="topleft" + name="Movement Controls"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="moveview" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="moveview" /> + </menu_item_check> + <menu_item_check + label="View Controls" + layout="topleft" + name="Camera Controls"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="camera" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="camera" /> + </menu_item_check> <menu_item_check label="Ban Lines" layout="topleft" @@ -350,32 +397,8 @@ </menu> <menu_item_separator layout="topleft" /> - <menu - label="Landmarks" - layout="topleft" - name="Landmarks" - tear_off="true"> - <menu_item_call - label="Create Landmark Here" - layout="topleft" - name="Create Landmark Here"> - <menu_item_call.on_click - function="World.CreateLandmark" /> - <menu_item_call.on_enable - function="World.EnableCreateLandmark" /> - </menu_item_call> - <menu_item_call - label="Set Home to Here" - layout="topleft" - name="Set Home to Here"> - <menu_item_call.on_click - function="World.SetHomeLocation" /> - <menu_item_call.on_enable - function="World.EnableSetHomeLocation" /> - </menu_item_call> - </menu> <menu_item_call - label="Home" + label="Teleport Home" layout="topleft" name="Teleport Home" shortcut="control|shift|H"> @@ -384,31 +407,15 @@ <menu_item_call.on_enable function="World.EnableTeleportHome" /> </menu_item_call> - <menu_item_check - label="Mini-Map" - layout="topleft" - name="Mini-Map" - shortcut="control|shift|M"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="mini_map" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="mini_map" /> - </menu_item_check> - <menu_item_check - label="World Map" - layout="topleft" - name="World Map" - shortcut="control|M" - use_mac_ctrl="true"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="world_map" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="world_map" /> - </menu_item_check> + <menu_item_call + label="Set Home to Here" + layout="topleft" + name="Set Home to Here"> + <menu_item_call.on_click + function="World.SetHomeLocation" /> + <menu_item_call.on_enable + function="World.EnableSetHomeLocation" /> + </menu_item_call> <!-- <menu_item_check label="Show Navigation Bar" layout="topleft" @@ -435,17 +442,6 @@ layout="topleft" />--> <menu_item_separator layout="topleft" /> - <menu_item_call - label="Snapshot" - layout="topleft" - name="Take Snapshot" - shortcut="control|shift|S"> - <menu_item_call.on_click - function="Floater.Show" - parameter="snapshot" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> <menu create_jump_keys="true" label="Sun" @@ -487,7 +483,7 @@ parameter="midnight" /> </menu_item_call> <menu_item_call - label="Use the Estate Time" + label="Estate Time" layout="topleft" name="Revert to Region Default"> <menu_item_call.on_click @@ -868,14 +864,6 @@ function="ToggleControl" parameter="DebugPermissions" /> </menu_item_check> - <!--menu_item_call - label="Show Script Warning/Error Window" - layout="topleft" - name="Show Script Warning/Error Window"> - <menu_item_call.on_click - function="ShowFloater" - parameter="script errors" /> - </menu_item_call--> <menu_item_separator layout="topleft" /> <menu @@ -1067,14 +1055,14 @@ function="ShowHelp" parameter="f1_help" /> </menu_item_call> - <menu_item_call + <!-- <menu_item_call label="Tutorial" layout="topleft" name="Tutorial"> <menu_item_call.on_click function="Floater.Show" parameter="hud" /> - </menu_item_call> + </menu_item_call>--> <menu_item_separator layout="topleft" /> <menu_item_call @@ -1082,8 +1070,7 @@ layout="topleft" name="Report Abuse"> <menu_item_call.on_click - function="ShowFloater" - parameter="complaint reporter" /> + function="ReportAbuse" /> </menu_item_call> <menu_item_call label="Report Bug" @@ -1110,17 +1097,6 @@ name="Advanced" tear_off="true" visible="false"> - <menu_item_check - label="Set Away After 30 Minutes" - layout="topleft" - name="Go Away/AFK When Idle"> - <menu_item_check.on_check - function="CheckControl" - parameter="AllowIdleAFK" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="AllowIdleAFK" /> - </menu_item_check> <menu_item_call label="Stop Animating Me" layout="topleft" @@ -2537,7 +2513,7 @@ function="CheckControl" parameter="TextureDisable" /> <menu_item_check.on_click - function="ToggleControl" + function="ToggleControl" parameter="TextureDisable" /> </menu_item_check> <menu_item_check @@ -3640,17 +3616,6 @@ parameter="all" /> </menu_item_call> </menu> - <menu_item_check - label="Show Toolbar" - layout="topleft" - name="Show Toolbar"> - <menu_item_check.on_check - function="FloaterVisible" - parameter="toolbar" /> - <menu_item_check.on_click - function="ShowFloater" - parameter="toolbar" /> - </menu_item_check> <menu create_jump_keys="true" label="Help" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4645bfea74..d4b712e048 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -370,6 +370,19 @@ Add this Ability to '[ROLE_NAME]'? </notification> <notification + icon="alertmodal.tga" + name="AttachmentDrop" + type="alertmodal"> + You are about to drop your attachment. + Are you sure you want to continue? + <usetemplate + ignoretext="Confirm before dropping attachments" + name="okcancelignore" + notext="No" + yestext="Yes"/> + </notification> + + <notification icon="alertmodal.tga" name="ClickUnimplemented" type="alertmodal"> @@ -4328,7 +4341,6 @@ Hmm. Gesture [NAME] is missing from the database. name="UnableToLoadGesture" type="notifytip"> Unable to load gesture [NAME]. -Please try again. </notification> <notification @@ -5014,13 +5026,13 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O name="Keep" text="Keep"/> <button - index="4" - name="Show" - text="Show"/> - <button index="1" name="Discard" text="Discard"/> + <button + index="2" + name="Mute" + text="Block"/> </form> </notification> @@ -5761,6 +5773,17 @@ They will be blocked for a few seconds for your security. </form> </notification> + <notification + icon="alert.tga" + name="ConfirmCloseAll" + type="alertmodal"> +Are you sure you want to close all IMs? + <usetemplate + name="okcancelignore" + notext="Cancel" + yestext="Ok"/> + </notification> + <notification icon="notifytip.tga" name="AttachmentSaved" type="notifytip"> Attachment has been saved. diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 3ed91cb48f..3416b2369d 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -69,9 +69,9 @@ name="contact_name" layout="topleft" top="10" - left_pad="20" + left_pad="10" height="14" - width="245" + width="255" length="1" follows="right|left" use_ellipses="true" diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index f5fce65c73..f3a2297151 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -36,9 +36,9 @@ follows="all" height="20" label="Call" - left_delta="40" + left_delta="10" name="call_btn" - width="100" /> + width="160" /> <button bottom="40" follows="all" @@ -46,14 +46,15 @@ label="Leave Call" name="end_call_btn" visible="false" - width="100" /> + /> <button follows="all" bottom="10" height="20" label="Voice Controls" name="voice_ctrls_btn" + use_ellipses="true" visible="false" - width="100" /> + /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index a41d492624..3e2910458f 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -114,7 +114,7 @@ width="82" tool_tip="Shows/hides gestures"> <gesture_combo_box.drop_down_button - pad_right="10" + pad_right="10" use_ellipses="true" /> </gesture_combo_box> </layout_panel> @@ -126,7 +126,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -168,7 +168,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -211,7 +211,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -243,7 +243,7 @@ <layout_panel mouse_opaque="false" follows="left|right" - height="28" + height="29" layout="topleft" top="0" name="chiclet_list_panel" @@ -251,24 +251,24 @@ min_width="180" user_resize="false" auto_resize="true"> -<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same +<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991--> <chiclet_panel mouse_opaque="false" follows="left|right" height="23" layout="topleft" - left="0" + left="1" min_width="180" name="chiclet_list" - top="4" + top="6" chiclet_padding="4" scrolling_offset="40" width="189"> <button auto_resize="true" follows="right" - height="23" + height="29" image_selected="SegmentedBtn_Left_Off" image_unselected="SegmentedBtn_Left_Off" image_hover_selected="SegmentedBtn_Left_Over" @@ -278,14 +278,16 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_overlay="Arrow_Small_Left" layout="topleft" name="chicklet_left_scroll_button" + scale_image="true" tab_stop="false" - top="0" + top="-2" + right_pad="2" visible="false" - width="20" /> + width="7" /> <button auto_resize="true" follows="right" - height="23" + height="29" image_selected="SegmentedBtn_Right_Off" image_unselected="SegmentedBtn_Right_Off" image_hover_selected="SegmentedBtn_Right_Over" @@ -295,10 +297,11 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_overlay="Arrow_Small_Right" layout="topleft" name="chicklet_right_scroll_button" + scale_image="true" tab_stop="false" - top="0" + top="-2" visible="false" - width="20" /> + width="7" /> </chiclet_panel> </layout_panel> <icon @@ -309,7 +312,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" top="0" width="5"/> <layout_panel @@ -320,18 +323,18 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_height="28" top="0" name="im_well_panel" - width="34" - min_width="34" + width="35" + min_width="35" user_resize="false"> <chiclet_im_well - flash_period="0.3" + flash_period="0.3" follows="right" height="23" layout="topleft" left="0" name="im_well" top="4" - width="34"> + width="35"> <!-- Emulate 4 states of button by background images, see detains in EXT-3147. The same should be for notification_well button xml attribute Description @@ -342,21 +345,22 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well --> <button auto_resize="true" - flash_color="EmphasisColor" + flash_color="Yellow" follows="right" halign="center" height="23" - image_overlay="Notices_Unread" - image_overlay_alignment="center" + image_overlay="Unread_IM" + image_overlay_alignment="center" image_pressed="WellButton_Lit" image_pressed_selected="WellButton_Lit_Selected" image_selected="PushButton_Selected_Press" + label_color="Black" left="0" max_displayed_count="99" name="Unread IM messages" pad_left="0" pad_right="0" - width="34" > + width="35" > <button.init_callback function="Button.SetDockableFloaterToggle" parameter="im_well_window" /> @@ -370,9 +374,10 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well layout="topleft" min_height="28" top="0" + left_pad="4" name="notification_well_panel" - width="34" - min_width="34" + width="35" + min_width="35" user_resize="false"> <chiclet_notification flash_period="0.25" @@ -383,23 +388,24 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well max_displayed_count="99" name="notification_well" top="4" - width="34"> + width="35"> <button - image_selected="PushButton_Selected_Press" + bottom_pad="3" image_pressed="WellButton_Lit" image_pressed_selected="WellButton_Lit_Selected" + image_selected="PushButton_Selected_Press" auto_resize="true" halign="center" height="23" follows="right" - flash_color="EmphasisColor" - left="0" + flash_color="Yellow" + label_color="Black" + left="5" name="Unread" image_overlay="Notices_Unread" - image_overlay_alignment="center" - pad_right="0" - pad_left="0" - width="34" > + image_overlay_alignment="center" + pad_right="5" + width="35" > <button.init_callback function="Button.SetDockableFloaterToggle" parameter="notification_well_window" /> @@ -413,7 +419,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="10" image_name="spacer24.tga" layout="topleft" - min_width="4" + min_width="4" right="-1" top="0" width="4"/> diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 3e6ea84bf2..859822dd81 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -9,7 +9,7 @@ layout="topleft" name="im_header" width="310"> - <avatar_icon + <avatar_icon follows="left" height="18" image_name="Generic_Person" @@ -20,7 +20,7 @@ top="3" width="18" /> <text_editor - allow_scroll="false" + allow_scroll="false" v_pad = "0" read_only = "true" follows="left|right" diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml index f9ef038314..7aca40e8d9 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml index f4c03399fe..ed92b1e0f8 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml @@ -41,7 +41,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml index ab105afd88..b764188e04 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml index 9a13dfa3c4..4b7235545f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml index 154b9d959c..e886afa010 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml index d0f4d75444..6cccab1843 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml index acc6d482a7..fc7de00714 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml index 4f5c1c08b7..03e0bb70ef 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml index 715674e88b..20c56142fb 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml @@ -29,7 +29,6 @@ top="10" width="64" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="80" diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index a5445a5783..86b30ebfce 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -24,9 +24,10 @@ follows="left|right|bottom" height="23" label="Group Profile" - left_delta="28" + left_delta="10" name="group_info_btn" - width="125" /> + use_ellipses="true" + width="160" /> <panel background_visible="true" bg_alpha_color="DkGray2" @@ -43,24 +44,27 @@ follows="all" height="23" label="Call Group" - left_delta="28" + left_delta="10" name="call_btn" - width="125" /> + use_ellipses="true" + width="160" /> <button bottom="40" follows="all" height="23" label="Leave Call" name="end_call_btn" + use_ellipses="true" visible="false" - width="125" /> + /> <button bottom="10" follows="all" height="23" label="Open Voice Controls" name="voice_ctrls_btn" + use_ellipses="true" visible="false" - width="125" /> + /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 1b70b95a93..e096715cee 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -78,7 +78,6 @@ Maximum 200 per group daily image_unselected="AddItem_Off" image_disabled="AddItem_Disabled" layout="topleft" - label="Create a new notice" left="5" name="create_new_notice" tool_tip="Create a new notice" diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 0a3fd1699f..30e652befd 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -21,32 +21,32 @@ value="Unknown" width="100" /> <button - follows="left|top" + follows="left|top|right" height="20" label="Profile" name="view_profile_btn" width="100" /> <button - follows="left|top" + follows="left|top|right" height="20" label="Add Friend" name="add_friend_btn" width="100" /> <button - follows="left|top" + follows="left|top|right" height="20" label="Teleport" name="teleport_btn" width="100" /> <button - follows="left|top" + follows="left|top|right" height="20" label="Share" name="share_btn" width="100" /> <!--Removing pay button to save space - will update spec - verified by Erica/Steve --> <!-- <button - follows="left|top" + follows="left|top|right" height="20" label="Pay" name="pay_btn" @@ -56,13 +56,14 @@ bg_alpha_color="DkGray2" border="false" top_pad="10" - follows="left|bottom" + follows="left|bottom|right" height="70" left="1" name="panel_call_buttons" width="109"> <button bottom="10" + follows="left|top|right" height="20" label="Call" left_delta="5" @@ -70,6 +71,7 @@ width="100" /> <button bottom="35" + follows="left|top|right" height="20" label="Leave Call" name="end_call_btn" @@ -77,6 +79,7 @@ width="100" /> <button bottom="10" + follows="left|top|right" height="20" label="Voice Controls" name="voice_ctrls_btn" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 68e58b27ec..9f06e64560 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -60,6 +60,7 @@ layout="topleft" left="10" name="back_btn" + tool_tip="Back" tab_stop="false" top="0" width="23" /> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index c9db75b5d8..6187b8f1e2 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -33,21 +33,31 @@ name="login_html" start_url="" top="0" height="600" - width="996" /> -<panel + width="980" /> +<layout_stack follows="left|bottom|right" name="login_widgets" layout="topleft" +orientation="horizontal" top="519" width="996" - height="80"> +height="80"> +<layout_panel +auto_resize="false" +follows="left|bottom" +name="login" +layout="topleft" +width="695" +min_width="695" +user_resize="false" +height="80"> <text follows="left|bottom" font="SansSerifSmall" height="16" -left="20" name="first_name_text" top="20" +left="20" width="150"> First name: </text> @@ -145,7 +155,7 @@ name="Typeregionname" value="" /> <combo_box allow_text_entry="true" font="SansSerifSmall" - follows="left|bottom" + follows="left|right|bottom" height="23" layout="topleft" top_pad="2" @@ -164,14 +174,20 @@ width="135" name="connect_btn" top="35" width="90" /> - <text +</layout_panel> +<layout_panel +follows="right|bottom" +name="links" +width="200" +min_width="200" +user_resize="false" +height="80"> + <text follows="right|bottom" font="SansSerifSmall" -text_color="EmphasisColor" halign="right" height="16" top="12" -left_pad="5" right="-10" name="create_new_account_text" width="180"> @@ -183,7 +199,9 @@ font="SansSerifSmall" text_color="EmphasisColor" halign="right" height="16" -name="forgot_password_text" top_pad="12" +name="forgot_password_text" +top_pad="12" +right="-10" width="180"> Forgot your name or password? </text> @@ -195,6 +213,7 @@ halign="right" height="16" name="login_help" top_pad="2" +right="-10" width="180"> Need help logging in? </text> <!-- <text @@ -208,5 +227,6 @@ top_pad="2" word_wrap="true"> [VERSION] </text>--> -</panel> + </layout_panel> +</layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 9990215dfd..4353b306cd 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -17,7 +17,7 @@ text_pad_left="14" follows="left|top|right" height="23" - label="Filter" + label="Filter Inventory" layout="topleft" left="15" max_length="300" diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index 24c40b32fb..5217ab3571 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -17,7 +17,7 @@ height="15" left="10" name="home_label"> - Home URL: + Home Page: </text> <text visible="false" @@ -27,7 +27,7 @@ left_delta="64" text_color="red" name="home_fails_whitelist_label"> - (This URL does not pass the specified whitelist) + (This page does not pass the specified whitelist) </text> <line_editor bottom_delta="-24" @@ -37,7 +37,7 @@ height="20" left="10" name="home_url" - tool_tip="The home URL for this media source" + tool_tip="The home page for this media source" width="340"> <!-- <line_editor.commit_callback function="Media.CommitHomeURL"/> --> @@ -69,7 +69,7 @@ height="15" left="10" name="current_url_label"> - Current URL: + Current Page: </text> <text bottom_delta="-20" @@ -79,7 +79,7 @@ height="20" left="10" name="current_url" - tool_tip="The current URL for this media source" + tool_tip="The current page for this media source" value="" width="340" /> <button @@ -93,35 +93,6 @@ <button.commit_callback function="Media.ResetCurrentUrl"/> </button> - <text - bottom_delta="-5" - follows="top|left" - height="15" - left="10" - name="controls_label"> - Controls: - </text> - <combo_box - allow_text_entry="false" - bottom_delta="-20" - follows="left|top" - height="18" - left="10" - max_chars="20" - name="controls" - width="120"> - <combo_item - name="Standard" - value="Standard"> - Standard - </combo_item> - <combo_item - name="Mini" - value="Mini"> - Mini - </combo_item> - </combo_box> - <check_box bottom_delta="-25" enabled="true" @@ -135,7 +106,6 @@ name="auto_loop" radio_style="false" width="150" /> - <check_box bottom_delta="-25" visible="false" diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml index 85f534c4a3..b5c2371510 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml @@ -4,13 +4,42 @@ enabled="true" follows="left|top|right|bottom" height="500" - label="Controls" + label="Customize" left="102" mouse_opaque="true" name="Media settings for controls" help_topic = "media_settings_controls" width="365"> + <text + bottom_delta="-50" + follows="top|left" + height="15" + left="10" + name="controls_label"> + Controls: + </text> + <combo_box + allow_text_entry="false" + bottom_delta="0" + follows="left|top" + height="18" + left="100" + max_chars="20" + name="controls" + width="120"> + <combo_item + name="Standard" + value="Standard"> + Standard + </combo_item> + <combo_item + name="Mini" + value="Mini"> + Mini + </combo_item> + </combo_box> + <text bottom_delta="-50" follows="top|left" @@ -27,7 +56,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Disable Navigation & Interactivity" + label="Allow Navigation & Interactivity" left="30" mouse_opaque="true" name="perms_owner_interact" @@ -41,7 +70,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Hide Control Bar" + label="Show Control Bar" left="30" mouse_opaque="true" name="perms_owner_control" @@ -74,7 +103,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Disable Navigation & Interactivity" + label="Allow Navigation & Interactivity" left="30" mouse_opaque="true" name="perms_group_interact" @@ -88,7 +117,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Hide Control Bar" + label="Show Control Bar" left="30" mouse_opaque="true" name="perms_group_control" @@ -111,7 +140,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Disable Navigation & Interactivity" + label="Allow Navigation & Interactivity" left="30" mouse_opaque="true" name="perms_anyone_interact" @@ -125,7 +154,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Hide Control Bar" + label="Show Control Bar" left="30" mouse_opaque="true" name="perms_anyone_control" diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml index 6e82713f06..1f580831f9 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml @@ -17,7 +17,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Only Allow Access to Specified URLs (by prefix)" + label="Only Allow Access to Specified URL patterns" left="10" mouse_opaque="true" name="whitelist_enable" @@ -48,7 +48,7 @@ bottom_delta="0" text_color="0.4 0.4 0.4 1.0" name="home_url_fails_some_items_in_whitelist"> - Entries that the home URL fails against are marked: + Entries that the home page fails against are marked: </text> <button bottom_delta="-36" @@ -81,10 +81,9 @@ height="40" left="30" text_color="0.6 0.0 0.0 1.0" + word_wrap="true" name="home_url_fails_whitelist"> -Warning: the home URL specified in the General tab -fails to pass this whitelist. It has been disabled -until a valid entry has been added. +Warning: the home page specified in the General tab fails to pass this whitelist. It has been disabled until a valid entry has been added. </text> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index e8e4a9dbb2..74265a51ca 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -149,6 +149,7 @@ <favorites_bar follows="left|right|top" + font="SansSerif" height="15" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml index 9e7c9477d4..f15e75dee9 100644 --- a/indra/newview/skins/default/xui/en/panel_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_notes.xml @@ -114,7 +114,7 @@ width="313"> <button follows="bottom|left" - height="19" + height="23" label="Add" layout="topleft" left="0" @@ -125,7 +125,7 @@ width="55" /> <button follows="bottom|left" - height="19" + height="23" label="IM" layout="topleft" name="im" @@ -135,7 +135,7 @@ width="40" /> <button follows="bottom|left" - height="19" + height="23" label="Call" layout="topleft" name="call" @@ -146,7 +146,7 @@ <button enabled="false" follows="bottom|left" - height="19" + height="23" label="Map" layout="topleft" name="show_on_map_btn" @@ -156,7 +156,7 @@ width="50" /> <button follows="bottom|left" - height="19" + height="23" label="Teleport" layout="topleft" name="teleport" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index db95d01b43..5c99022f35 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -1,61 +1,114 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="Outfits" - height="510" - width="333" - follows="top|left" - left="0" - top_pad="0"> - <accordion - single_expansion="true" - height="510" - layout="topleft" - left="0" - follows="top|left" - name="outfits_accordion" - top_pad="0" - width="333"> - <accordion_tab - expanded="false" - layout="topleft" - name="tab_cof" - title="Current Outfit"> - <inventory_panel + + <panel name="Outfits" + background_visible="true" + follows="all" + height="550" + label="Things" + layout="topleft" + min_height="350" + min_width="240" + width="330" + border="false"> + <tab_container + follows="all" + height="500" + layout="topleft" + left="10" + name="appearance_tabs" + tab_min_width="100" + tab_height="30" + tab_position="top" + halign="center" + width="313"> + <inventory_panel + label="MY OUTFITS" + help_topic="my_outfits_tab" allow_multi_select="true" + follows="all" border="false" - height="460" - left="0" - top="0" - mouse_opaque="true" - name="cof_accordionpanel" - start_folder="Current Outfit" /> - </accordion_tab> - <accordion_tab - expanded="true" - layout="topleft" - name="tab_outfits" - title="My Outfits"> - <inventory_panel - allow_multi_select="true" - border="false" - follows="all" - left="0" - top="0" - height="460" - mouse_opaque="true" - name="outfitslist_accordionpanel" - start_folder="My Outfits" /> - </accordion_tab> - </accordion> - <!--<button bottom="0" - halign="center" - height="23" - label=">" - enabled="false" - mouse_opaque="false" - name="selector" - width="20" - left="0" - visible="false" - follows="right|bottom" - tool_tip="View outfit properties" />--> + left="0" + top="0" + height="500" + width="290" + mouse_opaque="true" + name="outfitslist_accordionpanel" + start_folder="My Outfits" /> + <inventory_panel + label="WEARING" + help_topic="now_wearing_tab" + allow_multi_select="true" + border="false" + height="500" + width="290" + left="0" + top="0" + mouse_opaque="true" + name="cof_accordionpanel" + start_folder="Current Outfit" /> + </tab_container> + <panel + background_visible="true" + follows="bottom|left" + height="50" + layout="topleft" + left="0" + visible="true" + name="bottom_panel" + top_pad="10" + width="313"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" + layout="topleft" + left="10" + name="options_gear_btn" + top="6" + width="18" /> + <dnd_button + follows="bottom|left" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-5" + name="trash_btn" + tool_tip="Remove selected item" + top="6" + width="18" /> + <button + follows="bottom|left" + height="23" + label="Edit Look" + layout="topleft" + left="10" + name="look_edit_btn" + top="26" + visible="false" + width="90" /> + <button + follows="bottom|left" + height="23" + label="Make Outfit" + layout="topleft" + name="make_outfit_btn" + tool_tip="Save appearance as an outfit" + top="26" + right="-110" + width="90" /> + <button + follows="bottom|right" + height="23" + label="Wear" + layout="topleft" + name="wear_btn" + right="-10" + top="26" + tool_tip="Wear selected outfit" + width="90" /> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 87861e7901..8883c27c47 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -346,7 +346,7 @@ background_visible="true" follows="bottom|left" top="4" left="0" - height="19" + height="23" label="Profile" layout="topleft" name="view_profile_btn" @@ -356,7 +356,7 @@ background_visible="true" follows="bottom|left" top="4" left_pad="2" - height="19" + height="23" label="IM" layout="topleft" name="im_btn" @@ -366,7 +366,7 @@ background_visible="true" follows="bottom|left" top="4" left_pad="2" - height="19" + height="23" label="Call" layout="topleft" name="call_btn" @@ -376,7 +376,7 @@ background_visible="true" follows="left|top" top="4" left_pad="2" - height="19" + height="23" label="Share" layout="topleft" name="share_btn" @@ -385,7 +385,7 @@ background_visible="true" follows="bottom|left" top="4" left_pad="2" - height="19" + height="23" label="Teleport" layout="topleft" name="teleport_btn" @@ -395,7 +395,7 @@ background_visible="true" follows="bottom|left" top="4" left="0" - height="19" + height="23" label="Group Profile" layout="topleft" name="group_info_btn" @@ -405,7 +405,7 @@ background_visible="true" follows="bottom|left" top="4" left_pad="2" - height="19" + height="23" label="Group Chat" layout="topleft" name="chat_btn" diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 0cf2a7afc3..f68202d287 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -103,7 +103,7 @@ name="buttons"> <button follows="bottom|left" - height="19" + height="23" label="Teleport" layout="topleft" left="0" @@ -112,7 +112,7 @@ width="90" /> <button follows="bottom|left" - height="19" + height="23" label="Map" layout="topleft" left_pad="10" @@ -121,7 +121,7 @@ width="90" /> <button follows="bottom|left" - height="19" + height="23" label="Edit" layout="topleft" right="-1" diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 4facedc7ea..1fc553ff36 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -20,12 +20,9 @@ height="535" layout="topleft" left="6" - name="empty_picks_panel_text" + name="picks_panel_text" top="10" - visible="false" - width="313"> - There are no picks/classifieds here - </text> + width="313"/> <accordion fit_parent="true" follows="all" @@ -132,7 +129,7 @@ <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Info" layout="topleft" left="5" @@ -144,7 +141,7 @@ <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Teleport" layout="topleft" left_pad="5" @@ -156,7 +153,7 @@ <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Map" layout="topleft" left_pad="5" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index b25d9a7dfc..8fc2ae39f0 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -145,6 +145,7 @@ layout="topleft" left="10" name="back_btn" + tool_tip="Back" tab_stop="false" top="0" width="23" /> @@ -517,7 +518,7 @@ width="60" /> <button follows="bottom|right" - height="19" + height="23" label="About Land" layout="topleft" name="about_land_btn" @@ -526,7 +527,7 @@ top="138" width="90"> <click_callback - function="ShowFloater" + function="Floater.Show" parameter="about_land" /> </button> </panel> @@ -644,7 +645,7 @@ </text> <button follows="bottom|right" - height="19" + height="23" label="Region/Estate" layout="topleft" name="region_info_btn" @@ -652,7 +653,7 @@ tab_stop="false" width="105"> <click_callback - function="ShowFloater" + function="Floater.Show" parameter="region_info" /> </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 88df529ec1..8a5c023133 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -22,7 +22,7 @@ background_visible="true" height="23" layout="topleft" left="15" - label="Filter" + label="Filter Places" max_length="300" name="Filter" top="3" @@ -72,16 +72,17 @@ background_visible="true" width="313"> <button follows="bottom|left" - height="19" + height="23" label="Teleport" layout="topleft" left="5" name="teleport_btn" + tool_tip="Teleport to the selected area" top="0" width="100" /> <button follows="bottom|left" - height="19" + height="23" label="Map" layout="topleft" left_pad="5" @@ -90,27 +91,29 @@ background_visible="true" width="70" /> <button follows="bottom|left" - height="19" + height="23" label="Edit" layout="topleft" left_pad="5" name="edit_btn" + tool_tip="Edit landmark information" top="0" width="70" /> <button follows="bottom|right" - height="19" + height="23" image_disabled="ForwardArrow_Off" image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" layout="topleft" name="overflow_btn" + tool_tip="Show additional options" right="-10" top="0" width="18" /> <button follows="bottom|right" - height="19" + height="23" label="Close" layout="topleft" name="close_btn" @@ -119,7 +122,7 @@ background_visible="true" width="60" /> <button follows="bottom|right" - height="19" + height="23" label="Cancel" layout="topleft" name="cancel_btn" @@ -128,7 +131,7 @@ background_visible="true" width="60" /> <button follows="bottom|right" - height="19" + height="23" label="Save" layout="topleft" name="save_btn" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 78b90eefcc..426a2b1f9e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -29,7 +29,6 @@ name="bubble_text_chat" width="150" /> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0 0 0 1" control_name="BackgroundChatColor" @@ -284,7 +283,7 @@ Avatars: enabled_control="EnableVoiceChat" control_name="PushToTalkToggle" height="20" - label="Toggle mode for microphone when I press the speak trigger key:" + label="Toggle mode for microphone when I press the Speak trigger key:" layout="topleft" left="30" name="push_to_talk_toggle_check" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index fff53c1de2..017c321767 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -16,13 +16,14 @@ control_name="ChatFontSize" name="chat_font_size" top="10" - width="331"> + width="440"> <radio_item height="16" label="Small" layout="topleft" left="0" name="radio" + value="0" top="10" width="125" /> <radio_item @@ -31,6 +32,7 @@ layout="topleft" left_delta="145" name="radio2" + value="1" top_delta="0" width="125" /> <radio_item @@ -39,11 +41,11 @@ layout="topleft" left_delta="170" name="radio3" + value="2" top_delta="0" width="125" /> </radio_group> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="47" @@ -73,7 +75,6 @@ Me </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" follows="left|top" height="47" @@ -103,7 +104,6 @@ Others </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.6 0.6 1 1" follows="left|top" @@ -135,7 +135,6 @@ IM </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.8 1 1 1" follows="left|top" @@ -167,7 +166,6 @@ System </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.82 0.82 0.99 1" follows="left|top" @@ -198,7 +196,6 @@ Errors </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.7 0.9 0.7 1" follows="left|top" @@ -229,7 +226,6 @@ Objects </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.7 0.9 0.7 1" follows="left|top" @@ -260,7 +256,6 @@ Owner </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" can_apply_immediately="true" color="0.6 0.6 1 1" follows="left|top" @@ -340,6 +335,7 @@ layout="topleft" left="0" name="radio" + value="0" top="0" width="150" /> <radio_item @@ -348,6 +344,7 @@ layout="topleft" left_delta="145" name="radio2" + value="1" top_delta="0" width="150" /> </radio_group> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index b5c6b637e5..41bd7f3dcc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -13,7 +13,7 @@ type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left="30" name="language_textbox" @@ -23,14 +23,13 @@ </text> <combo_box control_name="Language" - follows="left|bottom" + follows="left|top" height="23" layout="topleft" - left_delta="50" + left="50" max_chars="135" name="language_combobox" - top_pad="10" - width="170"> + width="200"> <combo_box.item enabled="true" label="System default" @@ -66,7 +65,6 @@ label="Italiano (Italian) - Beta" name="Italian" value="it" /> - <combo_box.item enabled="true" label="Nederlands (Dutch) - Beta" @@ -82,62 +80,54 @@ label="Portugués (Portuguese) - Beta" name="Portugese" value="pt" /> - - - - <combo_box.item enabled="true" label="日本語 (Japanese) - Beta" name="(Japanese)" value="ja" /> - - </combo_box> <text + font="SansSerifSmall" type="string" length="1" follows="left|top" - height="10" + height="18" layout="topleft" - left_delta="175" + left_pad="5" name="language_textbox2" - top_delta="1" - width="400"> + width="200"> (Requires restart) </text> <text type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left="30" + top_pad="15" name="maturity_desired_prompt" - top_pad="10" - width="400"> + width="200"> I want to access content rated: </text> <text type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" - left="90" + left_pad="5" name="maturity_desired_textbox" - top_pad="10" - width="400"> + width="200"> </text> <combo_box control_name="PreferredMaturity" - follows="left|bottom" + follows="left|top" height="23" layout="topleft" - left_delta="-10" + left="50" name="maturity_desired_combobox" - top_pad="-10" - width="170"> + width="200"> <combo_box.item label="General, Moderate, Adult" name="Desired_Adult" @@ -155,23 +145,22 @@ type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left="30" name="start_location_textbox" - top_delta="20" + top_pad="10" width="394"> Start location: </text> <combo_box control_name="LoginLocation" - follows="left|bottom" + follows="left|top" height="23" layout="topleft" - left_delta="50" name="start_location_combo" - top_pad="10" - width="170"> + left="50" + width="200"> <combo_box.item label="My Last Location" name="MyLastLocation" @@ -187,54 +176,48 @@ initial_value="true" label="Show on login" layout="topleft" - left_delta="175" + left_pad="5" name="show_location_checkbox" - top_delta="1" + top_delta="5" width="256" /> - <text type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left="30" name="name_tags_textbox" - top_pad="10" + top_pad="15" width="400"> Name tags: </text> <radio_group control_name="AvatarNameTagMode" - height="30" + height="20" layout="topleft" - left_delta="50" - name="Name_Tag_Preference" - top_pad="10"> + left="50" + name="Name_Tag_Preference"> <radio_item - height="16" label="Off" layout="topleft" - left="0" name="radio" - top_pad="0" - width="98" /> + value="0" + width="100" /> <radio_item - height="16" label="On" layout="topleft" left_pad="12" name="radio2" - top_delta="0" - width="98" /> + value="1" + width="100" /> <radio_item - height="16" label="Show briefly" layout="topleft" left_pad="12" name="radio3" - top_delta="0" - width="98" /> + value="2" + width="100" /> </radio_group> <check_box enabled_control="AvatarNameTagMode" @@ -242,9 +225,8 @@ height="16" label="Show my name" layout="topleft" - left_delta="0" + left="50" name="show_my_name_checkbox1" - top_pad="-7" width="300" /> <check_box enabled_control="AvatarNameTagMode" @@ -255,7 +237,6 @@ layout="topleft" left_delta="175" name="small_avatar_names_checkbox" - top_delta="0" width="200" /> <check_box enabled_control="AvatarNameTagMode" @@ -271,92 +252,95 @@ type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left="30" name="effects_color_textbox" - top_pad="5" - width="400"> + top_pad="15" + width="200"> My effects: </text> + <text + type="string" + length="1" + follows="left|top" + height="13" + layout="topleft" + left_pad="5" + name="title_afk_text" + width="190"> + Away timeout: + </text> <color_swatch - border_color="0.45098 0.517647 0.607843 1" control_name="EffectColor" follows="left|top" - height="48" + height="50" layout="topleft" - left_delta="50" + left="50" name="effect_color_swatch" tool_tip="Click to open Color Picker" - top_pad="5" - width="32" /> + width="38" /> + <combo_box + height="23" + layout="topleft" + control_name="AFKTimeout" + left_pad="160" + label="Away timeout:" + top_delta="0" + name="afk" + width="130"> + <combo_box.item + label="2 minutes" + name="item0" + value="120" /> + <combo_box.item + label="5 minutes" + name="item1" + value="300" /> + <combo_box.item + label="10 minutes" + name="item2" + value="600" /> + <combo_box.item + label="30 minutes" + name="item3" + value="1800" /> + <combo_box.item + label="never" + name="item4" + value="0" /> + </combo_box> <text type="string" length="1" follows="left|top" - height="15" - layout="topleft" - left="30" - name="title_afk_text" - text_color="white" - top_pad="-5" - width="190"> - Away timeout: - </text> - <spinner - control_name="AFKTimeout" - decimal_digits="0" - follows="left|top" - halign="right" - height="15" - increment="1" - initial_value="300" - label="" - label_width="0" - layout="topleft" - left_delta="50" - max_val="600" - min_val="30" - name="afk_timeout_spinner" - top_pad="5" - width="50" /> - <text - type="string" - length="1" - follows="left|top" - halign="left" - height="15" - layout="topleft" - left_pad="2" - name="seconds_textbox" - width="70"> - seconds - </text> - <text - type="string" - length="1" - follows="left|top" - height="10" + height="13" layout="topleft" text_color="white" left="30" mouse_opaque="false" name="text_box3" - top_pad="10" + top_pad="15" width="240"> Busy mode response: </text> <text_editor control_name="BusyModeResponse2" + text_readonly_color="LabelDisabledColor" + bg_writeable_color="LtGray" + use_ellipses="false" + bg_visible="false" + border_visible="false" + hover="false" + text_color="LabelTextColor" commit_on_focus_lost = "true" follows="left|top" - height="56" + height="50" layout="topleft" - left_delta="50" + left="50" name="busy_response" width="400" - word_wrap="true" - top_pad="5"> + word_wrap="true"> log_in_to_change </text_editor> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 04985d0fa9..f97ccafecc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -28,7 +28,7 @@ follows="left|top" height="15" increment="0.025" - initial_valu="1" + initial_value="1" layout="topleft" left_delta="52" max_val="1.4" @@ -656,6 +656,7 @@ layout="topleft" left="3" name="SunMoon" + value="0" top="3" width="156" /> <radio_item @@ -664,6 +665,7 @@ layout="topleft" left_delta="0" name="LocalLights" + value="1" top_delta="16" width="156" /> </radio_group> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a7def5306e..34bd6fb091 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -3,7 +3,7 @@ border="true" follows="left|top|right|bottom" height="408" - label="Input & Camera" + label="Setup" layout="topleft" left="102" name="Input panel" @@ -98,12 +98,12 @@ decimal_digits="0" follows="left|top" height="15" - increment="10" - initial_value="50" + increment="100" + initial_value="500" layout="topleft" left_delta="150" - max_val="1500" - min_val="50" + max_val="10000" + min_val="100" name="max_bandwidth" top_delta="0" width="180" /> @@ -223,7 +223,7 @@ follows="left|top" height="23" label="Reset" - label_selected="Set" + label_selected="Reset" layout="topleft" left_pad="3" name="reset_cache" @@ -268,24 +268,26 @@ name="use_external_browser" top_pad="4" width="480"> - <radio_item - height="20" - label="Use built-in browser" - layout="topleft" - left="0" - name="internal" - tool_tip="Use the built-in web browser for help, web links, etc. This browser opens as a new window inside [APP_NAME]." - top="0" - width="480" /> - <radio_item - height="20" - label="Use my browser (IE, Firefox)" - layout="topleft" - left_delta="0" - name="external" - tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen." - top_delta="20" - width="480" /> + <radio_item + height="20" + label="Use built-in browser" + layout="topleft" + left="0" + name="internal" + value="0" + tool_tip="Use the built-in web browser for help, web links, etc. This browser opens as a new window inside [APP_NAME]." + top="0" + width="480" /> + <radio_item + height="20" + label="Use my browser (IE, Firefox)" + layout="topleft" + left_delta="0" + name="external" + value="1" + tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen." + top_delta="20" + width="480" /> </radio_group> <check_box diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 5332007baf..d8e3f4ccfb 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -348,23 +348,24 @@ label="Input/Output devices" layout="topleft" left="30" - top="270" + top="262" name="device_settings_btn" width="190"> </button> <panel - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" visiblity_control="ShowDeviceSettings" border="false" follows="top|left" - height="145" + height="120" label="Device Settings" layout="topleft" left="0" name="device_settings_panel" class="panel_voice_device_settings" - width="501"> + width="501" + top="285"> <panel.string name="default_text"> Default @@ -397,8 +398,33 @@ left="165" max_chars="128" name="voice_input_device" - top_pad="0" + top_pad="-2" width="200" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="165" + name="My volume label" + top_pad="5" + width="200"> + My volume: + </text> + <slider_bar + control_name="AudioLevelMic" + follows="left|top" + height="17" + increment="0.05" + initial_value="1.0" + layout="topleft" + left="160" + max_val="2" + name="mic_volume_slider" + tool_tip="Change the volume using this slider" + top_pad="-2" + width="220" /> <text type="string" text_color="EmphasisColor" @@ -408,7 +434,7 @@ layout="topleft" left_pad="5" name="wait_text" - top_delta="5" + top_delta="0" width="110"> Please wait </text> @@ -417,7 +443,7 @@ layout="topleft" left_delta="0" name="bar0" - top_delta="-5" + top_delta="0" width="20" /> <locate height="20" @@ -453,7 +479,7 @@ left="80" name="speaker_icon" mouse_opaque="false" - top_pad="4" + top_pad="-8" visible="true" width="22" /> <text @@ -475,7 +501,7 @@ left="165" max_chars="128" name="voice_output_device" - top_pad="0" + top_pad="-2" width="200" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index b4f72a48bc..b14089c3a2 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -5,6 +5,7 @@ background_visible="false" height="200" layout="topleft" + help_topic="prim_media_controls" mouse_opaque="false" width="800"> <string name="control_background_image_name">Inspector_Background</string> @@ -190,7 +191,7 @@ layout="topleft" top="14" min_width="22" - width="22"> + width="24"> <button image_overlay="Play_Off" image_disabled="PushButton_Disabled" @@ -200,6 +201,8 @@ hover_glow_amount="0.15" layout="topleft" tool_tip = "Play media" + left_delta="2" + top="4" height="22" min_width="22" width="22"> @@ -214,7 +217,7 @@ layout="topleft" top="18" min_width="22" - width="22"> + width="24"> <button image_overlay="Pause_Off" image_disabled="PushButton_Disabled" @@ -224,6 +227,9 @@ hover_glow_amount="0.15" layout="topleft" height="22" + width="22" + left_delta="-1" + top="4" tool_tip = "Pause media"> <button.commit_callback function="MediaCtrl.Pause" /> @@ -393,6 +399,8 @@ function="MediaCtrl.ToggleMute" /> <button.mouseenter_callback function="MediaCtrl.ShowVolumeSlider" /> + <button.mouseleave_callback + function="MediaCtrl.HideVolumeSlider" /> </button> <slider orientation="vertical" @@ -408,6 +416,10 @@ volume="true"> <slider.commit_callback function="MediaCtrl.Volume"/> + <slider.mouseenter_callback + function="MediaCtrl.ShowVolumeSlider" /> + <slider.mouseleave_callback + function="MediaCtrl.HideVolumeSlider" /> </slider> </layout_panel> <panel diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 638bc3cabd..342cf4144f 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -275,12 +275,12 @@ left="0" name="profile_buttons_panel" top_pad="2" - bottom="10" + bottom="0" height="19" width="303"> <button follows="bottom|left" - height="19" + height="23" label="Add Friend" layout="topleft" left="0" @@ -291,7 +291,7 @@ width="77" /> <button follows="bottom|left" - height="19" + height="23" label="IM" layout="topleft" name="im" @@ -301,7 +301,7 @@ width="33" /> <button follows="bottom|left" - height="19" + height="23" label="Call" layout="topleft" name="call" @@ -312,7 +312,7 @@ <button enabled="false" follows="bottom|left" - height="19" + height="23" label="Map" layout="topleft" name="show_on_map_btn" @@ -322,7 +322,7 @@ width="44" /> <button follows="bottom|left" - height="19" + height="23" label="Teleport" layout="topleft" name="teleport" @@ -332,7 +332,7 @@ width="67" /> <button follows="bottom|right" - height="19" + height="23" label="▼" layout="topleft" name="overflow_btn" @@ -352,14 +352,14 @@ width="303"> <button follows="bottom|right" - height="19" + height="23" left="10" label="Edit Profile" name="edit_profile_btn" width="130" /> <button follows="bottom|right" - height="19" + height="23" label="Edit Appearance" left_pad="10" name="edit_appearance_btn" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index 8e683bffc1..6324ec2bd8 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -26,18 +26,20 @@ top="2" width="23" /> <text_editor - read_only = "true" - follows="top|left|right" - font="SansSerifHugeBold" - height="29" - layout="topleft" - left_pad="10" - name="user_name" - text_color="white" - top="0" - value="(Loading...)" - use_ellipses="true" - width="275" /> + allow_scroll="false" + bg_visible="false" + read_only = "true" + follows="top|left|right" + font="SansSerifHugeBold" + height="29" + layout="topleft" + left_pad="10" + name="user_name" + text_color="white" + top="0" + value="(Loading...)" + use_ellipses="true" + width="275" /> <text follows="top|left" height="13" diff --git a/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml b/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml new file mode 100644 index 0000000000..d98f690339 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + border="true" + follows="top|left" + height="570" + label="MY AVATAR" + layout="topleft" + left="0" + name="script_limits_my_avatar_panel" + top="0" + width="480"> + <text + type="string" + length="1" + follows="left|top" + height="20" + layout="topleft" + left="10" + name="loading_text" + top="10" + text_color="EmphasisColor" + width="480"> + Loading... + </text> + <scroll_list + draw_heading="true" + follows="all" + height="500" + layout="topleft" + left_delta="0" + multi_select="true" + name="scripts_list" + top_delta="17" + width="460"> + <scroll_list.columns + label="Size (kb)" + name="size" + width="70" /> + <scroll_list.columns + label="URLs" + name="urls" + width="50" /> + <scroll_list.columns + label="Object Name" + name="name" + width="140" /> + <scroll_list.columns + label="Location" + name="location" + width="130" /> + </scroll_list> + <button + follows="bottom|left" + height="19" + label="Refresh List" + layout="bottomleft" + left_pad="5" + name="refresh_list_btn" + top="34" + left="10" + width="100" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml new file mode 100644 index 0000000000..0fa3c1cf2e --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + border="true" + follows="top|left" + height="570" + label="REGION MEMORY" + layout="topleft" + name="script_limits_region_memory_panel" + top="0" + left="0" + width="480"> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="script_memory" + top_pad="24" + text_color="White" + width="480"> + Parcel Script Memory + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="30" + name="parcels_listed" + top_delta="18" + visible="true" + width="480"> + Parcels Owned: + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="30" + name="memory_used" + top_delta="18" + width="480"> + Memory used: + </text> + <text + type="string" + length="1" + follows="left|top" + height="20" + layout="topleft" + left="10" + name="loading_text" + top_delta="32" + text_color="EmphasisColor" + width="480"> + Loading... + </text> + <scroll_list + draw_heading="true" + follows="all" + height="409" + layout="topleft" + left_delta="0" + multi_select="true" + name="scripts_list" + top_delta="16" + width="460"> + <scroll_list.columns + label="Size (kb)" + name="size" + width="70" /> + <scroll_list.columns + label="Object Name" + name="name" + width="100" /> + <scroll_list.columns + label="Object Owner" + name="owner" + width="100" /> + <scroll_list.columns + label="Parcel / Location" + name="location" + width="130" /> +<!-- <scroll_list.commit_callback + function="TopObjects.CommitObjectsList" />--> + </scroll_list> + <button + follows="bottom|left" + height="19" + label="Refresh List" + layout="bottomleft" + left_pad="5" + name="refresh_list_btn" + top="34" + left="10" + width="100" /> + <button + follows="bottom|right" + height="19" + visible="false" + label="Highlight" + layout="bottomright" + left="370" + name="highlight_btn" + top="34" + width="100" /> + <button + follows="bottom|right" + height="19" + visible="false" + label="Return" + layout="bottomright" + name="return_btn" + top="34" + left_delta="-105" + width="100" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index 32fc9fce01..06da64533b 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -151,7 +151,7 @@ <button follows="bottom|left" font="SansSerifBigBold" - tool_tip="" + tool_tip="Show additional optioins" height="18" image_disabled="OptionsMenu_Disabled" image_selected="OptionsMenu_Press" diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index 3384852f27..4f40e00815 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -55,6 +55,7 @@ left_pad="5" right="-3" name="profile_btn" + tool_tip="Show item info" top="1" visible="false" width="20" /> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 3dac1a9614..7f4b4aef82 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -85,72 +85,21 @@ left="0" class="panel_outfits_inventory" filename="panel_outfits_inventory.xml" name="panel_outfits_inventory" - height="510" + height="550" min_height="510" width="333" top_pad="0" - follows="top|left" + follows="all" /> - <panel - visible="true" - name="bottom_panel" - height="50" - left="0" - top_pad="3" - follows="bottom|left" - width="333"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - top="6" - width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="newlook_btn" - tool_tip="Add new outfit" - width="18" /> - <dnd_button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - tool_tip="Remove selected item" - top="6" - width="18" /> - <button - follows="bottom|left" - height="23" - label="Wear" - layout="topleft" - name="wear_btn" - right="-5" - top_pad="0" - width="90" /> - </panel> - <!-- <button - follows="bottom|left" - height="23" - label="New outfit" - layout="topleft" - left_pad="5" - right="-10" - width="100" />--> + <!-- <button + follows="bottom|left" + height="23" + label="New outfit" + layout="topleft" + left_pad="5" + right="-10" + name="newlook_btn" + width="100" />--> <panel class="panel_look_info" filename="panel_look_info.xml" @@ -158,6 +107,7 @@ left="0" layout="topleft" left="0" name="panel_look_info" + top="35" visible="false" /> <panel class="panel_edit_wearable" @@ -166,5 +116,7 @@ left="0" layout="topleft" left="0" name="panel_edit_wearable" + top="35" visible="false" /> -</panel>
\ No newline at end of file +</panel> + diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index d006fd0700..7b0b4b0bde 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -6,7 +6,7 @@ name="item properties" help_topic="item_properties" save_rect="true" - title="Inventory Item Properties" + title="Object Profile" width="333"> <panel.string name="unknown"> @@ -39,27 +39,39 @@ top="4" width="18" /> <button - follows="top|right" - height="25" - image_overlay="BackArrow_Off" - layout="topleft" - name="back_btn" - picture_style="true" - right="-5" - tab_stop="false" - top="0" - width="25" /> + follows="top|right" + height="23" + image_overlay="BackArrow_Off" + layout="topleft" + left="10" + name="back_btn" + tab_stop="false" + top="0" + width="23" /> + <text + follows="top|left|right" + font="SansSerifHuge" + height="26" + layout="topleft" + left_pad="10" + name="title" + text_color="LtGray" + top="0" + use_ellipses="true" + value="Object Profile" + width="275" /> <panel follows="all" height="500" label="" layout="topleft" - left="5" + left="10" help_topic="" top="30" - border="1" - width="313"> - <text + width="313" + background_visible="true" + bg_alpha_color="DkGray2"> + <text type="string" length="1" follows="left|top" @@ -67,7 +79,7 @@ layout="topleft" left="5" name="LabelItemNameTitle" - top="5" + top="10" width="78"> Name: </text> @@ -75,7 +87,7 @@ border_style="line" border_thickness="1" follows="left|top|right" - height="16" + height="20" layout="topleft" left_delta="78" max_length="63" @@ -90,7 +102,7 @@ layout="topleft" left="5" name="LabelItemDescTitle" - top_delta="20" + top_pad="10" width="78"> Description: </text> @@ -98,88 +110,106 @@ border_style="line" border_thickness="1" follows="left|top|right" - height="16" + height="23" layout="topleft" left_delta="78" max_length="127" name="LabelItemDesc" - top_delta="0" + top_delta="-5" width="225" /> <text type="string" length="1" follows="left|top" - height="16" + height="23" layout="topleft" - left="10" + left="5" name="LabelCreatorTitle" - top="65" +top_pad="10" width="78"> Creator: </text> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> <text type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left_delta="78" + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" name="LabelCreatorName" - top_delta="0" + top_delta="6" width="140"> Nicole Linden </text> <button follows="top|right" - height="16" - label="Profile..." + height="23" + label="Profile" layout="topleft" - left_delta="144" + right="-1" name="BtnCreator" - top_delta="0" + top_delta="-6" width="78" /> <text type="string" length="1" follows="left|top" - height="16" + height="23" layout="topleft" - left="10" + left="5" name="LabelOwnerTitle" - top="85" +top_pad="5" width="78"> Owner: </text> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> <text type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left_delta="78" + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" name="LabelOwnerName" - top_delta="0" + top_delta="6" width="140"> Thrax Linden </text> <button follows="top|right" - height="16" - label="Profile..." + height="23" + label="Profile" layout="topleft" - left_delta="144" + right="-1" name="BtnOwner" - top_delta="0" + top_delta="-3" width="78" /> <text type="string" length="1" follows="left|top" - height="16" + height="23" layout="topleft" - left="10" + left="5" name="LabelAcquiredTitle" - top="105" +top_pad="10" width="78"> Acquired: </text> @@ -187,7 +217,7 @@ type="string" length="1" follows="left|top" - height="16" + height="23" layout="topleft" left_delta="78" name="LabelAcquiredDate" @@ -195,134 +225,146 @@ width="222"> Wed May 24 12:50:46 2006 </text> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - name="OwnerLabel" - top="125" - width="78"> - You: - </text> + <panel + border="false" + follows="left|top" + layout="topleft" + mouse_opaque="false" + background_visible="true" + bg_alpha_color="DkGray" + name="perms_inv" + left="0" + top_pad="25" + height="155" + width="313"> + <text + type="string" + length="1" + left="10" + top_pad="13" + text_color="EmphasisColor" + height="15" + follows="left|top|right" + layout="topleft" + name="perm_modify" + width="200"> + You can: + </text> <check_box - height="16" - label="Edit" + height="18" + label="Modify" layout="topleft" - left_pad="5" + left="20" name="CheckOwnerModify" - top_delta="0" - width="78" /> + top_pad="0" + width="90" /> <check_box - height="16" + height="18" label="Copy" layout="topleft" - left_delta="0" + left_pad="0" name="CheckOwnerCopy" - top_pad="5" - width="88" /> + width="90" /> <check_box - height="16" - label="Resell" + height="18" + label="Transfer" layout="topleft" - left_delta="0" + left_pad="0" name="CheckOwnerTransfer" - top_pad="5" width="106" /> <text type="string" length="1" follows="left|top" - height="10" + height="16" layout="topleft" left="10" name="AnyoneLabel" - top_pad="5" - width="78"> + top_pad="8" + width="100"> Anyone: </text> <check_box - height="16" + height="18" label="Copy" layout="topleft" - left_pad="5" + left_pad="0" name="CheckEveryoneCopy" - top_delta="0" - width="130" /> + top_delta="-2" + width="150" /> <text type="string" length="1" follows="left|top" - height="10" + height="16" layout="topleft" left="10" name="GroupLabel" - top_pad="5" - width="78"> + top_pad="8" + width="100"> Group: </text> <check_box - height="16" + height="18" label="Share" layout="topleft" - left_pad="5" + left_pad="0" + top_delta="-2" name="CheckShareWithGroup" - top_delta="5" - width="106" /> + tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions." + width="150" /> <text type="string" length="1" follows="left|top" - height="25" + height="16" layout="topleft" left="10" name="NextOwnerLabel" - top_pad="5" - width="78" + top_pad="8" + width="200" word_wrap="true"> Next owner: </text> <check_box - height="16" - label="Edit" + height="18" + label="Modify" layout="topleft" - left_pad="5" + left="20" + top_pad="0" name="CheckNextOwnerModify" - top_delta="0" - width="78" /> + width="90" /> <check_box - height="16" + height="18" label="Copy" layout="topleft" - left_delta="0" + left_pad="0" name="CheckNextOwnerCopy" - top_pad="5" - width="88" /> + width="90" /> <check_box - height="16" - label="Resell" + height="18" + label="Transfer" layout="topleft" - left_delta="0" + left_pad="0" name="CheckNextOwnerTransfer" - top_pad="5" + tool_tip="Next owner can give away or resell this object" width="106" /> + </panel> <check_box - height="16" + height="18" label="For Sale" layout="topleft" - left="10" + left="20" name="CheckPurchase" - top_pad="5" - width="78" /> + top_pad="20" + width="100" /> <combo_box - height="19" - left_pad="5" + height="23" + left_pad="0" layout="topleft" follows="left|top" name="combobox sale copy" - width="110"> + width="170"> <combo_box.item label="Copy" name="Copy" @@ -338,26 +380,14 @@ increment="1" control_name="Edit Cost" name="Edit Cost" - label="Price:" - label_width="100" - left="10" - width="192" + label="Price: L$" + label_width="75" + left="120" + width="170" min_val="1" - height="19" + height="23" max_val="999999999" - top_pad="5"/> - <text - type="string" - length="1" - height="15" - follows="left|top" - layout="topleft" - left_delta="82" - name="CurrencySymbol" - top_delta="1" - width="18"> - L$ - </text> + top_pad="10"/> <!--line_editor border_style="line" border_thickness="1" @@ -495,16 +525,7 @@ layout="topleft" name="cancel_btn" right="-1" - top="0" - width="70" /> - <button - follows="bottom|right" - height="25" - label="Save" - layout="topleft" - name="save_btn" - left_pad="-135" - top="0" - width="60" /> + left_pad="10" + width="100" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index eff2ca1fcd..5b379b54e3 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -487,7 +487,7 @@ height="25" label="Open" layout="topleft" - left_pad="5" + left="5" name="open_btn" top="0" width="60" /> @@ -509,23 +509,5 @@ name="buy_btn" top="0" width="60" /> - <button - follows="bottom|right" - height="25" - label="Cancel" - layout="topleft" - name="cancel_btn" - right="-1" - top="0" - width="70" /> - <button - follows="bottom|right" - height="25" - label="Save" - layout="topleft" - name="save_btn" - left_pad="-135" - top="0" - width="60" /> </panel> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3044f10573..7438a36ed0 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -460,7 +460,7 @@ Returns the rotation of detected object number (returns <0,0,0,1> if numbe </string> <string name="LSLTipText_llDetectedGroup" translate="false"> integer llDetectedGroup(integer number) -Returns an integer that is a boolean representing if the detected object or avatar is in the same group that the prim containing the script is set to +Returns TRUE if detected object is part of same group as owner </string> <string name="LSLTipText_llDetectedLinkNumber" translate="false"> integer llDetectedLinkNumber(integer number) @@ -2041,6 +2041,59 @@ this texture in your inventory <string name="RegionInfoAllowedResidents">Allowed residents: ([ALLOWEDAGENTS], max [MAXACCESS])</string> <string name="RegionInfoAllowedGroups">Allowed groups: ([ALLOWEDGROUPS], max [MAXACCESS])</string> + <!-- script limits floater --> + <string name="ScriptLimitsParcelScriptMemory">Parcel Script Memory</string> + <string name="ScriptLimitsParcelsOwned">Parcels Listed: [PARCELS]</string> + <string name="ScriptLimitsMemoryUsed">Memory used: [COUNT] kb out of [MAX] kb; [AVAILABLE] kb available</string> + <string name="ScriptLimitsMemoryUsedSimple">Memory used: [COUNT] kb</string> + <string name="ScriptLimitsParcelScriptURLs">Parcel Script URLs</string> + <string name="ScriptLimitsURLsUsed">URLs used: [COUNT] out of [MAX]; [AVAILABLE] available</string> + <string name="ScriptLimitsURLsUsedSimple">URLs used: [COUNT]</string> + <string name="ScriptLimitsRequestError">Error requesting information</string> + <string name="ScriptLimitsRequestWrongRegion">Error: script information is only available in your current region</string> + <string name="ScriptLimitsRequestWaiting">Retrieving information...</string> + <string name="ScriptLimitsRequestDontOwnParcel">You do not have permission to examine this parcel</string> + + <string name="SITTING_ON">Sitting On</string> + <string name="ATTACH_CHEST">Chest</string> + <string name="ATTACH_HEAD">Head</string> + <string name="ATTACH_LSHOULDER">Left Shoulder</string> + <string name="ATTACH_RSHOULDER">Right Shoulder</string> + <string name="ATTACH_LHAND">Left Hand</string> + <string name="ATTACH_RHAND">Right Hand</string> + <string name="ATTACH_LFOOT">Left Foot</string> + <string name="ATTACH_RFOOT">Right Foot</string> + <string name="ATTACH_BACK">Back</string> + <string name="ATTACH_PELVIS">Pelvis</string> + <string name="ATTACH_MOUTH">Mouth</string> + <string name="ATTACH_CHIN">Chin</string> + <string name="ATTACH_LEAR">Left Ear</string> + <string name="ATTACH_REAR">Right Ear</string> + <string name="ATTACH_LEYE">Left Eye</string> + <string name="ATTACH_REYE">Right Eye</string> + <string name="ATTACH_NOSE">Nose</string> + <string name="ATTACH_RUARM">Right Upper Arm</string> + <string name="ATTACH_RLARM">Right Lower Arm</string> + <string name="ATTACH_LUARM">Left Upper Arm</string> + <string name="ATTACH_LLARM">Left Lower Arm</string> + <string name="ATTACH_RHIP">Right Hip</string> + <string name="ATTACH_RULEG">Right Upper Leg</string> + <string name="ATTACH_RLLEG">Right Lower Leg</string> + <string name="ATTACH_LHIP">Left Hip</string> + <string name="ATTACH_LULEG">Left Upper Leg</string> + <string name="ATTACH_LLLEG">Left Lower Leg</string> + <string name="ATTACH_BELLY">Belly</string> + <string name="ATTACH_RPEC">Right Pec</string> + <string name="ATTACH_LPEC">Left Pec</string> + <string name="ATTACH_HUD_CENTER_2"><HUD Center 2/string> + <string name="ATTACH_HUD_TOP_RIGHT">HUD Top Right</string> + <string name="ATTACH_HUD_TOP_CENTER">HUD Top Center</string> + <string name="ATTACH_HUD_TOP_LEFT">HUD Top Left</string> + <string name="ATTACH_HUD_CENTER_1">HUD Center 1</string> + <string name="ATTACH_HUD_BOTTOM_LEFT">HUD Bottom Left</string> + <string name="ATTACH_HUD_BOTTOM">HUD Bottom</string> + <string name="ATTACH_HUD_BOTTOM_RIGHT">HUD Bottom Right</string> + <!-- script editor --> <string name="CursorPos">Line [LINE], Column [COLUMN]</string> @@ -2074,6 +2127,10 @@ this texture in your inventory <!-- panel classified --> <string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string> <string name="ClassifiedUpdateAfterPublish">(will update after publish)</string> + + <!-- panel picks --> + <string name="NoPicksClassifiedsText">There are no picks/classifieds here</string> + <string name="PicksClassifiedsLoadingText">Loading...</string> <!-- Multi Preview Floater --> <string name="MultiPreviewTitle">Preview</string> @@ -2112,6 +2169,10 @@ this texture in your inventory Unknown file extension .%s Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh </string> + <string name="MuteObject">Block</string> + <string name="MuteAvatar">Block</string> + <string name="UnmuteObject">Unblock</string> + <string name="UnmuteAvatar">Unblock</string> <string name="AddLandmarkNavBarMenu">Add to My Landmarks...</string> <string name="EditLandmarkNavBarMenu">Edit my Landmark...</string> @@ -2838,6 +2899,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_to_label">To</string> <string name="IM_moderator_label">(Moderator)</string> + <!-- voice calls --> + <string name="started_call">Started a voice call</string> + <string name="joined_call">Joined the voice call</string> + <string name="ringing-im"> Joining Voice Chat... </string> @@ -2873,6 +2938,14 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="muted_message"> You have blocked this resident. Sending a message will automatically unblock them. </string> + <!--Some times string name is getting from the body of server response. + For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. + In case of the EXT-3115 issue 'generic' is passed into the gIMMgr::showSessionStartError as a string name. + Also there are some other places where "generic" is used. + So, let add string with name="generic" with the same value as "generic_request_error" --> + <string name="generic"> + Error making request, please try again later. + </string> <string name="generic_request_error"> Error making request, please try again later. </string> @@ -2900,6 +2973,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="message_session_event"> Unable to send your message to the chat session with [RECIPIENT]. </string> + <string name="mute"> + Error while moderating. + </string> <string name="removed_from_group"> You have been removed from the group. </string> diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml index 9990324d03..102dc0c16d 100644 --- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml @@ -8,7 +8,7 @@ header_image="Accordion_Off" header_image_over="Accordion_Over" header_image_pressed="Accordion_Press" - header_image_expanded="Accordion_Selected" + header_image_focused="Accordion_Selected" header_text_color="LtGray" font="SansSerif" /> diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index 28ed560543..51f85e65e2 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -18,5 +18,6 @@ font="SansSerifSmall" hover_glow_amount="0.15" halign="center" + pad_bottom="3" scale_image="true"> </button> diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml index 178c890c61..bda88857ae 100644 --- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml +++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <color_swatch alpha_background_image="color_swatch_alpha.tga" - border_color="DefaultHighlightLight" + border_color="ColorSwatchBorderColor" name="color_swatch"> <color_swatch.caption_text name="caption" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml index 19fb520b44..85d0c633af 100644 --- a/indra/newview/skins/default/xui/en/widgets/floater.xml +++ b/indra/newview/skins/default/xui/en/widgets/floater.xml @@ -9,8 +9,6 @@ background_visible="true" background_opaque="false" header_height="25" - top="0" - left="0" close_image="Icon_Close_Foreground" restore_image="Icon_Restore_Foreground" minimize_image="Icon_Minimize_Foreground" diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 477c6fb8b8..3368fa88ef 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -1,9 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- +label_pad_bottom - vertical padding under tab button labels +label_pad_left - padding to the left of tab button labels +--> <tab_container tab_min_width="60" tab_max_width="150" - font_halign="center" + halign="center" font="SansSerifSmall" - tab_height="21"> + tab_height="21" + label_pad_bottom="2" + label_pad_left="4"> <first_tab tab_top_image_unselected="TabTop_Left_Off" tab_top_image_selected="TabTop_Left_Selected" tab_bottom_image_unselected="Toolbar_Left_Off" @@ -22,4 +28,4 @@ tab_bottom_image_selected="Toolbar_Right_Selected" tab_left_image_unselected="TabTop_Middle_Off" tab_left_image_selected="TabTop_Middle_Selected"/> -</tab_container>
\ No newline at end of file +</tab_container> diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml index 6c559aa185..4f574d75d5 100644 --- a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml @@ -3,6 +3,6 @@ Based on menu_item_call.xml --> <teleport_history_menu_item back_item_font="SansSerif" - current_item_font="SansSerif" + current_item_font="SansSerifBold" forward_item_font="SansSerif" /> diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml index 5dd09e663b..855584a0db 100644 --- a/indra/newview/skins/default/xui/en/widgets/text.xml +++ b/indra/newview/skins/default/xui/en/widgets/text.xml @@ -11,7 +11,6 @@ allow_scroll="false" text_readonly_color="LabelDisabledColor" bg_writeable_color="FloaterDefaultBackgroundColor" - border_color="DefaultHighlightLight" use_ellipses="false" bg_visible="false" border_visible="false" diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp index 4759c7dc91..ca7d02fc68 100644 --- a/indra/newview/tests/llcapabilitylistener_test.cpp +++ b/indra/newview/tests/llcapabilitylistener_test.cpp @@ -50,6 +50,7 @@ #include "tests/networkio.h" #include "tests/commtest.h" #include "tests/wrapllerrs.h" +#include "message.h" #include "stringize.h" #if defined(LL_WINDOWS) diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 68743357a6..ec612c4606 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -36,54 +36,59 @@ #include "../test/lltut.h" #include "../llviewerhelputil.h" -#include "../llversioninfo.h" +#include "../llweb.h" #include "llcontrol.h" -#include "llsys.h" #include <iostream> -//---------------------------------------------------------------------------- -// Implementation of enough of LLControlGroup to support the tests: +// values for all of the supported substitutions parameters +static std::string gHelpURL; +static std::string gVersion; +static std::string gChannel; +static std::string gLanguage; +static std::string gGrid; +static std::string gOS; -static std::map<std::string,std::string> test_stringvec; +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing LLControlGroup::LLControlGroup(const std::string& name) - : LLInstanceTracker<LLControlGroup, std::string>(name) -{ -} - -LLControlGroup::~LLControlGroup() -{ -} - -// Implementation of just the LLControlGroup methods we requre + : LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} BOOL LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, - BOOL persist) -{ - test_stringvec[name] = initial_val; - return true; -} - -void LLControlGroup::setString(const std::string& name, const std::string& val) + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) { - test_stringvec[name] = val; + if (name == "HelpURLFormat") + return gHelpURL; + return ""; } +LLControlGroup gSavedSettings("test"); -std::string LLControlGroup::getString(const std::string& name) +static void substitute_string(std::string &input, const std::string &search, const std::string &replace) { - return test_stringvec[name]; + size_t pos = input.find(search); + while (pos != std::string::npos) + { + input = input.replace(pos, search.size(), replace); + pos = input.find(search); + } } -S32 LLVersionInfo::getMajor() { return 2; } -S32 LLVersionInfo::getMinor() { return 0; } -S32 LLVersionInfo::getPatch() { return 0; } -S32 LLVersionInfo::getBuild() { return 200099; } -const std::string &LLVersionInfo::getVersion() +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) { - static std::string version = "2.0.0.200099"; - return version; + std::string new_url = url; + substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString()); + substitute_string(new_url, "[VERSION]", gVersion); + substitute_string(new_url, "[CHANNEL]", gChannel); + substitute_string(new_url, "[LANGUAGE]", gLanguage); + substitute_string(new_url, "[GRID]", gGrid); + substitute_string(new_url, "[OS]", gOS); + return new_url; } //---------------------------------------------------------------------------- @@ -101,41 +106,52 @@ namespace tut template<> template<> void viewerhelputil_object_t::test<1>() { - LLOSInfo osinfo; - LLControlGroup cgr("test"); - cgr.declareString("HelpURLFormat", "fooformat", "declared_for_test", FALSE); - cgr.declareString("VersionChannelName", "foochannelname", "declared_for_test", FALSE); - cgr.declareString("Language", "foolanguage", "declared_for_test", FALSE); std::string topic("test_topic"); - std::string subresult; - cgr.setString("HelpURLFormat", "fooformat"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "fooformat"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("no substitution tags", subresult, "fooformat"); - cgr.setString("HelpURLFormat", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("blank substitution format", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[TOPIC]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("topic name", subresult, "test_topic"); + + gHelpURL = "[LANGUAGE]"; + gLanguage = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution with blank", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution", subresult, "Esperanto"); - cgr.setString("HelpURLFormat", "[XXX]"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "http://secondlife.com/[LANGUAGE]"; + gLanguage = "Gaelic"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("simple substitution with url", subresult, "http://secondlife.com/Gaelic"); + + gHelpURL = "[XXX]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("unknown substitution", subresult, "[XXX]"); - cgr.setString("HelpURLFormat", "[LANGUAGE]/[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]/[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("multiple substitution", subresult, "Esperanto/Esperanto"); + + gHelpURL = "http://[CHANNEL]/[VERSION]/[LANGUAGE]/[OS]/[GRID]/[XXX]"; + gChannel = "Second Life Test"; + gVersion = "2.0"; + gLanguage = "gaelic"; + gOS = "AmigaOS 2.1"; + gGrid = "mysim"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("complex substitution", subresult, "http://Second Life Test/2.0/gaelic/AmigaOS 2.1/mysim/[XXX]"); } - } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 32fdd41be2..d2859db296 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -40,67 +40,73 @@ sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util')) from llmanifest import LLManifest, main, proper_windows_path, path_ancestors class ViewerManifest(LLManifest): + def is_packaging_viewer(self): + # This is overridden by the WindowsManifest sub-class, + # which has different behavior if it is not packaging the viewer. + return True + def construct(self): super(ViewerManifest, self).construct() self.exclude("*.svn*") self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../etc/message.xml", dst="app_settings/message.xml") - if self.prefix(src="app_settings"): - self.exclude("logcontrol.xml") - self.exclude("logcontrol-dev.xml") - self.path("*.pem") - self.path("*.ini") - self.path("*.xml") - self.path("*.db2") - - # include the entire shaders directory recursively - self.path("shaders") - # ... and the entire windlight directory - self.path("windlight") - self.end_prefix("app_settings") - - if self.prefix(src="character"): - self.path("*.llm") - self.path("*.xml") - self.path("*.tga") - self.end_prefix("character") - - # Include our fonts - if self.prefix(src="fonts"): - self.path("*.ttf") - self.path("*.txt") - self.end_prefix("fonts") - - # skins - if self.prefix(src="skins"): - self.path("paths.xml") - # include the entire textures directory recursively - if self.prefix(src="*/textures"): - self.path("*/*.tga") - self.path("*/*.j2c") - self.path("*/*.jpg") - self.path("*/*.png") - self.path("*.tga") - self.path("*.j2c") - self.path("*.jpg") - self.path("*.png") - self.path("textures.xml") - self.end_prefix("*/textures") - self.path("*/xui/*/*.xml") - self.path("*/xui/*/widgets/*.xml") - self.path("*/*.xml") - - # Local HTML files (e.g. loading screen) - if self.prefix(src="*/html"): - self.path("*.png") - self.path("*/*/*.html") - self.path("*/*/*.gif") - self.end_prefix("*/html") - self.end_prefix("skins") - - # Files in the newview/ directory - self.path("gpu_table.txt") + if self.is_packaging_viewer(): + if self.prefix(src="app_settings"): + self.exclude("logcontrol.xml") + self.exclude("logcontrol-dev.xml") + self.path("*.pem") + self.path("*.ini") + self.path("*.xml") + self.path("*.db2") + + # include the entire shaders directory recursively + self.path("shaders") + # ... and the entire windlight directory + self.path("windlight") + self.end_prefix("app_settings") + + if self.prefix(src="character"): + self.path("*.llm") + self.path("*.xml") + self.path("*.tga") + self.end_prefix("character") + + # Include our fonts + if self.prefix(src="fonts"): + self.path("*.ttf") + self.path("*.txt") + self.end_prefix("fonts") + + # skins + if self.prefix(src="skins"): + self.path("paths.xml") + # include the entire textures directory recursively + if self.prefix(src="*/textures"): + self.path("*/*.tga") + self.path("*/*.j2c") + self.path("*/*.jpg") + self.path("*/*.png") + self.path("*.tga") + self.path("*.j2c") + self.path("*.jpg") + self.path("*.png") + self.path("textures.xml") + self.end_prefix("*/textures") + self.path("*/xui/*/*.xml") + self.path("*/xui/*/widgets/*.xml") + self.path("*/*.xml") + + # Local HTML files (e.g. loading screen) + if self.prefix(src="*/html"): + self.path("*.png") + self.path("*/*/*.html") + self.path("*/*/*.gif") + self.end_prefix("*/html") + self.end_prefix("skins") + + # Files in the newview/ directory + self.path("gpu_table.txt") def login_channel(self): """Channel reported for login and upgrade purposes ONLY; @@ -163,6 +169,12 @@ class WindowsManifest(ViewerManifest): else: return ''.join(self.channel().split()) + '.exe' + def is_packaging_viewer(self): + # Some commands, files will only be included + # if we are packaging the viewer on windows. + # This manifest is also used to copy + # files during the build. + return 'package' in self.args['actions'] def test_msvcrt_and_copy_action(self, src, dst): # This is used to test a dll manifest. @@ -211,22 +223,25 @@ class WindowsManifest(ViewerManifest): print "Doesn't exist:", src def enable_crt_manifest_check(self): - WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action + if self.is_packaging_viewer(): + WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action def enable_no_crt_manifest_check(self): - WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action + if self.is_packaging_viewer(): + WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action def disable_manifest_check(self): - del WindowsManifest.copy_action + if self.is_packaging_viewer(): + del WindowsManifest.copy_action def construct(self): super(WindowsManifest, self).construct() self.enable_crt_manifest_check() - # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. - self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - + if self.is_packaging_viewer(): + # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. + self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) # Plugin host application self.path(os.path.join(os.pardir, @@ -316,26 +331,53 @@ class WindowsManifest(ViewerManifest): if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_webkit.dll") self.end_prefix() - - if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"): - self.path("libeay32.dll") - self.path("qtcore4.dll") - self.path("qtgui4.dll") - self.path("qtnetwork4.dll") - self.path("qtopengl4.dll") - self.path("qtwebkit4.dll") - self.path("ssleay32.dll") - self.end_prefix() - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"): - self.path("qgif4.dll") - self.path("qico4.dll") - self.path("qjpeg4.dll") - self.path("qmng4.dll") - self.path("qsvg4.dll") - self.path("qtiff4.dll") - self.end_prefix() + if self.args['configuration'].lower() == 'debug': + if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'), + dst="llplugin"): + self.path("libeay32.dll") + self.path("qtcored4.dll") + self.path("qtguid4.dll") + self.path("qtnetworkd4.dll") + self.path("qtopengld4.dll") + self.path("qtwebkitd4.dll") + self.path("qtxmlpatternsd4.dll") + self.path("ssleay32.dll") + + # For WebKit/Qt plugin runtimes (image format plugins) + if self.prefix(src="imageformats", dst="imageformats"): + self.path("qgifd4.dll") + self.path("qicod4.dll") + self.path("qjpegd4.dll") + self.path("qmngd4.dll") + self.path("qsvgd4.dll") + self.path("qtiffd4.dll") + self.end_prefix() + + self.end_prefix() + else: + if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'release'), + dst="llplugin"): + self.path("libeay32.dll") + self.path("qtcore4.dll") + self.path("qtgui4.dll") + self.path("qtnetwork4.dll") + self.path("qtopengl4.dll") + self.path("qtwebkit4.dll") + self.path("qtxmlpatterns4.dll") + self.path("ssleay32.dll") + + # For WebKit/Qt plugin runtimes (image format plugins) + if self.prefix(src="imageformats", dst="imageformats"): + self.path("qgif4.dll") + self.path("qico4.dll") + self.path("qjpeg4.dll") + self.path("qmng4.dll") + self.path("qsvg4.dll") + self.path("qtiff4.dll") + self.end_prefix() + + self.end_prefix() self.disable_manifest_check() @@ -346,6 +388,9 @@ class WindowsManifest(ViewerManifest): self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'], dst="updater.exe") + if not self.is_packaging_viewer(): + self.package_file = "copied_deps" + def nsi_file_commands(self, install=True): def wpath(path): if path.endswith('/') or path.endswith(os.path.sep): @@ -822,6 +867,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") + self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname try: self.path("libkdu_v42R.so", "libkdu.so") pass @@ -843,7 +889,7 @@ class Linux_i686Manifest(LinuxManifest): if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): self.path("libortp.so") self.path("libsndfile.so.1") - self.path("libvivoxoal.so.1") + #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OAL lib self.path("libvivoxsdk.so") self.path("libvivoxplatform.so") self.end_prefix("lib") |