diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-14 15:02:21 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-14 15:02:21 -0400 |
commit | 6eeb8f8e97ae79f029f182235aee74324b85d967 (patch) | |
tree | 9a4370c93d43ca912dd6774e72ede579397e06b5 /indra/newview | |
parent | 9e5fe84c9e6f6027878d70350c8f60e4c2be7e48 (diff) | |
parent | 09a1cb549d2128e5057d432a283f50679258e916 (diff) |
merge
Diffstat (limited to 'indra/newview')
753 files changed, 29823 insertions, 16228 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index efb16d1e42..f2bed843c9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -7,6 +7,7 @@ include(Boost) include(BuildVersion) include(DBusGlib) include(DirectX) +include(OpenSSL) include(DragDrop) include(ELFIO) include(FMOD) @@ -104,6 +105,7 @@ set(viewer_SOURCE_FILES llclassifiedinfo.cpp llclassifiedstatsresponder.cpp llcloud.cpp + llcofwearables.cpp llcolorswatch.cpp llcommanddispatcherlistener.cpp llcommandhandler.cpp @@ -142,6 +144,7 @@ set(viewer_SOURCE_FILES llfavoritesbar.cpp llfeaturemanager.cpp llfilepicker.cpp + llfilteredwearablelist.cpp llfirstuse.cpp llflexibleobject.cpp llfloaterabout.cpp @@ -252,6 +255,8 @@ set(viewer_SOURCE_FILES llinventoryclipboard.cpp llinventoryfilter.cpp llinventoryfunctions.cpp + llinventoryicon.cpp + llinventoryitemslist.cpp llinventorymodel.cpp llinventorymodelbackgroundfetch.cpp llinventoryobserver.cpp @@ -294,7 +299,9 @@ set(viewer_SOURCE_FILES llnotificationmanager.cpp llnotificationofferhandler.cpp llnotificationscripthandler.cpp + llnotificationstorage.cpp llnotificationtiphandler.cpp + lloutfitslist.cpp lloutputmonitorctrl.cpp llpanelavatar.cpp llpanelavatartag.cpp @@ -327,6 +334,7 @@ set(viewer_SOURCE_FILES llpanelnearbymedia.cpp llpanelobject.cpp llpanelobjectinventory.cpp + llpanelonlinestatus.cpp llpaneloutfitedit.cpp llpaneloutfitsinventory.cpp llpanelpeople.cpp @@ -372,6 +380,8 @@ set(viewer_SOURCE_FILES llscrollingpanelparam.cpp llsearchcombobox.cpp llsearchhistory.cpp + llsecapi.cpp + llsechandler_basic.cpp llselectmgr.cpp llsidepanelappearance.cpp llsidepanelinventory.cpp @@ -446,7 +456,6 @@ set(viewer_SOURCE_FILES llurldispatcherlistener.cpp llurlhistory.cpp llurllineeditorctrl.cpp - llurlsimstring.cpp llurlwhitelist.cpp llvectorperfoptions.cpp llversioninfo.cpp @@ -514,6 +523,7 @@ set(viewer_SOURCE_FILES llvoicechannel.cpp llvoiceclient.cpp llvoicevisualizer.cpp + llvoicevivox.cpp llvoinventorylistener.cpp llvopartgroup.cpp llvosky.cpp @@ -527,8 +537,9 @@ set(viewer_SOURCE_FILES llwaterparammanager.cpp llwaterparamset.cpp llwearable.cpp - llwearabledictionary.cpp + llwearableitemslist.cpp llwearablelist.cpp + llwearabletype.cpp llweb.cpp llwind.cpp llwlanimator.cpp @@ -540,6 +551,7 @@ set(viewer_SOURCE_FILES llworldmapmessage.cpp llworldmipmap.cpp llworldmapview.cpp + llworldview.cpp llxmlrpclistener.cpp llxmlrpctransaction.cpp noise.cpp @@ -608,6 +620,7 @@ set(viewer_HEADER_FILES llclassifiedinfo.h llclassifiedstatsresponder.h llcloud.h + llcofwearables.h llcolorswatch.h llcommanddispatcherlistener.h llcommandhandler.h @@ -647,6 +660,7 @@ set(viewer_HEADER_FILES llfavoritesbar.h llfeaturemanager.h llfilepicker.h + llfilteredwearablelist.h llfirstuse.h llflexibleobject.h llfloaterabout.h @@ -756,6 +770,8 @@ set(viewer_HEADER_FILES llinventoryclipboard.h llinventoryfilter.h llinventoryfunctions.h + llinventoryicon.h + llinventoryitemslist.h llinventorymodel.h llinventorymodelbackgroundfetch.h llinventoryobserver.h @@ -795,6 +811,8 @@ set(viewer_HEADER_FILES llnetmap.h llnotificationhandler.h llnotificationmanager.h + llnotificationstorage.h + lloutfitslist.h lloutputmonitorctrl.h llpanelavatar.h llpanelavatartag.h @@ -827,6 +845,7 @@ set(viewer_HEADER_FILES llpanelnearbymedia.h llpanelobject.h llpanelobjectinventory.h + llpanelonlinestatus.h llpaneloutfitedit.h llpaneloutfitsinventory.h llpanelpeople.h @@ -874,6 +893,8 @@ set(viewer_HEADER_FILES llscrollingpanelparam.h llsearchcombobox.h llsearchhistory.h + llsecapi.h + llsechandler_basic.h llselectmgr.h llsidepanelappearance.h llsidepanelinventory.h @@ -950,7 +971,6 @@ set(viewer_HEADER_FILES llurldispatcherlistener.h llurlhistory.h llurllineeditorctrl.h - llurlsimstring.h llurlwhitelist.h llvectorperfoptions.h llversioninfo.h @@ -1015,6 +1035,7 @@ set(viewer_HEADER_FILES llvoicechannel.h llvoiceclient.h llvoicevisualizer.h + llvoicevivox.h llvoinventorylistener.h llvopartgroup.h llvosky.h @@ -1029,8 +1050,9 @@ set(viewer_HEADER_FILES llwaterparammanager.h llwaterparamset.h llwearable.h - llwearabledictionary.h + llwearableitemslist.h llwearablelist.h + llwearabletype.h llweb.h llwind.h llwindebug.h @@ -1043,6 +1065,7 @@ set(viewer_HEADER_FILES llworldmapmessage.h llworldmipmap.h llworldmapview.h + llworldview.h llxmlrpclistener.h llxmlrpctransaction.h macmain.h @@ -1390,7 +1413,7 @@ if (WINDOWS) # 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 + # *NOTE:Mani - This is a crappy hack to have important dependencies 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. @@ -1408,10 +1431,10 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll ) - endif(USE_GOOGLE_PERFTOOLS) - + endif(USE_GOOGLE_PERFTOOLS) + - set(COPY_INPUT_DEPENDECIES + set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll ${CMAKE_SOURCE_DIR}/../etc/message.xml @@ -1445,8 +1468,6 @@ if (WINDOWS) ${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 @@ -1486,6 +1507,7 @@ if (WINDOWS) SLPlugin media_plugin_quicktime media_plugin_webkit + winmm_shim windows-crash-logger windows-updater ) @@ -1507,7 +1529,7 @@ if (WINDOWS) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs - ${COPY_INPUT_DEPENDECIES} + ${COPY_INPUT_DEPENDENCIES} COMMENT "Performing viewer_manifest copy" ) @@ -1526,8 +1548,6 @@ if (WINDOWS) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin - media_plugin_quicktime - media_plugin_webkit windows-updater windows-crash-logger ) @@ -1577,7 +1597,10 @@ if (WINDOWS) --login_channel=${VIEWER_LOGIN_CHANNEL} --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat - DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + DEPENDS + ${VIEWER_BINARY_NAME} + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + ${COPY_INPUT_DEPENDENCIES} ) add_custom_target(package ALL DEPENDS @@ -1626,6 +1649,8 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${WINDOWS_LIBRARIES} ${XMLRPCEPI_LIBRARIES} ${ELFIO_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} ${LLLOGIN_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) @@ -1802,6 +1827,43 @@ if (LL_TESTS) "${CMAKE_SOURCE_DIR}/llmessage/tests/test_llsdmessage_peer.py" ) + set(test_libs + ${LLMESSAGE_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${CRYPTO_LIBRARIES} + ) + + LL_ADD_INTEGRATION_TEST(llsechandler_basic + llsechandler_basic.cpp + "${test_libs}" + ) + + LL_ADD_INTEGRATION_TEST(llsecapi + llsecapi.cpp + "${test_libs}" + ) + + set(llslurl_test_sources + llslurl.cpp + llviewernetwork.cpp + ) + + + LL_ADD_INTEGRATION_TEST(llslurl + "${llslurl_test_sources}" + "${test_libs}" + ) + + LL_ADD_INTEGRATION_TEST(llviewernetwork + llviewernetwork.cpp + "${test_libs}" + ) + #ADD_VIEWER_BUILD_TEST(llmemoryview viewer) #ADD_VIEWER_BUILD_TEST(llagentaccess viewer) #ADD_VIEWER_BUILD_TEST(llworldmap viewer) @@ -1809,6 +1871,7 @@ if (LL_TESTS) #ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) #ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) #ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) + endif (LL_TESTS) diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 02c3dfc6e0..4831dc7273 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -2,6 +2,6 @@ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 2.0.0.203110"; -CFBundleGetInfoString = "Second Life version 2.0.0.203110, Copyright 2004-2009 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 2.0.2.0"; +CFBundleGetInfoString = "Second Life version 2.0.2.0, Copyright 2004-2009 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 4cb01a0f33..fa2adac10c 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -18,6 +18,33 @@ <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>slurl</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>seconlife</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/x-grid-location-info</string> + </array> + <key>CFBundleTypeName</key> + <string>Secondlife SLURL</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>SLRL</string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> + <true/> + <key>NSDocumentClass</key> + <string>SecondLifeSLURL</string> + </dict> + </array> <key>CFBundleURLTypes</key> <array> <dict> @@ -26,13 +53,14 @@ <key>CFBundleURLSchemes</key> <array> <string>secondlife</string> + <string>x-grid-location-info</string> </array> <key>LSIsAppleDefaultForScheme</key> <true/> </dict> </array> <key>CFBundleVersion</key> - <string>2.0.0.203110</string> + <string>2.0.2.0</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 0805e94b10..263b73ba23 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -497,6 +497,7 @@ PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description. PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id. PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id. PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters. +PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id. STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string. STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string. diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fa9dc2d3c1..d65a1ca583 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1265,6 +1265,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>CertStore</key> + <map> + <key>Comment</key> + <string>Specifies the Certificate Store for certificate trust verification</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>default</string> + </map> <key>ChatBarStealsFocus</key> <map> <key>Comment</key> @@ -1641,6 +1652,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>CurrentGrid</key> + <map> + <key>Comment</key> + <string>Currently Selected Grid</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>CustomServer</key> <map> <key>Comment</key> @@ -1652,6 +1674,17 @@ <key>Value</key> <string /> </map> + <key>DebugAvatarRezTime</key> + <map> + <key>Comment</key> + <string>Display times for avatars to resolve.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DebugBeaconLineWidth</key> <map> <key>Comment</key> @@ -2367,6 +2400,29 @@ <key>Value</key> <integer>0</integer> </map> + <key>DefaultFemaleAvatar</key> + <map> + <key>Comment</key> + <string>Default Female Avatar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>Female Shape & Outfit</string> + </map> + <key>DefaultMaleAvatar</key> + <map> + <key>Comment</key> + <string>Default Male Avatar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>Male Shape & Outfit</string> + </map> + <key>DefaultObjectTexture</key> <map> <key>Comment</key> @@ -3467,6 +3523,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>FullScreen</key> + <map> + <key>Comment</key> + <string>Run SL in fullscreen mode</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>FullScreenAspectRatio</key> <map> <key>Comment</key> @@ -3797,6 +3864,17 @@ <key>Value</key> <real>1.0</real> </map> + <key>InventoryLinking</key> + <map> + <key>Comment</key> + <string>Enable ability to create links to folders and items via "Paste as link".</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>InventorySortOrder</key> <map> <key>Comment</key> @@ -4425,6 +4503,17 @@ <key>Value</key> <real>128.0</real> </map> + <key>MapServerURL</key> + <map> + <key>Comment</key> + <string>World map URL template for locating map tiles</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://map.secondlife.com.s3.amazonaws.com/</string> + </map> <key>MapShowEvents</key> <map> <key>Comment</key> @@ -5585,6 +5674,19 @@ <key>Value</key> <integer>8</integer> </map> + + <key>PluginUseReadThread</key> + <map> + <key>Comment</key> + <string>Use a separate thread to read incoming messages from plugins</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>PrecachingDelay</key> <map> <key>Comment</key> @@ -5838,7 +5940,40 @@ <key>Value</key> <real>1.0</real> </map> - <key>RecentItemsSortOrder</key> + <key>MediaRollOffRate</key> + <map> + <key>Comment</key> + <string>Multiplier to change rate of media attenuation</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.2</real> + </map> + <key>MediaRollOffMin</key> + <map> + <key>Comment</key> + <string>Adjusts the distance at which media attentuation starts</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>7.0</real> + </map> + <key>MediaRollOffMax</key> + <map> + <key>Comment</key> + <string>Distance at which media volume is set to 0</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>30.0</real> + </map> + <key>RecentItemsSortOrder</key> <map> <key>Comment</key> <string>Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string> @@ -7708,6 +7843,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>SecondLifeEnterprise</key> + <map> + <key>Comment</key> + <string>Enables Second Life Enterprise features</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>SelectMovableOnly</key> <map> <key>Comment</key> @@ -7917,32 +8063,32 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowCrosshairs</key> + <key>ShowBetaGrids</key> <map> <key>Comment</key> - <string>Display crosshairs when in mouselook mode</string> + <string>Display the beta grids in the grid selection control.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> <integer>1</integer> - </map> - <key>ShowDebugConsole</key> + </map> + <key>ShowCrosshairs</key> <map> <key>Comment</key> - <string>Show log in SL window</string> + <string>Display crosshairs when in mouselook mode</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> - <key>ShowDebugAppearanceEditor</key> + <key>ShowDebugConsole</key> <map> <key>Comment</key> - <string>Show debugging appearance editor</string> + <string>Show log in SL window</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -8082,6 +8228,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>SidebarCameraMovement</key> + <map> + <key>Comment</key> + <string>Reflects world rect changing while changing sidebar visibility.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>GroupListShowIcons</key> <map> <key>Comment</key> @@ -10404,6 +10561,17 @@ <key>Value</key> <string></string> </map> + <key>VivoxDebugSIPURIHostName</key> + <map> + <key>Comment</key> + <string>Hostname portion of vivox SIP URIs (empty string for the default).</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>VivoxDebugVoiceAccountServerURI</key> <map> <key>Comment</key> @@ -10415,6 +10583,28 @@ <key>Value</key> <string></string> </map> + <key>VivoxVoiceHost</key> + <map> + <key>Comment</key> + <string>Client SLVoice host to connect to</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>127.0.0.1</string> + </map> + <key>VivoxVoicePort</key> + <map> + <key>Comment</key> + <string>Client SLVoice port to connect to</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>44125</integer> + </map> <key>VoiceCallsFriendsOnly</key> <map> <key>Comment</key> @@ -10547,6 +10737,17 @@ <key>Value</key> <string>Default</string> </map> + <key>VoiceLogFile</key> + <map> + <key>Comment</key> + <string>Log file to use when launching the voice daemon</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>VoiceOutputAudioDevice</key> <map> <key>Comment</key> @@ -10591,6 +10792,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>VoiceServerType</key> + <map> + <key>Comment</key> + <string>The type of voice server to connect to.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>vivox</string> + </map> <key>WLSkyDetail</key> <map> <key>Comment</key> @@ -10611,7 +10823,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>WaterEditPresets</key> <map> @@ -10690,17 +10902,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>WindowFullScreen</key> - <map> - <key>Comment</key> - <string>Run SL in fullscreen mode</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>WindowHeight</key> <map> <key>Comment</key> @@ -10993,7 +11194,38 @@ <key>Value</key> <integer>0</integer> </map> - + <key>max_texture_dimension_X</key> + <map> + <key>Comment</key> + <string>Maximum texture width for user uploaded textures</string> + <key>Persist</key> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2048</integer> + </map> + <key>max_texture_dimension_Y</key> + <map> + <key>Comment</key> + <string>Maximum texture height for user uploaded textures</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2048</integer> + </map> <!-- End of back compatibility settings --> + <key>teleport_offer_invitation_max_length</key> + <map> + <key>Comment</key> + <string>Maximum length of teleport offer invitation line editor. 254 - max_location_url_length(76) = 178</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>178</integer> + </map> </map> </llsd> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 4029bf95a0..5f31ccbb19 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -296,28 +296,23 @@ RenderUseImpostors 0 0 list Intel_945GM RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_945G RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_950 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_965 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 UseOcclusion 0 0 -RenderUseImpostors 0 0 list Intel_G33 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 -RenderUseImpostors 0 0 list Intel_G45 WindLightUseAtmosShaders 0 0 diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index aa0e21ea8f..3754f30a66 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -70,43 +70,42 @@ ATI M56 .*ATI.*M56.* 1 1 ATI M71 .*ATI.*M71.* 1 1 ATI M72 .*ATI.*M72.* 1 1 ATI M76 .*ATI.*M76.* 3 1 -ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1 -ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1 -ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 0 1 -ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 0 1 -ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1 -ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD.*23.* 1 1 -ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD.*24.* 1 1 -ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD.*26.* 3 1 -ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD.*34.* 1 1 -ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD.*36.* 3 1 -ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD.*38.* 3 1 -ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 0 1 -ATI Mobility Radeon X2xxx .*ATI.*Mobility.*X2.* 0 1 -ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 1 -ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1 1 -ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 1 -ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 0 1 -ATI Mobility Radeon .*ATI.*Mobility.* 0 1 -ATI Radeon HD 2300 .*ATI.*Radeon HD 23.* 0 1 -ATI Radeon HD 2400 .*ATI.*Radeon HD.*24.* 1 1 -ATI Radeon HD 2600 .*ATI.*Radeon HD 26.* 2 1 -ATI Radeon HD 2900 .*ATI.*Radeon HD 29.* 3 1 -ATI Radeon HD 3200 .*ATI.*Radeon.*HD.*32.* 1 1 -ATI Radeon HD 3300 .*ATI.*Radeon HD.*33.* 1 1 -ATI Radeon HD 3400 .*ATI.*Radeon HD.*34.* 1 1 -ATI Radeon HD 3600 .*ATI.*Radeon HD.*36.* 3 1 -ATI Radeon HD 3800 .*ATI.*Radeon HD.*38.* 3 1 -ATI Radeon HD 4200 .*ATI.*Radeon HD 42.* 1 1 -ATI Radeon HD 4300 .*ATI.*Radeon HD 43.* 1 1 -ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 3 1 -ATI Radeon HD 4600 .*ATI.*Radeon HD.*46.* 3 1 -ATI Radeon HD 4700 .*ATI.*Radeon HD 47.* 3 1 -ATI Radeon HD 4800 .*ATI.*Radeon.*HD.*48.* 3 1 -ATI Radeon HD 5600 .*ATI.*Radeon.*HD.*56.* 3 1 -ATI Radeon HD 5700 .*ATI.*Radeon.*HD.*57.* 3 1 -ATI Radeon HD 5800 .*ATI.*Radeon.*HD.*58.* 3 1 -ATI Radeon HD 5900 .*ATI.*Radeon.*HD.*59.* 3 1 +ATI Mobility Radeon 7xxx .*ATI.*Mobility *Radeon 7.* 0 1 +ATI Mobility Radeon 8xxx .*ATI.*Mobility *Radeon 8.* 0 1 +ATI Mobility Radeon 9800 .*ATI.*Mobility *98.* 0 1 +ATI Mobility Radeon 9700 .*ATI.*Mobility *97.* 0 1 +ATI Mobility Radeon 9600 .*ATI.*Mobility *96.* 0 1 +ATI Mobility Radeon HD 2300 .*ATI.*Mobility *HD *23.* 1 1 +ATI Mobility Radeon HD 2400 .*ATI.*Mobility *HD *24.* 1 1 +ATI Mobility Radeon HD 2600 .*ATI.*Mobility *HD *26.* 3 1 +ATI Mobility Radeon HD 3400 .*ATI.*Mobility *HD *34.* 1 1 +ATI Mobility Radeon HD 3600 .*ATI.*Mobility *HD *36.* 3 1 +ATI Mobility Radeon HD 3800 .*ATI.*Mobility *HD *38.* 3 1 +ATI Mobility Radeon X1xxx .*ATI.*Mobility *X1.* 0 1 +ATI Mobility Radeon X2xxx .*ATI.*Mobility *X2.* 0 1 +ATI Mobility Radeon X3xx .*ATI.*Mobility *X3.* 1 1 +ATI Mobility Radeon X6xx .*ATI.*Mobility *X6.* 1 1 +ATI Mobility Radeon X7xx .*ATI.*Mobility *X7.* 1 1 +ATI Mobility Radeon Xxxx .*ATI.*Mobility *X.* 0 1 +ATI Radeon HD 2300 .*ATI.*Radeon HD *23.* 0 1 +ATI Radeon HD 2400 .*ATI.*Radeon HD *24.* 1 1 +ATI Radeon HD 2600 .*ATI.*Radeon HD *26.* 2 1 +ATI Radeon HD 2900 .*ATI.*Radeon HD *29.* 3 1 +ATI Radeon HD 3200 .*ATI.*Radeon *HD *32.* 0 1 +ATI Radeon HD 3300 .*ATI.*Radeon HD *33.* 1 1 +ATI Radeon HD 3400 .*ATI.*Radeon HD *34.* 1 1 +ATI Radeon HD 3600 .*ATI.*Radeon HD *36.* 3 1 +ATI Radeon HD 3800 .*ATI.*Radeon HD *38.* 3 1 +ATI Radeon HD 4200 .*ATI.*Radeon HD *42.* 1 1 +ATI Radeon HD 4300 .*ATI.*Radeon HD *43.* 1 1 +ATI Radeon HD 4500 .*ATI.*Radeon HD *45.* 3 1 +ATI Radeon HD 4600 .*ATI.*Radeon HD *46.* 3 1 +ATI Radeon HD 4700 .*ATI.*Radeon HD *47.* 3 1 +ATI Radeon HD 4800 .*ATI.*Radeon.*HD *48.* 3 1 +ATI Radeon HD 5600 .*ATI.*Radeon.*HD *56.* 3 1 +ATI Radeon HD 5700 .*ATI.*Radeon.*HD *57.* 3 1 +ATI Radeon HD 5800 .*ATI.*Radeon.*HD *58.* 3 1 +ATI Radeon HD 5900 .*ATI.*Radeon.*HD *59.* 3 1 ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 ATI Radeon 2100 .*ATI.*Radeon 21.* 0 1 ATI Radeon 3100 .*ATI.*Radeon 31.* 1 1 @@ -128,12 +127,12 @@ ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0 ATI Radeon X1000 .*ATI.*Radeon *X10.* 0 1 ATI Radeon X1200 .*ATI.*Radeon *X12.* 0 1 ATI Radeon X1300 .*ATI.*Radeon *X13.* 1 1 -ATI Radeon X1400 .*ATI.*Radeon X14.* 1 1 -ATI Radeon X1500 .*ATI.*Radeon X15.* 1 1 +ATI Radeon X1400 .*ATI.*Radeon *X14.* 1 1 +ATI Radeon X1500 .*ATI.*Radeon *X15.* 1 1 ATI Radeon X1600 .*ATI.*Radeon *X16.* 1 1 -ATI Radeon X1700 .*ATI.*Radeon X17.* 1 1 -ATI Radeon X1800 .*ATI.*Radeon X18.* 3 1 -ATI Radeon X1900 .*ATI.*Radeon X19.* 3 1 +ATI Radeon X1700 .*ATI.*Radeon *X17.* 1 1 +ATI Radeon X1800 .*ATI.*Radeon *X18.* 3 1 +ATI Radeon X1900 .*ATI.*Radeon *X19.* 3 1 ATI Radeon X300 .*ATI.*Radeon *X3.* 0 1 ATI Radeon X400 .*ATI.*Radeon X4.* 0 1 ATI Radeon X500 .*ATI.*Radeon X5.* 0 1 diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a7322749ca..b7b4c54001 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -797,6 +797,12 @@ WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' ;; URL param must be last item passed to viewer, it ignores subsequent params ;; to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" "" +WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' +;; URL param must be last item passed to viewer, it ignores subsequent params +;; to avoid parameter injection attacks. +WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' ; write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8bcf680876..529ce950e4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1226,7 +1226,10 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) { setFlying(TRUE); - mAutoPilotFlyOnStop = TRUE; + // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" + // from an object. See EXT-1655. + if ("Sit" != mAutoPilotBehaviorName) + mAutoPilotFlyOnStop = TRUE; } mAutoPilot = TRUE; @@ -1492,6 +1495,8 @@ void LLAgent::propagate(const F32 dt) floater_move->mBackwardButton ->setToggleState( gAgentCamera.getAtKey() < 0 || gAgentCamera.getWalkKey() < 0 ); floater_move->mTurnLeftButton ->setToggleState( gAgentCamera.getYawKey() > 0.f ); floater_move->mTurnRightButton ->setToggleState( gAgentCamera.getYawKey() < 0.f ); + floater_move->mSlideLeftButton ->setToggleState( gAgentCamera.getLeftKey() > 0.f ); + floater_move->mSlideRightButton ->setToggleState( gAgentCamera.getLeftKey() < 0.f ); floater_move->mMoveUpButton ->setToggleState( gAgentCamera.getUpKey() > 0 ); floater_move->mMoveDownButton ->setToggleState( gAgentCamera.getUpKey() < 0 ); } @@ -3233,7 +3238,7 @@ bool LLAgent::teleportCore(bool is_local) // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel. // This was breaking the case of teleporting within a single sim. Backing it out for now. -// gVoiceClient->leaveChannel(); +// LLVoiceClient::getInstance()->leaveChannel(); return true; } @@ -3377,7 +3382,7 @@ void LLAgent::setTeleportState(ETeleportState state) if (mTeleportState == TELEPORT_MOVING) { // We're outa here. Save "back" slurl. - mTeleportSourceSLURL = LLAgentUI::buildSLURL(); + LLAgentUI::buildSLURL(mTeleportSourceSLURL); } else if(mTeleportState == TELEPORT_ARRIVING) { @@ -3553,7 +3558,7 @@ void LLAgent::sendAgentSetAppearance() const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); // if we're not wearing a skirt, we don't need the texture to be baked - if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT)) + if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT)) { continue; } @@ -3576,8 +3581,8 @@ void LLAgent::sendAgentSetAppearance() LLUUID hash; for (U8 i=0; i < baked_dict->mWearables.size(); i++) { - // EWearableType wearable_type = gBakedWearableMap[baked_index][wearable_num]; - const EWearableType wearable_type = baked_dict->mWearables[i]; + // LLWearableType::EType wearable_type = gBakedWearableMap[baked_index][wearable_num]; + const LLWearableType::EType wearable_type = baked_dict->mWearables[i]; // MULTI-WEARABLE: fixed to 0th - extend to everything once messaging works. const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,0); if (wearable) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a460077b7e..32f9b00135 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -42,6 +42,7 @@ #include "llpointer.h" #include "lluicolor.h" #include "llvoavatardefines.h" +#include "llslurl.h" extern const BOOL ANIMATE; extern const U8 AGENT_STATE_TYPING; // Typing indication @@ -514,13 +515,13 @@ public: public: static void parseTeleportMessages(const std::string& xml_filename); - const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } + const void getTeleportSourceSLURL(LLSLURL& slurl) const { slurl = mTeleportSourceSLURL; } public: // ! TODO ! Define ERROR and PROGRESS enums here instead of exposing the mappings. static std::map<std::string, std::string> sTeleportErrorMessages; static std::map<std::string, std::string> sTeleportProgressMessages; private: - std::string mTeleportSourceSLURL; // SLURL where last TP began + LLSLURL mTeleportSourceSLURL; // SLURL where last TP began //-------------------------------------------------------------------- // Teleport Actions diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index b3ed7c353e..7a8205acb5 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -53,7 +53,10 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const } else { - std::string url = LLSLURL::buildSLURL(event_data["regionname"], event_data["x"], event_data["y"], event_data["z"]); + std::string url = LLSLURL(event_data["regionname"], + LLVector3(event_data["x"].asReal(), + event_data["y"].asReal(), + event_data["z"].asReal())).getSLURLString(); LLURLDispatcher::dispatch(url, NULL, false); } } diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index c4597ad6f8..15d9f36b74 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -76,16 +76,15 @@ void LLAgentUI::buildFullname(std::string& name) } //static -std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) +void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) { - std::string slurl; - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { - LLVector3d agentPos = gAgent.getPositionGlobal(); - slurl = LLSLURL::buildSLURLfromPosGlobal(regionp->getName(), agentPos, escaped); - } - return slurl; + LLSLURL return_slurl; + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); + } + slurl = return_slurl; } //static diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h index 3478793e38..577b752fbe 100644 --- a/indra/newview/llagentui.h +++ b/indra/newview/llagentui.h @@ -33,6 +33,8 @@ #ifndef LLAGENTUI_H #define LLAGENTUI_H +class LLSLURL; + class LLAgentUI { public: @@ -48,7 +50,7 @@ public: static void buildName(std::string& name); static void buildFullname(std::string &name); - static std::string buildSLURL(const bool escaped = true); + static void buildSLURL(LLSLURL& slurl, const bool escaped = true); //build location string using the current position of gAgent. static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); //build location string using a region position of the avatar. diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7f248eee30..3e73bbef15 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -100,13 +100,13 @@ void checkWearableAgainstInventory(LLWearable *wearable) void LLAgentWearables::dump() { llinfos << "LLAgentWearablesDump" << llendl; - for (S32 i = 0; i < WT_COUNT; i++) + for (S32 i = 0; i < LLWearableType::WT_COUNT; i++) { - U32 count = getWearableCount((EWearableType)i); + U32 count = getWearableCount((LLWearableType::EType)i); llinfos << "Type: " << i << " count " << count << llendl; for (U32 j=0; j<count; j++) { - LLWearable* wearable = getWearable((EWearableType)i,j); + LLWearable* wearable = getWearable((LLWearableType::EType)i,j); if (wearable == NULL) { llinfos << " " << j << " NULL wearable" << llendl; @@ -250,7 +250,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (item_id.isNull()) return; - LLUUID old_item_id = getWearableItemID((EWearableType)type,index); + LLUUID old_item_id = getWearableItemID((LLWearableType::EType)type,index); if (wearable) { @@ -259,11 +259,11 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, if (old_item_id.notNull()) { gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - setWearable((EWearableType)type,index,wearable); + setWearable((LLWearableType::EType)type,index,wearable); } else { - pushWearable((EWearableType)type,wearable); + pushWearable((LLWearableType::EType)type,wearable); } } @@ -287,11 +287,11 @@ void LLAgentWearables::sendAgentWearablesUpdate() { // MULTI-WEARABLE: call i "type" or something. // First make sure that we have inventory items for each wearable - for (S32 type=0; type < WT_COUNT; ++type) + for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { - for (U32 j=0; j < getWearableCount((EWearableType)type); ++j) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)type); ++j) { - LLWearable* wearable = getWearable((EWearableType)type,j); + LLWearable* wearable = getWearable((LLWearableType::EType)type,j); if (wearable) { if (wearable->getItemID().isNull()) @@ -326,7 +326,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() lldebugs << "sendAgentWearablesUpdate()" << llendl; // MULTI-WEARABLE: update for multi-wearables after server-side support is in. - for (S32 type=0; type < WT_COUNT; ++type) + for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { gMessageSystem->nextBlockFast(_PREHASH_WearableData); @@ -334,7 +334,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() gMessageSystem->addU8Fast(_PREHASH_WearableType, type_u8); // MULTI-WEARABLE: TODO: hacked index to 0, needs to loop over all once messages support this. - LLWearable* wearable = getWearable((EWearableType)type, 0); + LLWearable* wearable = getWearable((LLWearableType::EType)type, 0); if (wearable) { //llinfos << "Sending wearable " << wearable->getName() << llendl; @@ -350,16 +350,16 @@ void LLAgentWearables::sendAgentWearablesUpdate() } else { - //llinfos << "Not wearing wearable type " << LLWearableDictionary::getInstance()->getWearable((EWearableType)i) << llendl; + //llinfos << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << llendl; gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null); } - lldebugs << " " << LLWearableDictionary::getTypeLabel((EWearableType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; + lldebugs << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; } gAgent.sendReliableMessage(); } -void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, BOOL send_update) +void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update) { LLWearable* old_wearable = getWearable(type, index); if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion())) @@ -422,7 +422,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B } } -void LLAgentWearables::saveWearableAs(const EWearableType type, +void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found) @@ -483,7 +483,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type, old_wearable->revertValues(); } -void LLAgentWearables::revertWearable(const EWearableType type, const U32 index) +void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index) { LLWearable* wearable = getWearable(type, index); wearable->revertValues(); @@ -498,10 +498,10 @@ void LLAgentWearables::saveAllWearables() // return; //} - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) - saveWearable((EWearableType)i, j, FALSE); + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) + saveWearable((LLWearableType::EType)i, j, FALSE); } sendAgentWearablesUpdate(); } @@ -509,14 +509,14 @@ void LLAgentWearables::saveAllWearables() // Called when the user changes the name of a wearable inventory item that is currently being worn. void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& new_name) { - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - LLUUID curr_item_id = getWearableItemID((EWearableType)i,j); + LLUUID curr_item_id = getWearableItemID((LLWearableType::EType)i,j); if (curr_item_id == item_id) { - LLWearable* old_wearable = getWearable((EWearableType)i,j); + LLWearable* old_wearable = getWearable((LLWearableType::EType)i,j); llassert(old_wearable); std::string old_name = old_wearable->getName(); @@ -530,7 +530,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& } old_wearable->setName(old_name); - setWearable((EWearableType)i,j,new_wearable); + setWearable((LLWearableType::EType)i,j,new_wearable); sendAgentWearablesUpdate(); break; } @@ -539,7 +539,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& } -BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const +BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const { LLUUID item_id = getWearableItemID(type, index); if (!item_id.isNull()) @@ -554,7 +554,7 @@ BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const return FALSE; } -BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const +BOOL LLAgentWearables::isWearableCopyable(LLWearableType::EType type, U32 index) const { LLUUID item_id = getWearableItemID(type, index); if (!item_id.isNull()) @@ -570,7 +570,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const } /* - U32 LLAgentWearables::getWearablePermMask(EWearableType type) + U32 LLAgentWearables::getWearablePermMask(LLWearableType::EType type) { LLUUID item_id = getWearableItemID(type); if (!item_id.isNull()) @@ -585,7 +585,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const } */ -LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type, U32 index) +LLInventoryItem* LLAgentWearables::getWearableInventoryItem(LLWearableType::EType type, U32 index) { LLUUID item_id = getWearableItemID(type,index); LLInventoryItem* item = NULL; @@ -598,11 +598,11 @@ LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type, const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) const { - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - const LLWearable * curr_wearable = getWearable((EWearableType)i, j); + const LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); if (curr_wearable && (curr_wearable->getItemID() == item_id)) { return curr_wearable; @@ -614,11 +614,11 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { - for (U32 j=0; j < getWearableCount((EWearableType)i); j++) + for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++) { - LLWearable * curr_wearable = getWearable((EWearableType)i, j); + LLWearable * curr_wearable = getWearable((LLWearableType::EType)i, j); if (curr_wearable && (curr_wearable->getAssetID() == asset_id)) { return curr_wearable; @@ -638,12 +638,12 @@ void LLAgentWearables::sendAgentWearablesRequest() } // static -BOOL LLAgentWearables::selfHasWearable(EWearableType type) +BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type) { return (gAgentWearables.getWearableCount(type) > 0); } -LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) +LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) { wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -661,7 +661,7 @@ LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) } } -void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearable *wearable) +void LLAgentWearables::setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable) { LLWearable *old_wearable = getWearable(type,index); @@ -691,7 +691,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab } } -U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearable) +U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable *wearable) { if (wearable == NULL) { @@ -699,7 +699,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl llwarns << "Null wearable sent for type " << type << llendl; return MAX_WEARABLES_PER_TYPE; } - if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) + if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) { mWearableDatas[type].push_back(wearable); wearableUpdated(wearable); @@ -741,7 +741,7 @@ void LLAgentWearables::popWearable(LLWearable *wearable) } U32 index = getWearableIndex(wearable); - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type)) { @@ -749,7 +749,7 @@ void LLAgentWearables::popWearable(LLWearable *wearable) } } -void LLAgentWearables::popWearable(const EWearableType type, U32 index) +void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index) { LLWearable *wearable = getWearable(type, index); if (wearable) @@ -767,7 +767,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) return MAX_WEARABLES_PER_TYPE; } - const EWearableType type = wearable->getType(); + const LLWearableType::EType type = wearable->getType(); wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { @@ -786,7 +786,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable) return MAX_WEARABLES_PER_TYPE; } -const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) const +const LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) const { wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -804,7 +804,7 @@ const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 in } } -LLWearable* LLAgentWearables::getTopWearable(const EWearableType type) +LLWearable* LLAgentWearables::getTopWearable(const LLWearableType::EType type) { U32 count = getWearableCount(type); if ( count == 0) @@ -815,7 +815,7 @@ LLWearable* LLAgentWearables::getTopWearable(const EWearableType type) return getWearable(type, count-1); } -U32 LLAgentWearables::getWearableCount(const EWearableType type) const +U32 LLAgentWearables::getWearableCount(const LLWearableType::EType type) const { wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) @@ -828,7 +828,7 @@ U32 LLAgentWearables::getWearableCount(const EWearableType type) const U32 LLAgentWearables::getWearableCount(const U32 tex_index) const { - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((LLVOAvatarDefines::ETextureIndex)tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((LLVOAvatarDefines::ETextureIndex)tex_index); return getWearableCount(wearable_type); } @@ -843,7 +843,7 @@ U32 LLAgentWearables::itemUpdatePendingCount() const return mItemsAwaitingWearableUpdate.size(); } -const LLUUID LLAgentWearables::getWearableItemID(EWearableType type, U32 index) const +const LLUUID LLAgentWearables::getWearableItemID(LLWearableType::EType type, U32 index) const { const LLWearable *wearable = getWearable(type,index); if (wearable) @@ -852,7 +852,7 @@ const LLUUID LLAgentWearables::getWearableItemID(EWearableType type, U32 index) return LLUUID(); } -const LLUUID LLAgentWearables::getWearableAssetID(EWearableType type, U32 index) const +const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U32 index) const { const LLWearable *wearable = getWearable(type,index); if (wearable) @@ -916,11 +916,11 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Parse initial wearables data from message system U8 type_u8 = 0; gMessageSystem->getU8Fast(_PREHASH_WearableData, _PREHASH_WearableType, type_u8, i); - if (type_u8 >= WT_COUNT) + if (type_u8 >= LLWearableType::WT_COUNT) { continue; } - const EWearableType type = (EWearableType) type_u8; + const LLWearableType::EType type = (LLWearableType::EType) type_u8; LLUUID item_id; gMessageSystem->getUUIDFast(_PREHASH_WearableData, _PREHASH_ItemID, item_id, i); @@ -933,7 +933,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs } else { - LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(type); + LLAssetType::EType asset_type = LLWearableType::getAssetType(type); if (asset_type == LLAssetType::AT_NONE) { continue; @@ -946,7 +946,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs outfit->add(wearable_data); } - lldebugs << " " << LLWearableDictionary::getTypeLabel(type) << llendl; + lldebugs << " " << LLWearableType::getTypeLabel(type) << llendl; } // Get the complete information on the items in the inventory and set up an observer @@ -970,11 +970,11 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Normally, all wearables referred to "AgentWearablesUpdate" will correspond to actual assets in the // database. If for some reason, we can't load one of those assets, we can try to reconstruct it so that // the user isn't left without a shape, for example. (We can do that only after the inventory has loaded.) -void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 index) +void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, U32 index) { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; + lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* new_wearable = LLWearableList::instance().createNewWearable(type); S32 type_s32 = (S32) type; @@ -1011,9 +1011,9 @@ void LLAgentWearables::recoverMissingWearableDone() } } -void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index) +void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index) { - LLWearable* wearable = getWearable((EWearableType)wearable_type, wearable_index); + LLWearable* wearable = getWearable((LLWearableType::EType)wearable_type, wearable_index); if (!wearable) { llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; @@ -1027,7 +1027,7 @@ class OnWearableItemCreatedCB: public LLInventoryCallback { public: OnWearableItemCreatedCB(): - mWearablesAwaitingItems(WT_COUNT,NULL) + mWearablesAwaitingItems(LLWearableType::WT_COUNT,NULL) { llinfos << "created callback" << llendl; } @@ -1053,8 +1053,8 @@ public: llwarns << "no wearable" << llendl; return; } - EWearableType type = wearable->getType(); - if (type<WT_COUNT) + LLWearableType::EType type = wearable->getType(); + if (type<LLWearableType::WT_COUNT) { mWearablesAwaitingItems[type] = wearable; } @@ -1078,8 +1078,8 @@ public: } if (item && item->isWearableType()) { - EWearableType type = item->getWearableType(); - if (type < WT_COUNT) + LLWearableType::EType type = item->getWearableType(); + if (type < LLWearableType::WT_COUNT) { LLWearable *wearable = mWearablesAwaitingItems[type]; if (wearable) @@ -1106,30 +1106,30 @@ void LLAgentWearables::createStandardWearables(BOOL female) gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE); - const BOOL create[WT_COUNT] = + const BOOL create[LLWearableType::WT_COUNT] = { - TRUE, //WT_SHAPE - TRUE, //WT_SKIN - TRUE, //WT_HAIR - TRUE, //WT_EYES - TRUE, //WT_SHIRT - TRUE, //WT_PANTS - TRUE, //WT_SHOES - TRUE, //WT_SOCKS - FALSE, //WT_JACKET - FALSE, //WT_GLOVES - TRUE, //WT_UNDERSHIRT - TRUE, //WT_UNDERPANTS - FALSE //WT_SKIRT + TRUE, //LLWearableType::WT_SHAPE + TRUE, //LLWearableType::WT_SKIN + TRUE, //LLWearableType::WT_HAIR + TRUE, //LLWearableType::WT_EYES + TRUE, //LLWearableType::WT_SHIRT + TRUE, //LLWearableType::WT_PANTS + TRUE, //LLWearableType::WT_SHOES + TRUE, //LLWearableType::WT_SOCKS + FALSE, //LLWearableType::WT_JACKET + FALSE, //LLWearableType::WT_GLOVES + TRUE, //LLWearableType::WT_UNDERSHIRT + TRUE, //LLWearableType::WT_UNDERPANTS + FALSE //LLWearableType::WT_SKIRT }; LLPointer<LLInventoryCallback> cb = new OnWearableItemCreatedCB; - for (S32 i=0; i < WT_COUNT; i++) + for (S32 i=0; i < LLWearableType::WT_COUNT; i++) { if (create[i]) { - llassert(getWearableCount((EWearableType)i) == 0); - LLWearable* wearable = LLWearableList::instance().createNewWearable((EWearableType)i); + llassert(getWearableCount((LLWearableType::EType)i) == 0); + LLWearable* wearable = LLWearableList::instance().createNewWearable((LLWearableType::EType)i); ((OnWearableItemCreatedCB*)(&(*cb)))->addPendingWearable(wearable); // no need to update here... LLUUID category_id = LLUUID::null; @@ -1164,6 +1164,7 @@ void LLAgentWearables::createStandardWearablesAllDone() mWearablesLoaded = TRUE; checkWearablesLoaded(); + mLoadedSignal(); updateServer(); @@ -1174,16 +1175,16 @@ void LLAgentWearables::createStandardWearablesAllDone() // MULTI-WEARABLE: Properly handle multiwearables later. void LLAgentWearables::getAllWearablesArray(LLDynamicArray<S32>& wearables) { - for( S32 i = 0; i < WT_COUNT; ++i ) + for( S32 i = 0; i < LLWearableType::WT_COUNT; ++i ) { - if (getWearableCount((EWearableType) i) != 0) + if (getWearableCount((LLWearableType::EType) i) != 0) { wearables.push_back(i); } } } -// Note: wearables_to_include should be a list of EWearableType types +// Note: wearables_to_include should be a list of LLWearableType::EType types // attachments_to_include should be a list of attachment points void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, const LLDynamicArray<S32>& wearables_to_include, @@ -1213,9 +1214,9 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, for (i = 0; i < count; ++i) { const S32 type = wearables_to_include[i]; - for (U32 j=0; j<getWearableCount((EWearableType)i); j++) + for (U32 j=0; j<getWearableCount((LLWearableType::EType)i); j++) { - LLWearable* old_wearable = getWearable((EWearableType)type, j); + LLWearable* old_wearable = getWearable((LLWearableType::EType)type, j); if (old_wearable) { std::string new_name; @@ -1230,7 +1231,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, new_wearable->setName(new_name); } - LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((EWearableType)type,j)); + LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((LLWearableType::EType)type,j)); S32 todo = addWearableToAgentInventoryCallback::CALL_NONE; if (!found_first_item) { @@ -1250,7 +1251,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, llassert(item); if (item) { - if (isWearableCopyable((EWearableType)type, j)) + if (isWearableCopyable((LLWearableType::EType)type, j)) { copy_inventory_item( gAgent.getID(), @@ -1338,7 +1339,8 @@ public: LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); LLPanelOutfitsInventory *outfit_panel = dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); - if (outfit_panel) + // TODO: add handling "My Outfits" tab. + if (outfit_panel && outfit_panel->isCOFPanelActive()) { outfit_panel->getRootFolder()->clearSelection(); outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); @@ -1361,27 +1363,9 @@ private: LLUUID mFolderID; }; -LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) -{ - if (!isAgentAvatarValid()) return LLUUID::null; - - // First, make a folder in the My Outfits directory. - const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - LLUUID folder_id = gInventory.createNewCategory( - parent_id, - LLFolderType::FT_OUTFIT, - new_folder_name); - - LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); - LLAppearanceMgr::instance().shallowCopyCategoryContents(LLAppearanceMgr::instance().getCOF(),folder_id, cb); - LLAppearanceMgr::instance().createBaseOutfitLink(folder_id, cb); - - return folder_id; -} - void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index) { - LLUUID first_item_id = getWearableItemID((EWearableType)type, index); + LLUUID first_item_id = getWearableItemID((LLWearableType::EType)type, index); // Open the inventory and select the first item we added. if (first_item_id.notNull()) { @@ -1412,10 +1396,10 @@ void LLAgentWearables::addWearableToAgentInventory(LLPointer<LLInventoryCallback cb); } -void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_all, U32 index) +void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_remove_all, U32 index) { if (gAgent.isTeen() && - (type == WT_UNDERSHIRT || type == WT_UNDERPANTS)) + (type == LLWearableType::WT_UNDERSHIRT || type == LLWearableType::WT_UNDERPANTS)) { // Can't take off underclothing in simple UI mode or on PG accounts // TODO: enable the removing of a single undershirt/underpants if multiple are worn. - Nyx @@ -1459,7 +1443,7 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - EWearableType type = (EWearableType)notification["payload"]["wearable_type"].asInteger(); + LLWearableType::EType type = (LLWearableType::EType)notification["payload"]["wearable_type"].asInteger(); S32 index = (S32)notification["payload"]["wearable_index"].asInteger(); switch(option) { @@ -1483,7 +1467,7 @@ bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LL } // Called by removeWearable() and onRemoveWearableDialog() to actually do the removal. -void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_remove_all, U32 index) +void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, bool do_remove_all, U32 index) { //LLAgentDumper dumper("removeWearable"); if (do_remove_all) @@ -1532,11 +1516,11 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { // note: shirt is the first non-body part wearable item. Update if wearable order changes. // This loop should remove all clothing, but not any body parts - for (S32 type = 0; type < (S32)WT_COUNT; type++) + for (S32 type = 0; type < (S32)LLWearableType::WT_COUNT; type++) { - if (LLWearableDictionary::getAssetType((EWearableType)type) == LLAssetType::AT_CLOTHING) + if (LLWearableType::getAssetType((LLWearableType::EType)type) == LLAssetType::AT_CLOTHING) { - removeWearable((EWearableType)type, true, 0); + removeWearable((LLWearableType::EType)type, true, 0); } } } @@ -1553,12 +1537,12 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it llassert(new_wearable); if (new_wearable) { - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); new_wearable->setName(new_item->getName()); new_wearable->setItemID(new_item->getUUID()); - if (LLWearableDictionary::getAssetType(type) == LLAssetType::AT_BODYPART) + if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART) { // exactly one wearable per body part setWearable(type,0,new_wearable); @@ -1584,6 +1568,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); + mLoadedSignal(); queryWearableCache(); updateServer(); @@ -1601,7 +1586,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne return; } - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); if (!do_append) { @@ -1614,7 +1599,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && (old_item_id == new_item->getUUID())) { - lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; + lldebugs << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << llendl; return; } @@ -1671,7 +1656,7 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& // MULTI_WEARABLE: unify code after null objects are gone. void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append) { - const EWearableType type = new_wearable->getType(); + const LLWearableType::EType type = new_wearable->getType(); if (do_append && getWearableItemID(type,0).notNull()) { @@ -1741,7 +1726,7 @@ void LLAgentWearables::queryWearableCache() bool hash_computed = false; for (U8 i=0; i < baked_dict->mWearables.size(); i++) { - const EWearableType baked_type = baked_dict->mWearables[i]; + const LLWearableType::EType baked_type = baked_dict->mWearables[i]; const U32 num_wearables = getWearableCount(baked_type); for (U32 index = 0; index < num_wearables; ++index) { @@ -1780,20 +1765,20 @@ void LLAgentWearables::queryWearableCache() // User has picked "remove from avatar" from a menu. // static -void LLAgentWearables::userRemoveWearable(const EWearableType &type, const U32 &index) +void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index) { - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& - //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) + if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&& + //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT))) { gAgentWearables.removeWearable(type,false,index); } } //static -void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type) +void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type) { - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& - //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) + if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&& + //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT))) { gAgentWearables.removeWearable(type,true,0); } @@ -1818,17 +1803,17 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) { if (proceed) { - gAgentWearables.removeWearable(WT_SHIRT,true,0); - gAgentWearables.removeWearable(WT_PANTS,true,0); - gAgentWearables.removeWearable(WT_SHOES,true,0); - gAgentWearables.removeWearable(WT_SOCKS,true,0); - gAgentWearables.removeWearable(WT_JACKET,true,0); - gAgentWearables.removeWearable(WT_GLOVES,true,0); - gAgentWearables.removeWearable(WT_UNDERSHIRT,true,0); - gAgentWearables.removeWearable(WT_UNDERPANTS,true,0); - gAgentWearables.removeWearable(WT_SKIRT,true,0); - gAgentWearables.removeWearable(WT_ALPHA,true,0); - gAgentWearables.removeWearable(WT_TATTOO,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SHIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_PANTS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SHOES,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SOCKS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_JACKET,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_GLOVES,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_UNDERSHIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_UNDERPANTS,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_SKIRT,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_ALPHA,true,0); + gAgentWearables.removeWearable(LLWearableType::WT_TATTOO,true,0); } } @@ -1991,7 +1976,11 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); +#if ENABLE_MULTIATTACHMENTS + msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD ); +#else msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point +#endif pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); msg->addStringFast(_PREHASH_Description, item->getDescription()); @@ -2025,29 +2014,66 @@ BOOL LLAgentWearables::areWearablesLoaded() const void LLAgentWearables::updateWearablesLoaded() { mWearablesLoaded = (itemUpdatePendingCount()==0); + if (mWearablesLoaded) + { + mLoadedSignal(); + } } bool LLAgentWearables::canWearableBeRemoved(const LLWearable* wearable) const { if (!wearable) return false; - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); // Make sure the user always has at least one shape, skin, eyes, and hair type currently worn. - return !(((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES)) + return !(((type == LLWearableType::WT_SHAPE) || (type == LLWearableType::WT_SKIN) || (type == LLWearableType::WT_HAIR) || (type == LLWearableType::WT_EYES)) && (getWearableCount(type) <= 1) ); } void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake) { - for( S32 type = 0; type < WT_COUNT; ++type ) + for( S32 type = 0; type < LLWearableType::WT_COUNT; ++type ) { - for (S32 count = 0; count < (S32)getWearableCount((EWearableType)type); ++count) + for (S32 count = 0; count < (S32)getWearableCount((LLWearableType::EType)type); ++count) { - LLWearable *wearable = getWearable((EWearableType)type,count); + LLWearable *wearable = getWearable((LLWearableType::EType)type,count); wearable->animateParams(delta, upload_bake); } } } +bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool closer_to_body) +{ + if (!item) return false; + if (!item->isWearableType()) return false; + + wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(item->getWearableType()); + if (wearable_iter == mWearableDatas.end()) return false; + + wearableentry_vec_t& wearable_vec = wearable_iter->second; + if (wearable_vec.empty()) return false; + + const LLUUID& asset_id = item->getAssetUUID(); + + //nowhere to move if the wearable is already on any boundary (closest to the body/furthest from the body) + if (closer_to_body && asset_id == wearable_vec.front()->getAssetID()) return false; + if (!closer_to_body && asset_id == wearable_vec.back()->getAssetID()) return false; + + for (U32 i = 0; i < wearable_vec.size(); ++i) + { + LLWearable* wearable = wearable_vec[i]; + if (!wearable) continue; + if (wearable->getAssetID() != asset_id) continue; + + //swapping wearables + U32 swap_i = closer_to_body ? i-1 : i+1; + wearable_vec[i] = wearable_vec[swap_i]; + wearable_vec[swap_i] = wearable; + return true; + } + + return false; +} + void LLAgentWearables::updateServer() { sendAgentWearablesUpdate(); @@ -2071,3 +2097,8 @@ void LLAgentWearables::populateMyOutfitsFolder(void) outfits->done(); } } + +boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb) +{ + return mLoadedSignal.connect(cb); +} diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index b76367324c..def16e4e85 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -71,8 +71,8 @@ protected: //-------------------------------------------------------------------- public: BOOL isWearingItem(const LLUUID& item_id) const; - BOOL isWearableModifiable(EWearableType type, U32 index /*= 0*/) const; - BOOL isWearableCopyable(EWearableType type, U32 index /*= 0*/) const; + BOOL isWearableModifiable(LLWearableType::EType type, U32 index /*= 0*/) const; + BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; void updateWearablesLoaded(); void checkWearablesLoaded() const; @@ -82,21 +82,23 @@ public: void animateAllWearableParams(F32 delta, BOOL upload_bake); + bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body); + //-------------------------------------------------------------------- // Accessors //-------------------------------------------------------------------- public: - const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const; - const LLUUID getWearableAssetID(EWearableType type, U32 index /*= 0*/) const; + const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const; + const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; LLWearable* getWearableFromAssetID(const LLUUID& asset_id); - LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/); + LLInventoryItem* getWearableInventoryItem(LLWearableType::EType type, U32 index /*= 0*/); // MULTI-WEARABLE: assuming one per type. - static BOOL selfHasWearable(EWearableType type); - LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/); - const LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/) const; - LLWearable* getTopWearable(const EWearableType type); - U32 getWearableCount(const EWearableType type) const; + static BOOL selfHasWearable(LLWearableType::EType type); + LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/); + const LLWearable* getWearable(const LLWearableType::EType type, U32 index /*= 0*/) const; + LLWearable* getTopWearable(const LLWearableType::EType type); + U32 getWearableCount(const LLWearableType::EType type) const; U32 getWearableCount(const U32 tex_index) const; //-------------------------------------------------------------------- @@ -105,17 +107,17 @@ public: private: // Low-level data structure setter - public access is via setWearableItem, etc. - void setWearable(const EWearableType type, U32 index, LLWearable *wearable); - U32 pushWearable(const EWearableType type, LLWearable *wearable); + void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable); + U32 pushWearable(const LLWearableType::EType type, LLWearable *wearable); void wearableUpdated(LLWearable *wearable); void popWearable(LLWearable *wearable); - void popWearable(const EWearableType type, U32 index); + void popWearable(const LLWearableType::EType type, U32 index); public: void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false); void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove); void setWearableName(const LLUUID& item_id, const std::string& new_name); - void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); + void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); U32 getWearableIndex(LLWearable *wearable); protected: @@ -130,16 +132,16 @@ protected: const U32 index, const LLUUID& item_id, LLWearable* wearable); - void recoverMissingWearable(const EWearableType type, U32 index /*= 0*/); + void recoverMissingWearable(const LLWearableType::EType type, U32 index /*= 0*/); void recoverMissingWearableDone(); //-------------------------------------------------------------------- // Removing wearables //-------------------------------------------------------------------- public: - void removeWearable(const EWearableType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); + void removeWearable(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); private: - void removeWearableFinal(const EWearableType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); + void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/); protected: static bool onRemoveWearableDialog(const LLSD& notification, const LLSD& response); static void userRemoveAllClothesStep2(BOOL proceed); // userdata is NULL @@ -163,14 +165,13 @@ protected: public: void getAllWearablesArray(LLDynamicArray<S32>& wearables); - // Note: wearables_to_include should be a list of EWearableType types + // Note: wearables_to_include should be a list of LLWearableType::EType types // attachments_to_include should be a list of attachment points void makeNewOutfit(const std::string& new_folder_name, const LLDynamicArray<S32>& wearables_to_include, const LLDynamicArray<S32>& attachments_to_include, BOOL rename_clothing); - - LLUUID makeNewOutfitLinks(const std::string& new_folder_name); + // Should only be called if we *know* we've never done so before, since users may // not want the Library outfits to stay in their quick outfit selector and can delete them. @@ -184,17 +185,17 @@ private: //-------------------------------------------------------------------- public: // MULTI-WEARABLE: assumes one per type. - void saveWearableAs(const EWearableType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); - void saveWearable(const EWearableType type, const U32 index, BOOL send_update = TRUE); + void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); + void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE); void saveAllWearables(); - void revertWearable(const EWearableType type, const U32 index); + void revertWearable(const LLWearableType::EType type, const U32 index); //-------------------------------------------------------------------- // Static UI hooks //-------------------------------------------------------------------- public: - static void userRemoveWearable(const EWearableType &type, const U32 &index); - static void userRemoveWearablesOfType(const EWearableType &type); + static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index); + static void userRemoveWearablesOfType(const LLWearableType::EType &type); static void userRemoveAllClothes(); typedef std::vector<LLViewerObject*> llvo_vec_t; @@ -208,11 +209,22 @@ public: U32 itemUpdatePendingCount() const; //-------------------------------------------------------------------- + // Signals + //-------------------------------------------------------------------- +public: + typedef boost::function<void()> loaded_callback_t; + typedef boost::signals2::signal<void()> loaded_signal_t; + boost::signals2::connection addLoadedCallback(loaded_callback_t cb); + +private: + loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded + + //-------------------------------------------------------------------- // Member variables //-------------------------------------------------------------------- private: typedef std::vector<LLWearable*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts) - typedef std::map<EWearableType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type + typedef std::map<LLWearableType::EType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; @@ -247,7 +259,7 @@ private: CALL_WEARITEM = 16 }; - // MULTI-WEARABLE: index is an EWearableType - more confusing usage. + // MULTI-WEARABLE: index is an LLWearableType::EType - more confusing usage. // MULTI-WEARABLE: need to have type and index args both? addWearableToAgentInventoryCallback(LLPointer<LLRefCount> cb, S32 type, diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 08d8ccfd23..03d09a3798 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -119,6 +119,7 @@ public: item->getLinkedUUID(), LLAppearanceMgr::instance().getCOF(), item->getName(), + item->getDescription(), LLAssetType::AT_LINK, link_waiter); } @@ -507,6 +508,7 @@ void LLLibraryOutfitsFetch::contentsDone() item->getLinkedUUID(), new_outfit_folder_id, item->getName(), + item->getDescription(), LLAssetType::AT_LINK, NULL); } diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h index 6695727d46..faa5fbaa43 100644 --- a/indra/newview/llagentwearablesfetch.h +++ b/indra/newview/llagentwearablesfetch.h @@ -34,7 +34,7 @@ #define LL_LLAGENTWEARABLESINITIALFETCH_H #include "llinventoryobserver.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" #include "lluuid.h" //-------------------------------------------------------------------- @@ -53,10 +53,10 @@ public: struct InitialWearableData { - EWearableType mType; + LLWearableType::EType mType; LLUUID mItemID; LLUUID mAssetID; - InitialWearableData(EWearableType type, LLUUID& itemID, LLUUID& assetID) : + InitialWearableData(LLWearableType::EType type, LLUUID& itemID, LLUUID& assetID) : mType(type), mItemID(itemID), mAssetID(assetID) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4d18ff57fe..bcaba34921 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" +#include "llaccordionctrltab.h" #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" @@ -42,6 +43,7 @@ #include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llnotificationsutil.h" +#include "llpaneloutfitsinventory.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" #include "llsidetray.h" @@ -51,6 +53,8 @@ #include "llviewerregion.h" #include "llwearablelist.h" +char ORDER_NUMBER_SEPARATOR('@'); + LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name) { LLInventoryModel::cat_array_t cat_array; @@ -118,6 +122,38 @@ private: bool mAppend; }; + +//Inventory callback updating "dirty" state when destroyed +class LLUpdateDirtyState: public LLInventoryCallback +{ +public: + LLUpdateDirtyState() {} + virtual ~LLUpdateDirtyState(){ LLAppearanceMgr::getInstance()->updateIsDirty(); } + virtual void fire(const LLUUID&) {} +}; + + +//Inventory collect functor collecting wearables of a specific wearable type +class LLFindClothesOfType : public LLInventoryCollectFunctor +{ +public: + LLFindClothesOfType(LLWearableType::EType type) : mWearableType(type) {} + virtual ~LLFindClothesOfType() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (!item) return false; + if (item->getType() != LLAssetType::AT_CLOTHING) return false; + + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem || vitem->getWearableType() != mWearableType) return false; + + return true; + } + + const LLWearableType::EType mWearableType; +}; + + LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(): mFireCount(0) { @@ -143,14 +179,14 @@ struct LLFoundData { LLFoundData() : mAssetType(LLAssetType::AT_NONE), - mWearableType(WT_INVALID), + mWearableType(LLWearableType::WT_INVALID), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, const LLUUID& asset_id, const std::string& name, const LLAssetType::EType& asset_type, - const EWearableType& wearable_type + const LLWearableType::EType& wearable_type ) : mItemID(item_id), mAssetID(asset_id), @@ -163,7 +199,7 @@ struct LLFoundData LLUUID mAssetID; std::string mName; LLAssetType::EType mAssetType; - EWearableType mWearableType; + LLWearableType::EType mWearableType; LLWearable* mWearable; }; @@ -182,7 +218,7 @@ public: void checkMissingWearables(); bool pollMissingWearables(); bool isMissingCompleted(); - void recoverMissingWearable(EWearableType type); + void recoverMissingWearable(LLWearableType::EType type); void clearCOFLinksForMissingWearables(); void onWearableAssetFetch(LLWearable *wearable); @@ -223,18 +259,18 @@ bool LLWearableHoldingPattern::isTimedOut() void LLWearableHoldingPattern::checkMissingWearables() { - std::vector<S32> found_by_type(WT_COUNT,0); - std::vector<S32> requested_by_type(WT_COUNT,0); + std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0); + std::vector<S32> requested_by_type(LLWearableType::WT_COUNT,0); for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) { LLFoundData &data = *it; - if (data.mWearableType < WT_COUNT) + if (data.mWearableType < LLWearableType::WT_COUNT) requested_by_type[data.mWearableType]++; if (data.mWearable) found_by_type[data.mWearableType]++; } - for (S32 type = 0; type < WT_COUNT; ++type) + for (S32 type = 0; type < LLWearableType::WT_COUNT; ++type) { llinfos << "type " << type << " requested " << requested_by_type[type] << " found " << found_by_type[type] << llendl; if (found_by_type[type] > 0) @@ -245,11 +281,11 @@ void LLWearableHoldingPattern::checkMissingWearables() // pants) (requested_by_type[type] > 0) || // or if type is a body part and no wearables were found. - ((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES))) + ((type == LLWearableType::WT_SHAPE) || (type == LLWearableType::WT_SKIN) || (type == LLWearableType::WT_HAIR) || (type == LLWearableType::WT_EYES))) { mTypesToRecover.insert(type); mTypesToLink.insert(type); - recoverMissingWearable((EWearableType)type); + recoverMissingWearable((LLWearableType::EType)type); llwarns << "need to replace " << type << llendl; } } @@ -332,7 +368,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() class RecoveredItemLinkCB: public LLInventoryCallback { public: - RecoveredItemLinkCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder): + RecoveredItemLinkCB(LLWearableType::EType type, LLWearable *wearable, LLWearableHoldingPattern* holder): mHolder(holder), mWearable(wearable), mType(type) @@ -356,7 +392,7 @@ public: linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); found.mWearable = mWearable; mHolder->mFoundList.push_front(found); @@ -374,13 +410,13 @@ public: private: LLWearableHoldingPattern* mHolder; LLWearable *mWearable; - EWearableType mType; + LLWearableType::EType mType; }; class RecoveredItemCB: public LLInventoryCallback { public: - RecoveredItemCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder): + RecoveredItemCB(LLWearableType::EType type, LLWearable *wearable, LLWearableHoldingPattern* holder): mHolder(holder), mWearable(wearable), mType(type) @@ -400,6 +436,7 @@ public: item_id, LLAppearanceMgr::instance().getCOF(), itemp->getName(), + itemp->getDescription(), LLAssetType::AT_LINK, cb); } @@ -407,14 +444,14 @@ public: private: LLWearableHoldingPattern* mHolder; LLWearable *mWearable; - EWearableType mType; + LLWearableType::EType mType; }; -void LLWearableHoldingPattern::recoverMissingWearable(EWearableType type) +void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type) { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type) + lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; LLWearable* wearable = LLWearableList::instance().createNewWearable(type); @@ -445,7 +482,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it) { LLFoundData &data = *it; - if ((data.mWearableType < WT_COUNT) && (!data.mWearable)) + if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) { // Wearable link that was never resolved; remove links to it from COF llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl; @@ -506,7 +543,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { data.mWearable = wearable; // Failing this means inventory or asset server are corrupted in a way we don't handle. - llassert((data.mWearableType < WT_COUNT) && (wearable->getType() == data.mWearableType)); + llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); break; } } @@ -691,10 +728,13 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL { case LLAssetType::AT_LINK: { + //LLInventoryItem::getDescription() is used for a new description + //to propagate ordering information saved in descriptions of links link_inventory_item(gAgent.getID(), item->getLinkedUUID(), dst_id, item->getName(), + item->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb); break; } @@ -708,6 +748,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL item->getLinkedUUID(), dst_id, item->getName(), + item->getDescription(), LLAssetType::AT_LINK_FOLDER, cb); } break; @@ -737,10 +778,10 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) // These are the wearable items that are required for considering this // folder as containing a complete outfit. U32 required_wearables = 0; - required_wearables |= 1LL << WT_SHAPE; - required_wearables |= 1LL << WT_SKIN; - required_wearables |= 1LL << WT_HAIR; - required_wearables |= 1LL << WT_EYES; + required_wearables |= 1LL << LLWearableType::WT_SHAPE; + required_wearables |= 1LL << LLWearableType::WT_SKIN; + required_wearables |= 1LL << LLWearableType::WT_HAIR; + required_wearables |= 1LL << LLWearableType::WT_EYES; // These are the wearables that the folder actually contains. U32 folder_wearables = 0; @@ -754,7 +795,7 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) const LLViewerInventoryItem* item = (*iter); if (item->isWearableType()) { - const EWearableType wearable_type = item->getWearableType(); + const LLWearableType::EType wearable_type = item->getWearableType(); folder_wearables |= 1LL << wearable_type; } } @@ -810,25 +851,12 @@ void LLAppearanceMgr::filterWearableItems( LLInventoryModel::item_array_t& items, S32 max_per_type) { // Divvy items into arrays by wearable type. - std::vector<LLInventoryModel::item_array_t> items_by_type(WT_COUNT); - for (S32 i=0; i<items.count(); i++) - { - LLViewerInventoryItem *item = items.get(i); - // Ignore non-wearables. - if (!item->isWearableType()) - continue; - EWearableType type = item->getWearableType(); - if(type < 0 || type >= WT_COUNT) - { - LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; - continue; - } - items_by_type[type].push_back(item); - } + std::vector<LLInventoryModel::item_array_t> items_by_type(LLWearableType::WT_COUNT); + divvyWearablesByType(items, items_by_type); // rebuild items list, retaining the last max_per_type of each array items.clear(); - for (S32 i=0; i<WT_COUNT; i++) + for (S32 i=0; i<LLWearableType::WT_COUNT; i++) { S32 size = items_by_type[i].size(); if (size <= 0) @@ -853,6 +881,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& category, item->getLinkedUUID(), category, item->getName(), + item->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb); } @@ -956,7 +985,7 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLI if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { - link_inventory_item(gAgent.getID(), category, cof, catp->getName(), + link_inventory_item(gAgent.getID(), category, cof, catp->getName(), "", LLAssetType::AT_LINK_FOLDER, link_waiter); new_outfit_name = catp->getName(); } @@ -972,7 +1001,7 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo // For each wearable type, find the first instance in the category // that we recursed through. - for( S32 i = 0; i < WT_COUNT; i++ ) + for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) { for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); iter != holder->mFoundList.end(); ++iter) @@ -1016,8 +1045,24 @@ static void remove_non_link_items(LLInventoryModel::item_array_t &items) items = pruned_items; } +//a predicate for sorting inventory items by actual descriptions +bool sort_by_description(const LLInventoryItem* item1, const LLInventoryItem* item2) +{ + if (!item1 || !item2) + { + llwarning("either item1 or item2 is NULL", 0); + return true; + } + + return item1->LLInventoryItem::getDescription() < item2->LLInventoryItem::getDescription(); +} + void LLAppearanceMgr::updateAppearanceFromCOF() { + //checking integrity of the COF in terms of ordering of wearables, + //checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state) + updateClothingOrderingInfo(); + // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link llinfos << "starting" << llendl; @@ -1046,6 +1091,10 @@ void LLAppearanceMgr::updateAppearanceFromCOF() return; } + //preparing the list of wearables in the correct order for LLAgentWearables + sortItemsByActualDescription(wear_items); + + LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; holder->mObjItems = obj_items; @@ -1066,21 +1115,21 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); #if 0 // Fault injection: uncomment this block to test asset // fetch failures (should be replaced by new defaults in // lost&found). - if (found.mWearableType == WT_SHAPE || found.mWearableType == WT_JACKET) + if (found.mWearableType == LLWearableType::WT_SHAPE || found.mWearableType == LLWearableType::WT_JACKET) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB } #endif - - holder->mFoundList.push_front(found); + //pushing back, not front, to preserve order of wearables for LLAgentWearables + holder->mFoundList.push_back(found); } else { @@ -1407,7 +1456,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update // Are these links to different items of the same wearable // type? If so, new item will replace old. // MULTI-WEARABLES: revisit if more than one per type is allowed. - else if (areMatchingWearables(vitem,inv_item)) + else if (FALSE/*areMatchingWearables(vitem,inv_item)*/) { if (inv_item->getIsLinkType()) { @@ -1430,6 +1479,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update vitem->getLinkedUUID(), getCOF(), vitem->getName(), + vitem->getDescription(), LLAssetType::AT_LINK, cb); } @@ -1446,6 +1496,7 @@ void LLAppearanceMgr::addEnsembleLink( LLInventoryCategory* cat, bool do_update cat->getLinkedUUID(), getCOF(), cat->getName(), + cat->getDescription(), LLAssetType::AT_LINK_FOLDER, cb); #endif @@ -1475,6 +1526,17 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update) } } +bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInventoryItem* item2) +{ + if (!item1 || !item2) + { + llwarning("item1, item2 cannot be null, something is very wrong", 0); + return true; + } + + return item1->getLinkedUUID() < item2->getLinkedUUID(); +} + void LLAppearanceMgr::updateIsDirty() { LLUUID cof = getCOF(); @@ -1514,33 +1576,37 @@ void LLAppearanceMgr::updateIsDirty() // Current outfit folder should have one more item than the outfit folder. // this one item is the link back to the outfit folder itself. mOutfitIsDirty = true; + return; } - else - { - typedef std::set<LLUUID> item_set_t; - item_set_t cof_set; - item_set_t outfit_set; - // sort COF items by UUID - for (S32 i = 0; i < cof_items.count(); ++i) + //getting rid of base outfit folder link to simplify comparison + for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it) + { + if (*it == base_outfit_item) { - LLViewerInventoryItem *item = cof_items.get(i); - // don't add the base outfit link to the list of objects we're comparing - if(item != base_outfit_item) - { - cof_set.insert(item->getLinkedUUID()); - } + cof_items.erase(it); + break; } + } + + //"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions) + std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid); + std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid); - // sort outfit folder by UUID - for (S32 i = 0; i < outfit_items.count(); ++i) + for (U32 i = 0; i < cof_items.size(); ++i) + { + LLViewerInventoryItem *item1 = cof_items.get(i); + LLViewerInventoryItem *item2 = outfit_items.get(i); + + if (item1->getLinkedUUID() != item2->getLinkedUUID() || + item1->LLInventoryItem::getDescription() != item2->LLInventoryItem::getDescription()) { - LLViewerInventoryItem *item = outfit_items.get(i); - outfit_set.insert(item->getLinkedUUID()); + mOutfitIsDirty = true; + return; } - - mOutfitIsDirty = (outfit_set != cof_set); } + + mOutfitIsDirty = false; } } @@ -1572,15 +1638,182 @@ bool LLAppearanceMgr::updateBaseOutfit() const LLUUID base_outfit_id = getBaseOutfitUUID(); if (base_outfit_id.isNull()) return false; + updateClothingOrderingInfo(); + // in a Base Outfit we do not remove items, only links purgeCategory(base_outfit_id, false); + + LLPointer<LLInventoryCallback> dirty_state_updater = new LLUpdateDirtyState(); + //COF contains only links so we copy to the Base Outfit only links - shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL); + shallowCopyCategoryContents(getCOF(), base_outfit_id, dirty_state_updater); return true; } +void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type) +{ + items_by_type.reserve(LLWearableType::WT_COUNT); + if (items.empty()) return; + + for (S32 i=0; i<items.count(); i++) + { + LLViewerInventoryItem *item = items.get(i); + // Ignore non-wearables. + if (!item->isWearableType()) + continue; + LLWearableType::EType type = item->getWearableType(); + if(type < 0 || type >= LLWearableType::WT_COUNT) + { + LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; + continue; + } + items_by_type[type].push_back(item); + } +} + +std::string build_order_string(LLWearableType::EType type, U32 i) +{ + std::ostringstream order_num; + order_num << ORDER_NUMBER_SEPARATOR << type * 100 + i; + return order_num.str(); +} + +struct WearablesOrderComparator +{ + WearablesOrderComparator(const LLWearableType::EType type) + { + mControlSize = build_order_string(type, 0).size(); + }; + + bool operator()(const LLInventoryItem* item1, const LLInventoryItem* item2) + { + if (!item1 || !item2) + { + llwarning("either item1 or item2 is NULL", 0); + return true; + } + + const std::string& desc1 = item1->LLInventoryItem::getDescription(); + const std::string& desc2 = item2->LLInventoryItem::getDescription(); + + bool item1_valid = (desc1.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc1[0]); + bool item2_valid = (desc2.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc2[0]); + + if (item1_valid && item2_valid) + return desc1 < desc2; + + //we need to sink down invalid items: items with empty descriptions, items with "Broken link" descriptions, + //items with ordering information but not for the associated wearables type + if (!item1_valid && item2_valid) + return false; + + return true; + } + + U32 mControlSize; +}; + +void LLAppearanceMgr::updateClothingOrderingInfo() +{ + LLInventoryModel::item_array_t wear_items; + getDescendentsOfAssetType(getCOF(), wear_items, LLAssetType::AT_CLOTHING, false); + + wearables_by_type_t items_by_type(LLWearableType::WT_COUNT); + divvyWearablesByType(wear_items, items_by_type); + + bool inventory_changed = false; + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) + { + + U32 size = items_by_type[type].size(); + if (!size) continue; + + //sinking down invalid items which need reordering + std::sort(items_by_type[type].begin(), items_by_type[type].end(), WearablesOrderComparator((LLWearableType::EType) type)); + + //requesting updates only for those links which don't have "valid" descriptions + for (U32 i = 0; i < size; i++) + { + LLViewerInventoryItem* item = items_by_type[type][i]; + if (!item) continue; + + std::string new_order_str = build_order_string((LLWearableType::EType)type, i); + if (new_order_str == item->LLInventoryItem::getDescription()) continue; + + item->setDescription(new_order_str); + item->setComplete(TRUE); + item->updateServer(FALSE); + gInventory.updateItem(item); + inventory_changed = true; + } + } + + //*TODO do we really need to notify observers? + if (inventory_changed) gInventory.notifyObservers(); +} + + + + +class LLShowCreatedOutfit: public LLInventoryCallback +{ +public: + LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id) + {} + + virtual ~LLShowCreatedOutfit() + { + LLSD key; + LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + LLPanelOutfitsInventory *outfit_panel = + dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); + if (outfit_panel) + { + outfit_panel->getRootFolder()->clearSelection(); + outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); + } + + LLAccordionCtrlTab* tab_outfits = outfit_panel ? outfit_panel->findChild<LLAccordionCtrlTab>("tab_outfits") : 0; + if (tab_outfits && !tab_outfits->getDisplayChildren()) + { + tab_outfits->changeOpenClose(tab_outfits->getDisplayChildren()); + } + + LLAppearanceMgr::getInstance()->updateIsDirty(); + LLAppearanceMgr::getInstance()->updatePanelOutfitName(""); + } + + virtual void fire(const LLUUID&) + {} + +private: + LLUUID mFolderID; +}; + +LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name) +{ + if (!isAgentAvatarValid()) return LLUUID::null; + + // First, make a folder in the My Outfits directory. + const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + LLUUID folder_id = gInventory.createNewCategory( + parent_id, + LLFolderType::FT_OUTFIT, + new_folder_name); + + updateClothingOrderingInfo(); + + LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); + shallowCopyCategoryContents(getCOF(),folder_id, cb); + createBaseOutfitLink(folder_id, cb); + + dumpCat(folder_id,"COF, new outfit"); + + return folder_id; +} + void LLAppearanceMgr::wearBaseOutfit() { const LLUUID& base_outfit_id = getBaseOutfitUUID(); @@ -1622,6 +1855,70 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) } } + +bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_body) +{ + if (!item || !item->isWearableType()) return false; + if (item->getType() != LLAssetType::AT_CLOTHING) return false; + if (!gInventory.isObjectDescendentOf(item->getUUID(), getCOF())) return false; + + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindClothesOfType filter_wearables_of_type(item->getWearableType()); + gInventory.collectDescendentsIf(getCOF(), cats, items, true, filter_wearables_of_type); + if (items.empty()) return false; + + //*TODO all items are not guarantied to have valid descriptions (check?) + std::sort(items.begin(), items.end(), WearablesOrderComparator(item->getWearableType())); + + if (closer_to_body && items.front() == item) return false; + if (!closer_to_body && items.back() == item) return false; + + LLInventoryModel::item_array_t::iterator it = std::find(items.begin(), items.end(), item); + if (items.end() == it) return false; + + + //swapping descriptions + closer_to_body ? --it : ++it; + LLViewerInventoryItem* swap_item = *it; + if (!swap_item) return false; + std::string tmp = swap_item->LLInventoryItem::getDescription(); + swap_item->setDescription(item->LLInventoryItem::getDescription()); + item->setDescription(tmp); + + + //items need to be updated on a dataserver + item->setComplete(TRUE); + item->updateServer(FALSE); + gInventory.updateItem(item); + + swap_item->setComplete(TRUE); + swap_item->updateServer(FALSE); + gInventory.updateItem(swap_item); + + //to cause appearance of the agent to be updated + bool result = false; + if (result = gAgentWearables.moveWearable(item, closer_to_body)) + { + gAgentAvatarp->wearableUpdated(item->getWearableType(), TRUE); + } + + setOutfitDirty(true); + + //*TODO do we need to notify observers here in such a way? + gInventory.notifyObservers(); + + return result; +} + +//static +void LLAppearanceMgr::sortItemsByActualDescription(LLInventoryModel::item_array_t& items) +{ + if (items.size() < 2) return; + + std::sort(items.begin(), items.end(), sort_by_description); +} + //#define DUMP_CAT_VERBOSE void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 7e35919892..516dada39d 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -48,6 +48,8 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> friend class LLSingleton<LLAppearanceMgr>; public: + typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; + void updateAppearanceFromCOF(); bool needToSaveCOF(); void updateCOF(const LLUUID& category, bool append = false); @@ -138,12 +140,25 @@ public: //Remove clothing or detach an object from the agent (a bodypart cannot be removed) void removeItemFromAvatar(const LLUUID& item_id); + + LLUUID makeNewOutfitLinks(const std::string& new_folder_name); + + bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body); + + static void sortItemsByActualDescription(LLInventoryModel::item_array_t& items); + + //Divvy items into arrays by wearable type + static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); private: + //Check ordering information on wearables stored in links' descriptions and update if it is invalid + void updateClothingOrderingInfo(); + void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); void getDescendentsOfAssetType(const LLUUID& category, diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c013831c83..82b6f1286f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -153,7 +153,7 @@ #include "llworld.h" #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llwatchdog.h" // Included so that constants/settings might be initialized @@ -193,6 +193,9 @@ #include "llparcel.h" #include "llavatariconctrl.h" +// Include for security api initialization +#include "llsecapi.h" + // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either // this app, or another 'component' of the viewer. App globals should be @@ -507,35 +510,6 @@ public: } }; -void LLAppViewer::initGridChoice() -{ - // Load up the initial grid choice from: - // - hard coded defaults... - // - command line settings... - // - if dev build, persisted settings... - - // Set the "grid choice", this is specified by command line. - std::string grid_choice = gSavedSettings.getString("CmdLineGridChoice"); - LLViewerLogin::getInstance()->setGridChoice(grid_choice); - - // Load last server choice by default - // ignored if the command line grid choice has been set - if(grid_choice.empty()) - { - S32 server = gSavedSettings.getS32("ServerChoice"); - server = llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); - if(server == GRID_INFO_OTHER) - { - std::string custom_server = gSavedSettings.getString("CustomServer"); - LLViewerLogin::getInstance()->setGridChoice(custom_server); - } - else if(server != (S32)GRID_INFO_NONE) - { - LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server); - } - } -} - //virtual bool LLAppViewer::initSLURLHandler() { @@ -647,7 +621,6 @@ bool LLAppViewer::init() LLCurl::initClass(); initThreads(); - writeSystemInfo(); // Build a string representing the current version number. @@ -777,10 +750,6 @@ bool LLAppViewer::init() return false; } - // Always fetch the Ethernet MAC address, needed both for login - // and password load. - LLUUID::getNodeID(gMACAddress); - // Prepare for out-of-memory situations, during which we will crash on // purpose and save a dump. #if LL_WINDOWS && LL_RELEASE_FOR_DOWNLOAD && LL_USE_SMARTHEAP @@ -892,6 +861,7 @@ bool LLAppViewer::init() } } + // save the graphics card gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); @@ -902,6 +872,17 @@ bool LLAppViewer::init() gSimFrames = (F32)gFrameCount; LLViewerJoystick::getInstance()->init(false); + + try { + initializeSecHandler(); + } + catch (LLProtectedDataException ex) + { + LLNotificationsUtil::add("CorruptedProtectedDataStore"); + } + LLHTTPClient::setCertVerifyCallback(secapiSSLCertVerifyCallback); + + gGLActive = FALSE; if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getS32("QAModeEventHostPort") > 0) { @@ -936,13 +917,11 @@ bool LLAppViewer::mainLoop() gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); - LLCurl::setSSLVerify(! gSavedSettings.getBOOL("NoVerifySSLCert")); - + // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); - LLVoiceClient::init(gServicePump); - + LLVoiceClient::getInstance()->init(gServicePump); LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -1273,7 +1252,7 @@ bool LLAppViewer::cleanup() // to ensure shutdown order LLMortician::setZealous(TRUE); - LLVoiceClient::terminate(); + LLVoiceClient::getInstance()->terminate(); disconnectViewer(); @@ -1472,13 +1451,6 @@ bool LLAppViewer::cleanup() llinfos << "Saving Data" << llendflush; - // Quitting with "Remember Password" turned off should always stomp your - // saved password, whether or not you successfully logged in. JC - if (!gSavedSettings.getBOOL("RememberPassword")) - { - LLStartUp::deletePasswordFromDisk(); - } - // Store the time of our current logoff gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); @@ -1530,6 +1502,9 @@ bool LLAppViewer::cleanup() LLViewerMedia::saveCookieFile(); + // Stop the plugin read thread if it's running. + LLPluginProcessParent::setUseReadThread(false); + llinfos << "Shutting down Threads" << llendflush; // Let threads finish @@ -2047,7 +2022,6 @@ bool LLAppViewer::initConfiguration() } } - initGridChoice(); // If we have specified crash on startup, set the global so we'll trigger the crash at the right time if(clp.hasOption("crashonstartup")) @@ -2141,30 +2115,17 @@ bool LLAppViewer::initConfiguration() // injection and steal passwords. Phoenix. SL-55321 if(clp.hasOption("url")) { - std::string slurl = clp.getOption("url")[0]; - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } + LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); + if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); + + } } else if(clp.hasOption("slurl")) { - std::string slurl = clp.getOption("slurl")[0]; - if(LLSLURL::isSLURL(slurl)) - { - if (LLSLURL::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } - } + LLSLURL start_slurl(clp.getOption("slurl")[0]); + LLStartUp::setStartSLURL(start_slurl); } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); @@ -2245,18 +2206,10 @@ bool LLAppViewer::initConfiguration() // don't call anotherInstanceRunning() when doing URL handoff, as // it relies on checking a marker file which will not work when running // out of different directories - std::string slurl; - if (!LLStartUp::sSLURLCommand.empty()) - { - slurl = LLStartUp::sSLURLCommand; - } - else if (LLURLSimString::parse()) - { - slurl = LLURLSimString::getURL(); - } - if (!slurl.empty()) + + if (LLStartUp::getStartSLURL().isValid()) { - if (sendURLToOtherInstance(slurl)) + if (sendURLToOtherInstance(LLStartUp::getStartSLURL().getSLURLString())) { // successfully handed off URL to existing instance, exit return false; @@ -2312,9 +2265,9 @@ bool LLAppViewer::initConfiguration() // need to do this here - need to have initialized global settings first std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); - if ( nextLoginLocation.length() ) + if ( !nextLoginLocation.empty() ) { - LLURLSimString::setString( nextLoginLocation ); + LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation)); }; gLastRunVersion = gSavedSettings.getString("LastRunVersion"); @@ -2397,7 +2350,7 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - if (gSavedSettings.getBOOL("WindowFullScreen")) + if (gSavedSettings.getBOOL("FullScreen")) { // request to go full screen... which will be delayed until login gViewerWindow->toggleFullscreen(FALSE); @@ -2535,7 +2488,7 @@ void LLAppViewer::writeSystemInfo() // The user is not logged on yet, but record the current grid choice login url // which may have been the intended grid. This can b - gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); + gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel(); // *FIX:Mani - move this down in llappviewerwin32 #ifdef LL_WINDOWS @@ -3912,7 +3865,7 @@ void LLAppViewer::sendLogoutRequest() gLogoutMaxTime = LOGOUT_REQUEST_TIME; mLogoutRequestSent = TRUE; - gVoiceClient->leaveChannel(); + LLVoiceClient::getInstance()->leaveChannel(); //Set internal status variables and marker files gLogoutInProgress = TRUE; @@ -3950,9 +3903,7 @@ void LLAppViewer::idleNetwork() { LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK); pingMainloopTimeout("idleNetwork"); - LLError::LLCallStacks::clear() ; - llpushcallstacks ; - + gObjectList.mNumNewObjects = 0; S32 total_decoded = 0; @@ -3962,7 +3913,6 @@ void LLAppViewer::idleNetwork() // deal with any queued name requests and replies. gCacheName->processPending(); - llpushcallstacks ; LLTimer check_message_timer; // Read all available packets from network const S64 frame_count = gFrameCount; // U32->S64 @@ -4032,16 +3982,13 @@ void LLAppViewer::idleNetwork() gPrintMessagesThisFrame = FALSE; } } - llpushcallstacks ; LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects); // Retransmit unacknowledged packets. gXferManager->retransmitUnackedPackets(); gAssetStorage->checkForTimeouts(); - llpushcallstacks ; gViewerThrottle.updateDynamicThrottle(); - llpushcallstacks ; // Check that the circuit between the viewer and the agent's current // region is still alive LLViewerRegion *agent_region = gAgent.getRegion(); @@ -4057,7 +4004,6 @@ void LLAppViewer::idleNetwork() mAgentRegionLastID = this_region_id; mAgentRegionLastAlive = this_region_alive; } - llpushcallstacks ; } void LLAppViewer::disconnectViewer() @@ -4332,7 +4278,7 @@ void LLAppViewer::launchUpdater() #endif // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. - query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); + query_map["userserver"] = LLGridManager::getInstance()->getGridLabel(); query_map["channel"] = gSavedSettings.getString("VersionChannelName"); // *TODO constantize this guy // *NOTE: This URL is also used in win_setup/lldownloader.cpp @@ -4345,10 +4291,10 @@ void LLAppViewer::launchUpdater() LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ; // if a sim name was passed in via command line parameter (typically through a SLURL) - if ( LLURLSimString::sInstance.mSimString.length() ) + if ( LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION ) { // record the location to start at next time - gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString ); + gSavedSettings.setString( "NextLoginLocation", LLStartUp::getStartSLURL().getSLURLString()); }; #if LL_WINDOWS diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 60645c46d4..5acd6e11c4 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -193,7 +193,6 @@ private: bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. - void initGridChoice(); bool initCache(); // Initialize local client cache. diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index d34bcb4a68..78b0f7ba83 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -604,7 +604,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze) {cmd.c_str(), ask_dialog, "-user", - (char*)LLViewerLogin::getInstance()->getGridLabel().c_str(), + (char*)LLGridManager::getInstance()->getGridLabel().c_str(), "-name", LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 80d9b14345..0b5f18c330 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -44,7 +44,6 @@ #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llmd5.h" -#include "llurlsimstring.h" #include "llfloaterworldmap.h" #include "llurldispatcher.h" #include <Carbon/Carbon.h> @@ -291,6 +290,7 @@ static OSStatus CarbonEventHandler(EventHandlerCallRef inHandlerCallRef, if(os_result >= 0 && matching_psn) { sCrashReporterIsRunning = false; + QuitApplicationEventLoop(); } } return noErr; @@ -326,7 +326,7 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze) // *NOTE:Mani A better way - make a copy of the data that the crash reporter will send // and let SL go about its business. This way makes the mac work like windows and linux // and is the smallest patch for the issue. - sCrashReporterIsRunning = true; + sCrashReporterIsRunning = false; ProcessSerialNumber o_psn; static EventHandlerRef sCarbonEventsRef = NULL; @@ -356,15 +356,13 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze) if(os_result >= 0) { - EventRecord evt; - while(sCrashReporterIsRunning) - { - while(WaitNextEvent(osMask, &evt, 0, NULL)) - { - // null op!?! - } - } - } + sCrashReporterIsRunning = true; + } + + while(sCrashReporterIsRunning) + { + RunApplicationEventLoop(); + } // Re-install the apps quit handler. AEInstallEventHandler(kCoreEventClass, @@ -453,16 +451,17 @@ std::string LLAppViewerMacOSX::generateSerialNumber() static AudioDeviceID get_default_audio_output_device(void) { AudioDeviceID device = 0; - UInt32 size; - OSStatus err; - - size = sizeof(device); - err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &device); + UInt32 size = sizeof(device); + AudioObjectPropertyAddress device_address = { kAudioHardwarePropertyDefaultOutputDevice, + kAudioObjectPropertyScopeGlobal, + kAudioObjectPropertyElementMaster }; + + OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &device_address, 0, NULL, &size, &device); if(err != noErr) { LL_DEBUGS("SystemMute") << "Couldn't get default audio output device (0x" << std::hex << err << ")" << LL_ENDL; } - + return device; } @@ -470,11 +469,15 @@ static AudioDeviceID get_default_audio_output_device(void) void LLAppViewerMacOSX::setMasterSystemAudioMute(bool new_mute) { AudioDeviceID device = get_default_audio_output_device(); - + if(device != 0) { UInt32 mute = new_mute; - OSStatus err = AudioDeviceSetProperty(device, NULL, 0, false, kAudioDevicePropertyMute, sizeof(mute), &mute); + AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute, + kAudioDevicePropertyScopeOutput, + kAudioObjectPropertyElementMaster }; + + OSStatus err = AudioObjectSetPropertyData(device, &device_address, 0, NULL, sizeof(mute), &mute); if(err != noErr) { LL_INFOS("SystemMute") << "Couldn't set audio mute property (0x" << std::hex << err << ")" << LL_ENDL; @@ -487,13 +490,17 @@ bool LLAppViewerMacOSX::getMasterSystemAudioMute() { // Assume the system isn't muted UInt32 mute = 0; - + AudioDeviceID device = get_default_audio_output_device(); - + if(device != 0) { UInt32 size = sizeof(mute); - OSStatus err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyMute, &size, &mute); + AudioObjectPropertyAddress device_address = { kAudioDevicePropertyMute, + kAudioDevicePropertyScopeOutput, + kAudioObjectPropertyElementMaster }; + + OSStatus err = AudioObjectGetPropertyData(device, &device_address, 0, NULL, &size, &mute); if(err != noErr) { LL_DEBUGS("SystemMute") << "Couldn't get audio mute property (0x" << std::hex << err << ")" << LL_ENDL; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 764d54a987..00d9bbe18b 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -286,7 +286,7 @@ bool LLAvatarActions::isCalling(const LLUUID &id) //static bool LLAvatarActions::canCall() { - return LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + return LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); } // static diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index c7a5691d70..47ec5270c3 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -34,6 +34,7 @@ // common #include "lltrans.h" +#include "llcommonutils.h" #include "llavatarlist.h" #include "llagentdata.h" // for comparator @@ -113,7 +114,7 @@ LLAvatarList::Params::Params() } LLAvatarList::LLAvatarList(const Params& p) -: LLFlatListView(p) +: LLFlatListViewEx(p) , mIgnoreOnlineStatus(p.ignore_online_status) , mShowLastInteractionTime(p.show_last_interaction_time) , mContextMenu(NULL) @@ -154,7 +155,7 @@ void LLAvatarList::draw() // *NOTE dzaporozhan // Call refresh() after draw() to avoid flickering of avatar list items. - LLFlatListView::draw(); + LLFlatListViewEx::draw(); if (mDirty) refresh(); @@ -171,14 +172,20 @@ void LLAvatarList::clear() { getIDs().clear(); setDirty(true); - LLFlatListView::clear(); + LLFlatListViewEx::clear(); } void LLAvatarList::setNameFilter(const std::string& filter) { - if (mNameFilter != filter) + std::string filter_upper = filter; + LLStringUtil::toUpper(filter_upper); + if (mNameFilter != filter_upper) { - mNameFilter = filter; + mNameFilter = filter_upper; + + // update message for empty state here instead of refresh() to avoid blinking when switch + // between tabs. + updateNoItemsMessage(filter); setDirty(); } } @@ -309,9 +316,7 @@ void LLAvatarList::refresh() } // Send refresh_complete signal. - std::vector<LLSD> cur_values; - getValues(cur_values); - mRefreshCompleteSignal(this, LLSD((S32)cur_values.size())); + mRefreshCompleteSignal(this, LLSD((S32)size(false))); } // Commit if we've added/removed items. @@ -360,7 +365,7 @@ S32 LLAvatarList::notifyParent(const LLSD& info) sort(); return 1; } - return LLFlatListView::notifyParent(info); + return LLFlatListViewEx::notifyParent(info); } void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) @@ -400,7 +405,6 @@ void LLAvatarList::computeDifference( uuid_vec_t& vremoved) { uuid_vec_t vcur; - uuid_vec_t vnew = vnew_unsorted; // Convert LLSDs to LLUUIDs. { @@ -411,21 +415,7 @@ void LLAvatarList::computeDifference( vcur.push_back(vcur_values[i].asUUID()); } - std::sort(vcur.begin(), vcur.end()); - std::sort(vnew.begin(), vnew.end()); - - uuid_vec_t::iterator it; - size_t maxsize = llmax(vcur.size(), vnew.size()); - vadded.resize(maxsize); - vremoved.resize(maxsize); - - // what to remove - it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin()); - vremoved.erase(it, vremoved.end()); - - // what to add - it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin()); - vadded.erase(it, vadded.end()); + LLCommonUtils::computeDifference(vnew_unsorted, vcur, vadded, vremoved); } // Refresh shown time of our last interaction with all listed avatars. diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 528f796b8b..ff090f3a34 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -49,11 +49,11 @@ class LLTimer; * @see setDirty() * @see setNameFilter() */ -class LLAvatarList : public LLFlatListView +class LLAvatarList : public LLFlatListViewEx { LOG_CLASS(LLAvatarList); public: - struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> { Optional<bool> ignore_online_status, // show all items as online show_last_interaction_time, // show most recent interaction time. *HACK: move this to a derived class diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 2a51eeacfc..656274cb7a 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -36,12 +36,13 @@ #include "llavataractions.h" #include "llavatarlistitem.h" +#include "llbutton.h" #include "llfloaterreg.h" +#include "lluitextutil.h" + #include "llagent.h" -#include "lloutputmonitorctrl.h" #include "llavatariconctrl.h" -#include "lltextutil.h" -#include "llbutton.h" +#include "lloutputmonitorctrl.h" bool LLAvatarListItem::sStaticInitialized = false; S32 LLAvatarListItem::sLeftPadding = 0; diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4ebccbe731..226d5593c9 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -301,7 +301,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { - mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } } @@ -471,18 +471,13 @@ BOOL LLBottomTray::postBuild() mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); // Registering Chat Bar to receive Voice client status change notifications. - gVoiceClient->addObserver(this); - - mObjectDefaultWidthMap[RS_BUTTON_GESTURES] = mGesturePanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_MOVEMENT] = mMovementPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); - mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + LLVoiceClient::getInstance()->addObserver(this); mNearbyChatBar->getChatBox()->setContextMenu(NULL); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); - initStateProcessedObjectMap(); + initResizeStateContainers(); // update wells visibility: showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); @@ -711,27 +706,9 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) S32 buttons_freed_width = 0; if (still_should_be_processed) { - processShrinkButtons(&delta_width, &buttons_freed_width); + processShrinkButtons(delta_width, buttons_freed_width); - if (delta_width < 0) - { - processHideButton(RS_BUTTON_SNAPSHOT, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_CAMERA, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_MOVEMENT, &delta_width, &buttons_freed_width); - } - - if (delta_width < 0) - { - processHideButton(RS_BUTTON_GESTURES, &delta_width, &buttons_freed_width); - } + processHideButtons(delta_width, buttons_freed_width); if (delta_width < 0) { @@ -776,27 +753,10 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) << llendl; S32 available_width = total_available_width; - if (available_width > 0) - { - processShowButton(RS_BUTTON_GESTURES, &available_width); - } - - if (available_width > 0) - { - processShowButton(RS_BUTTON_MOVEMENT, &available_width); - } - - if (available_width > 0) - { - processShowButton(RS_BUTTON_CAMERA, &available_width); - } - if (available_width > 0) - { - processShowButton(RS_BUTTON_SNAPSHOT, &available_width); - } + processShowButtons(available_width); - processExtendButtons(&available_width); + processExtendButtons(available_width); // if we have to show/extend some buttons but resized delta width is not enough... S32 processed_width = total_available_width - available_width; @@ -853,7 +813,23 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) } } -bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* available_width) +void LLBottomTray::processShowButtons(S32& available_width) +{ + // process buttons from left to right + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + for (; it != it_end; ++it) + { + // is there available space? + if (available_width <= 0) break; + + // try to show next button + processShowButton(*it, available_width); + } +} + +bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { lldebugs << "Trying to show object type: " << shown_object_type << llendl; llassert(mStateProcessedObjectMap[shown_object_type] != NULL); @@ -869,15 +845,15 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa { //validate if we have enough room to show this button const S32 required_width = panel->getRect().getWidth(); - can_be_shown = *available_width >= required_width; + can_be_shown = available_width >= required_width; if (can_be_shown) { - *available_width -= required_width; + available_width -= required_width; setTrayButtonVisible(shown_object_type, true); lldebugs << "processed object type: " << shown_object_type - << ", rest available width: " << *available_width + << ", rest available width: " << available_width << llendl; mResizeState &= ~shown_object_type; } @@ -885,7 +861,23 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa return can_be_shown; } -void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_width) +{ + // process buttons from right to left + resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin(); + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend(); + + for (; it != it_end; ++it) + { + // is it still necessary to hide a button? + if (required_width >= 0) break; + + // try to hide next button + processHideButton(*it, required_width, buttons_freed_width); + } +} + +void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width) { lldebugs << "Trying to hide object type: " << processed_object_type << llendl; llassert(mStateProcessedObjectMap[processed_object_type] != NULL); @@ -899,11 +891,11 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re if (panel->getVisible()) { - *required_width += panel->getRect().getWidth(); + required_width += panel->getRect().getWidth(); - if (*required_width > 0) + if (required_width > 0) { - *buttons_freed_width += *required_width; + buttons_freed_width += required_width; } setTrayButtonVisible(processed_object_type, false); @@ -911,24 +903,29 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re mResizeState |= processed_object_type; lldebugs << "processing object type: " << processed_object_type - << ", buttons_freed_width: " << *buttons_freed_width + << ", buttons_freed_width: " << buttons_freed_width << llendl; } } -void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_width) { - processShrinkButton(RS_BUTTON_CAMERA, required_width); + // process buttons from right to left + resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin(); + const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend(); - if (*required_width < 0) - { - processShrinkButton(RS_BUTTON_MOVEMENT, required_width); - } - if (*required_width < 0) + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) { - processShrinkButton(RS_BUTTON_GESTURES, required_width); + // is it still necessary to hide a button? + if (required_width >= 0) break; + + // try to shrink next button + processShrinkButton(*it, required_width); } - if (*required_width < 0) + + // then shrink Speak button + if (required_width < 0) { S32 panel_min_width = 0; @@ -948,23 +945,23 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ mSpeakBtn->setLabelVisible(false); mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight()); - *required_width += possible_shrink_width; + required_width += possible_shrink_width; - if (*required_width > 0) + if (required_width > 0) { - *buttons_freed_width += *required_width; + buttons_freed_width += required_width; } - lldebugs << "Shrunk panel: " << panel_name + lldebugs << "Shrunk Speak button panel: " << panel_name << ", shrunk width: " << possible_shrink_width - << ", rest width to process: " << *required_width + << ", rest width to process: " << required_width << llendl; } } } } -void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* required_width) +void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width) { llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; @@ -992,63 +989,68 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* // let calculate real width to shrink // 1. apply all possible width - *required_width += possible_shrink_width; + required_width += possible_shrink_width; // 2. it it is too much... - if (*required_width > 0) + if (required_width > 0) { // reduce applied shrunk width to the excessive value. - possible_shrink_width -= *required_width; - *required_width = 0; + possible_shrink_width -= required_width; + required_width = 0; } panel->reshape(panel_width - possible_shrink_width, panel->getRect().getHeight()); lldebugs << "Shrunk panel: " << panel_name << ", shrunk width: " << possible_shrink_width - << ", rest width to process: " << *required_width + << ", rest width to process: " << required_width << llendl; } } } -void LLBottomTray::processExtendButtons(S32* available_width) +void LLBottomTray::processExtendButtons(S32& available_width) { - // do not allow extending any buttons if we have some buttons hidden + // do not allow extending any buttons if we have some buttons hidden via resize if (mResizeState & RS_BUTTONS_CAN_BE_HIDDEN) return; - processExtendButton(RS_BUTTON_GESTURES, available_width); + // process buttons from left to right + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - if (*available_width > 0) - { - processExtendButton(RS_BUTTON_MOVEMENT, available_width); - } - if (*available_width > 0) + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) { - processExtendButton(RS_BUTTON_CAMERA, available_width); + // is there available space? + if (available_width <= 0) break; + + // try to extend next button + processExtendButton(*it, available_width); } - if (*available_width > 0) + + // then try to extend Speak button + if (available_width > 0) { S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; S32 panel_width = mSpeakPanel->getRect().getWidth(); S32 possible_extend_width = panel_max_width - panel_width; - if (possible_extend_width >= 0 && possible_extend_width <= *available_width) // HACK: this button doesn't change size so possible_extend_width will be 0 + if (possible_extend_width >= 0 && possible_extend_width <= available_width) // HACK: this button doesn't change size so possible_extend_width will be 0 { mSpeakBtn->setLabelVisible(true); mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); log(mSpeakBtn, "speak button is extended"); - *available_width -= possible_extend_width; + available_width -= possible_extend_width; - lldebugs << "Extending panel: " << mSpeakPanel->getName() + lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() << ", extended width: " << possible_extend_width - << ", rest width to process: " << *available_width + << ", rest width to process: " << available_width << llendl; } } } -void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* available_width) +void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) { llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; @@ -1069,20 +1071,20 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* // let calculate real width to extend // 1. apply all possible width - *available_width -= possible_extend_width; + available_width -= possible_extend_width; // 2. it it is too much... - if (*available_width < 0) + if (available_width < 0) { // reduce applied extended width to the excessive value. - possible_extend_width += *available_width; - *available_width = 0; + possible_extend_width += available_width; + available_width = 0; } panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight()); lldebugs << "Extending panel: " << panel->getName() << ", extended width: " << possible_extend_width - << ", rest width to process: " << *available_width + << ", rest width to process: " << available_width << llendl; } } @@ -1116,17 +1118,25 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const return can_be_shown; } -void LLBottomTray::initStateProcessedObjectMap() +void LLBottomTray::initResizeStateContainers() { + // init map with objects should be processed for each type mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, mGesturePanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); - mDummiesMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLUICtrl>("after_gesture_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLUICtrl>("after_movement_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLUICtrl>("after_cam_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild<LLUICtrl>("after_speak_panel"))); + // init default widths + mObjectDefaultWidthMap[RS_BUTTON_GESTURES] = mGesturePanel->getRect().getWidth(); + mObjectDefaultWidthMap[RS_BUTTON_MOVEMENT] = mMovementPanel->getRect().getWidth(); + mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); + mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + + // init an order of processed buttons + mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); + mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); + mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); + mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT); } void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) @@ -1140,12 +1150,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); - - if (mDummiesMap.count(shown_object_type)) - { - // Hide/show layout panel for dummy icon. - mDummiesMap[shown_object_type]->getParent()->setVisible(visible); - } } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1168,20 +1172,13 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return false; } - const S32 dummy_width = mDummiesMap.count(object_type) - ? mDummiesMap[object_type]->getParent()->getRect().getWidth() - : 0; - bool is_set = true; if (visible) { - // Assume that only chiclet panel can be auto-resized and - // don't take into account width of dummy widgets + // Assume that only chiclet panel can be auto-resized const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - - mChicletPanel->getMinWidth() - - dummy_width; + mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); @@ -1244,12 +1241,12 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible current_width = result_width; } - is_set = processShowButton(object_type, ¤t_width); + is_set = processShowButton(object_type, current_width); // Shrink buttons if needed if (is_set && decrease_width) { - processWidthDecreased( -result_width - dummy_width ); + processWidthDecreased( -result_width); } } else @@ -1264,7 +1261,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Extend other buttons if need if (delta_width) { - processWidthIncreased(delta_width + dummy_width); + processWidthIncreased(delta_width); } } return is_set; diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 8395b484cf..e9d59e82ba 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -128,29 +128,131 @@ private: , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES }EResizeState; + /** + * Updates child controls size and visibility when it is necessary to reduce total width. + * + * Process order: + * - reduce chiclet panel to its minimal width; + * - reduce chatbar to its minimal width; + * - reduce visible buttons from right to left to their minimal width; + * - hide visible buttons from right to left; + * When button is hidden chatbar extended to fill released space if it is necessary. + * + * @param[in] delta_width - value by which bottom tray should be shrunk. It is a negative value. + * @return positive value which bottom tray can not process when it reaches its minimal width. + * Zero if there was enough space to process delta_width. + */ S32 processWidthDecreased(S32 delta_width); + + /** + * Updates child controls size and visibility when it is necessary to extend total width. + * + * Process order: + * - show invisible buttons should be shown from left to right if possible; + * - extend visible buttons from left to right to their default width; + * - extend chatbar to its maximal width; + * - extend chiclet panel to all available space; + * When chatbar & chiclet panels are wider then their minimal width they can be reduced to allow + * a button gets visible in case if passed delta_width is not enough (chatbar first). + * + * @param[in] delta_width - value by which bottom tray should be extended. It is a positive value. + */ void processWidthIncreased(S32 delta_width); + + /** helper function to log debug messages */ void log(LLView* panel, const std::string& descr); - bool processShowButton(EResizeState shown_object_type, S32* available_width); - void processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width); + + /** + * Tries to show hidden by resize buttons using available width. + * + * Gets buttons visible if there is enough space. Reduces available_width in this case. + * + * @params[in, out] available_width - reference to available width to be used to show buttons. + * @see processShowButton() + */ + void processShowButtons(S32& available_width); + + /** + * Tries to show panel with specified button using available width. + * + * Shows button specified by type if there is enough space. Reduces available_width in this case. + * + * @params[in] shown_object_type - type of button to be shown. + * @params[in, out] available_width - reference to available width to be used to show button. + * + * @return true if button can be shown, false otherwise + */ + bool processShowButton(EResizeState shown_object_type, S32& available_width); + + /** + * Hides visible panels with all buttons that may be hidden by resize if it is necessary. + * + * When button gets hidden some space is released in bottom tray. + * This space is taken into account for several consecutive calls for several buttons. + * + * @params[in, out] required_width - reference to required width to be released. This is a negative value. + * Its absolute value is decreased by shown panel width. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If panel's width is more than required difference is added to buttons_freed_width. + * @see processHideButton() + */ + void processHideButtons(S32& required_width, S32& buttons_freed_width); + + /** + * Hides panel with specified button if it is visible. + * + * When button gets hidden some space is released in bottom tray. + * This space is taken into account for several consecutive calls for several buttons. + * + * @params[in] processed_object_type - type of button to be hide. + * @params[in, out] required_width - reference to required width to be released. This is a negative value. + * Its absolute value is decreased by panel width. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If panel's width is more than required difference is added to buttons_freed_width. + */ + void processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width); /** * Shrinks shown buttons to reduce total taken space. * - * @param - required_width - width which buttons can use to be shrunk. It is a negative value. + * Shrinks buttons that may be shrunk smoothly first. Then shrinks Speak button. + * + * @param[in, out] required_width - reference to width value which should be released when buttons are shrunk. It is a negative value. * It is increased on the value processed by buttons. + * @params[in, out] buttons_freed_width - reference to value released over required one. + * If width of panel with Speak button is more than required that difference is added + * to buttons_freed_width. + * This is because Speak button shrinks discretely unlike other buttons which are changed smoothly. + */ + void processShrinkButtons(S32& required_width, S32& buttons_freed_width); + + /** + * Shrinks panel with specified button if it is visible. + * + * @params[in] processed_object_type - type of button to be shrunk. + * @param[in, out] required_width - reference to width value which should be released when button is shrunk. It is a negative value. + * It is increased on the value released by the button. */ - void processShrinkButtons(S32* required_width, S32* buttons_freed_width); - void processShrinkButton(EResizeState processed_object_type, S32* required_width); + void processShrinkButton(EResizeState processed_object_type, S32& required_width); /** * Extends shown buttons to increase total taken space. * - * @param - available_width - width which buttons can use to be extended. It is a positive value. - * It is decreased on the value processed by buttons. + * Extends buttons that may be extended smoothly first. Then extends Speak button. + * + * @param[in, out] available_width - reference to width value which buttons can use to be extended. + * It is a positive value. It is decreased on the value processed by buttons. + */ + void processExtendButtons(S32& available_width); + + /** + * Extends shown button to increase total taken space. + * + * @params[in] processed_object_type - type of button to be extended. + * @param[in, out] available_width - reference to width value which button can use to be extended. + * It is a positive value. It is decreased on the value processed by buttons. */ - void processExtendButtons(S32* available_width); - void processExtendButton(EResizeState processed_object_type, S32* available_width); + void processExtendButton(EResizeState processed_object_type, S32& available_width); /** * Determines if specified by type object can be shown. It should be hidden by shrink before. @@ -159,7 +261,15 @@ private: * - Gestures, Move, View, Snapshot */ bool canButtonBeShown(EResizeState processed_object_type) const; - void initStateProcessedObjectMap(); + + /** + * Initializes all containers stored data related to children resize state. + * + * @see mStateProcessedObjectMap + * @see mObjectDefaultWidthMap + * @see mButtonsProcessOrder + */ + void initResizeStateContainers(); /** * Sets passed visibility to object specified by resize type. @@ -205,8 +315,12 @@ private: typedef std::map<EResizeState, S32> state_object_width_map_t; state_object_width_map_t mObjectDefaultWidthMap; - typedef std::map<EResizeState, LLUICtrl*> dummies_map_t; - dummies_map_t mDummiesMap; + typedef std::vector<EResizeState> resize_state_vec_t; + + /** + * Contains order in which child buttons should be processed in show/hide, extend/shrink methods. + */ + resize_state_vec_t mButtonsProcessOrder; protected: diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index d15c5f9bf4..dd99c6564c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -133,7 +133,7 @@ LLCallFloater::~LLCallFloater() if(LLVoiceClient::instanceExists()) { - LLVoiceClient::instance().removeObserver(this); + LLVoiceClient::getInstance()->removeObserver(this); } LLTransientFloaterMgr::getInstance()->removeControlView(this); } @@ -207,7 +207,6 @@ void LLCallFloater::draw() void LLCallFloater::onChange() { if (NULL == mParticipants) return; - updateParticipantsVoiceState(); // Add newly joined participants. @@ -228,7 +227,7 @@ void LLCallFloater::leaveCall() LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); if (voice_channel) { - voice_channel->deactivate(); + gIMMgr->endCall(voice_channel->getSessionID()); } } @@ -237,11 +236,11 @@ void LLCallFloater::updateSession() LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); if (voice_channel) { - lldebugs << "Current voice channel: " << voice_channel->getSessionID() << llendl; + LL_DEBUGS("Voice") << "Current voice channel: " << voice_channel->getSessionID() << LL_ENDL; if (mSpeakerManager && voice_channel->getSessionID() == mSpeakerManager->getSessionID()) { - lldebugs << "Speaker manager is already set for session: " << voice_channel->getSessionID() << llendl; + LL_DEBUGS("Voice") << "Speaker manager is already set for session: " << voice_channel->getSessionID() << LL_ENDL; return; } else @@ -251,7 +250,6 @@ void LLCallFloater::updateSession() } const LLUUID& session_id = voice_channel ? voice_channel->getSessionID() : LLUUID::null; - lldebugs << "Set speaker manager for session: " << session_id << llendl; LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); if (im_session) @@ -291,7 +289,7 @@ void LLCallFloater::updateSession() { // by default let show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); - lldebugs << "Set DEFAULT speaker manager" << llendl; + LL_DEBUGS("Voice") << "Set DEFAULT speaker manager" << LL_ENDL; mVoiceType = VC_LOCAL_CHAT; } @@ -470,16 +468,15 @@ void LLCallFloater::updateAgentModeratorState() static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) { // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList(); - if (voice_map) + std::set<LLUUID> participants; + LLVoiceClient::getInstance()->getParticipantList(participants); + + for (std::set<LLUUID>::const_iterator iter = participants.begin(); + iter != participants.end(); ++iter) { - for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); - iter != voice_map->end(); ++iter) - { - LLUUID id = (*iter).second->mAvatarID; - speakers_uuids.push_back(id); - } + speakers_uuids.push_back(*iter); } + } void LLCallFloater::initParticipantsVoiceState() @@ -555,7 +552,7 @@ void LLCallFloater::updateParticipantsVoiceState() uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); - lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; + LL_DEBUGS("Voice") << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << LL_ENDL; // If an avatarID assigned to a panel is found in a speakers list // obtained from VoiceClient we assign the JOINED status to the owner @@ -728,7 +725,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { // check is voice operational and if it doesn't work hide VCP (EXT-4397) - if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking()) + if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { updateState(new_state); } diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 79a2631c31..1a6c11fa73 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -700,6 +700,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) args["FIRST"] = first; args["LAST"] = last; } + } } else diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 769387c26c..fafa315a59 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -35,6 +35,7 @@ #include "llchannelmanager.h" #include "llappviewer.h" +#include "llnotificationstorage.h" #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llrootview.h" @@ -107,31 +108,35 @@ void LLChannelManager::onLoginCompleted() if(!away_notifications) { onStartUpToastClose(); - return; } - - // create a channel for the StartUp Toast - LLChannelManager::Params p; - p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); - p.channel_align = CA_RIGHT; - mStartUpChannel = createChannel(p); - - if(!mStartUpChannel) + else { - onStartUpToastClose(); - return; - } + // create a channel for the StartUp Toast + LLChannelManager::Params p; + p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); + p.channel_align = CA_RIGHT; + mStartUpChannel = createChannel(p); - gViewerWindow->getRootView()->addChild(mStartUpChannel); + if(!mStartUpChannel) + { + onStartUpToastClose(); + } + else + { + gViewerWindow->getRootView()->addChild(mStartUpChannel); - // init channel's position and size - S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); - S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + // init channel's position and size + S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); + S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); + mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); + mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); - mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); - mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); + mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); + mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); + } + } + + LLPersistentNotificationStorage::getInstance()->loadNotifications(); } //-------------------------------------------------------------------------- @@ -238,3 +243,19 @@ void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLS } } +// static +LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChannel() +{ + LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + + if (channel == NULL) + { + llwarns << "Can't find screen channel by NotificationChannelUUID" << llendl; + llassert(!"Can't find screen channel by NotificationChannelUUID"); + } + + return channel; +} + diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index c2be39122f..8c725f2660 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -114,6 +114,11 @@ public: */ void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher); + /** + * Returns notification screen channel. + */ + static LLNotificationsUI::LLScreenChannel* getNotificationScreenChannel(); + private: LLScreenChannel* createChannel(LLChannelManager::Params& p); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 68c31d87fa..31feabe722 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -647,20 +647,19 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); + std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); url += "?name=" + chat.mFromName; url += "&owner=" + args["owner_id"].asString(); std::string slurl = args["slurl"].asString(); if (slurl.empty()) { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if (region) - { - S32 x, y, z; - LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); - slurl = region->getName() + llformat("/%d/%d/%d", x, y, z); - } + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } } url += "&slurl=" + slurl; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index aef36b677c..5b6a99e793 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -44,6 +44,8 @@ #include "llviewercontrol.h" #include "llagentdata.h" +#include "llslurl.h" + static const S32 msg_left_offset = 10; static const S32 msg_right_offset = 10; static const S32 msg_height_pad = 5; @@ -190,6 +192,8 @@ void LLNearbyChatToastPanel::init(LLSD& notification) style_params_name.font.name(font_name); style_params_name.font.size(font_style_size); + style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString(); + msg_text->appendText(str_sender, FALSE, style_params_name); } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 05d3d70c74..6897f4ee8e 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -183,20 +183,6 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - setNewMessagesState(counter > mCounter); - - // we have to flash to 'Lit' state each time new unread message is coming. - 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; } @@ -316,7 +302,26 @@ void LLIMWellChiclet::createMenu() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); + const LLUUID& session_id = session_data["session_id"]; + const S32 counter = LLBottomTray::getInstance()->getTotalUnreadIMCount(); + const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container") + && !LLFloaterReg::instanceVisible("impanel", session_id); + + setNewMessagesState(counter > mCounter && im_not_visible); + + // we have to flash to 'Lit' state each time new unread message is coming. + if (counter > mCounter && im_not_visible) + { + 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(); + } + + setCounter(counter); } /************************************************************************/ @@ -465,6 +470,7 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) , mSpeakerCtrl(NULL) , mCounterCtrl(NULL) , mChicletButton(NULL) +, mPopupMenu(NULL) { enableCounterControl(p.enable_counter); } @@ -648,6 +654,37 @@ LLIMChiclet::EType LLIMChiclet::getIMSessionType(const LLUUID& session_id) return type; } +BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + if(!mPopupMenu) + { + createPopupMenu(); + } + + if (mPopupMenu) + { + updateMenuItems(); + mPopupMenu->arrangeAndClear(); + LLMenuGL::showPopup(this, mPopupMenu, x, y); + } + + return TRUE; +} + +bool LLIMChiclet::canCreateMenu() +{ + if(mPopupMenu) + { + llwarns << "Menu already exists" << llendl; + return false; + } + if(getSessionId().isNull()) + { + return false; + } + return true; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -665,7 +702,6 @@ LLIMP2PChiclet::Params::Params() LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -720,34 +756,10 @@ void LLIMP2PChiclet::updateMenuItems() mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend); } -BOOL LLIMP2PChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - updateMenuItems(); - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - void LLIMP2PChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; + if(!canCreateMenu()) return; - } - if(getSessionId().isNull()) - { - return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLIMP2PChiclet::onMenuItemClicked, this, _2)); @@ -797,7 +809,6 @@ LLAdHocChiclet::Params::Params() LLAdHocChiclet::LLAdHocChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -867,15 +878,8 @@ void LLAdHocChiclet::switchToCurrentSpeaker() void LLAdHocChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - if(getSessionId().isNull()) - { + if(!canCreateMenu()) return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLAdHocChiclet::onMenuItemClicked, this, _2)); @@ -895,22 +899,6 @@ void LLAdHocChiclet::onMenuItemClicked(const LLSD& user_data) } } -BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -929,7 +917,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) : LLIMChiclet(p) , LLGroupMgrObserver(LLUUID::null) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -1042,34 +1029,10 @@ void LLIMGroupChiclet::updateMenuItems() mPopupMenu->getChild<LLUICtrl>("Chat")->setEnabled(!open_window_exists); } -BOOL LLIMGroupChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - updateMenuItems(); - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - void LLIMGroupChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - if(getSessionId().isNull()) - { + if(!canCreateMenu()) return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLIMGroupChiclet::onMenuItemClicked, this, _2)); @@ -1917,6 +1880,28 @@ void LLScriptChiclet::onMouseDown() LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); } +void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + + if("end" == action) + { + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); + } +} + +void LLScriptChiclet::createPopupMenu() +{ + if(!canCreateMenu()) + return; + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("ScriptChiclet.Action", boost::bind(&LLScriptChiclet::onMenuItemClicked, this, _2)); + + mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> + ("menu_script_chiclet.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -1978,4 +1963,26 @@ void LLInvOfferChiclet::onMouseDown() LLScriptFloaterManager::instance().toggleScriptFloater(getSessionId()); } +void LLInvOfferChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + + if("end" == action) + { + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); + } +} + +void LLInvOfferChiclet::createPopupMenu() +{ + if(!canCreateMenu()) + return; + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("InvOfferChiclet.Action", boost::bind(&LLInvOfferChiclet::onMenuItemClicked, this, _2)); + + mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> + ("menu_inv_offer_chiclet.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +} + // EOF diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 97f494b817..9d421b4f0b 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -428,12 +428,31 @@ public: virtual void setToggleState(bool toggle); + /** + * Displays popup menu. + */ + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + protected: LLIMChiclet(const LLIMChiclet::Params& p); protected: + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu() = 0; + + /** + * Enables/disables menus. + */ + virtual void updateMenuItems() {}; + + bool canCreateMenu(); + + LLMenuGL* mPopupMenu; + bool mShowSpeaker; bool mCounterEnabled; /* initial width of chiclet, should not include counter or speaker width */ @@ -519,11 +538,6 @@ protected: */ virtual void onMenuItemClicked(const LLSD& user_data); - /** - * Displays popup menu. - */ - /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - /** * Enables/disables menus based on relationship with other participant. * Enables/disables "show session" menu item depending on visible IM floater existence. @@ -533,7 +547,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -598,11 +611,6 @@ protected: virtual void onMenuItemClicked(const LLSD& user_data); /** - * Displays popup menu. - */ - virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - - /** * Finds a current speaker and resets the SpeakerControl with speaker's ID */ /*virtual*/ void switchToCurrentSpeaker(); @@ -610,7 +618,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -647,6 +654,16 @@ protected: LLScriptChiclet(const Params&); friend class LLUICtrlFactory; + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu(); + + /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + private: LLIconCtrl* mChicletIconCtrl; @@ -685,6 +702,16 @@ protected: LLInvOfferChiclet(const Params&); friend class LLUICtrlFactory; + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu(); + + /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + private: LLChicletInvOfferIconCtrl* mChicletIconCtrl; }; @@ -767,15 +794,9 @@ protected: */ virtual void updateMenuItems(); - /** - * Displays popup menu. - */ - /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - private: LLChicletGroupIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -900,6 +921,9 @@ protected: class LLNotificationChiclet : public LLSysWellChiclet { friend class LLUICtrlFactory; +public: + struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{}; + protected: LLNotificationChiclet(const Params& p); diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp new file mode 100644 index 0000000000..8d4430a9ea --- /dev/null +++ b/indra/newview/llcofwearables.cpp @@ -0,0 +1,326 @@ +/** + * @file llcofwearables.cpp + * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts) + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llcofwearables.h" + +#include "llagentdata.h" +#include "llappearancemgr.h" +#include "llinventory.h" +#include "llinventoryfunctions.h" +#include "llwearableitemslist.h" + +static LLRegisterPanelClassWrapper<LLCOFAccordionListAdaptor> t_cof_accodion_list_adaptor("accordion_list_adaptor"); + +static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables"); + +const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); + +static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; + + +bool LLWearableItemNameComparator::doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const +{ + std::string name1 = wearable_item1->getItemName(); + std::string name2 = wearable_item2->getItemName(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + + +LLCOFWearables::LLCOFWearables() : LLPanel(), + mAttachments(NULL), + mClothing(NULL), + mBodyParts(NULL), + mLastSelectedList(NULL) +{ +}; + + +// virtual +BOOL LLCOFWearables::postBuild() +{ + mAttachments = getChild<LLFlatListView>("list_attachments"); + mClothing = getChild<LLFlatListView>("list_clothing"); + mBodyParts = getChild<LLFlatListView>("list_body_parts"); + + + //selection across different list/tabs is not supported + mAttachments->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mAttachments)); + mClothing->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mClothing)); + mBodyParts->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mBodyParts)); + + mAttachments->setCommitOnSelectionChange(true); + mClothing->setCommitOnSelectionChange(true); + mBodyParts->setCommitOnSelectionChange(true); + + //clothing is sorted according to its position relatively to the body + mAttachments->setComparator(&WEARABLE_NAME_COMPARATOR); + mBodyParts->setComparator(&WEARABLE_NAME_COMPARATOR); + + return LLPanel::postBuild(); +} + +void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list) +{ + if (!selected_list) return; + + if (selected_list != mLastSelectedList) + { + if (selected_list != mAttachments) mAttachments->resetSelection(true); + if (selected_list != mClothing) mClothing->resetSelection(true); + if (selected_list != mBodyParts) mBodyParts->resetSelection(true); + + mLastSelectedList = selected_list; + } + + onCommit(); +} + +void LLCOFWearables::refresh() +{ + typedef std::vector<LLSD> values_vector_t; + typedef std::map<LLFlatListView*, values_vector_t> selection_map_t; + + selection_map_t preserve_selection; + + // Save current selection + mAttachments->getSelectedValues(preserve_selection[mAttachments]); + mClothing->getSelectedValues(preserve_selection[mClothing]); + mBodyParts->getSelectedValues(preserve_selection[mBodyParts]); + + clear(); + + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t cof_items; + + gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); + + populateAttachmentsAndBodypartsLists(cof_items); + + + LLAppearanceMgr::wearables_by_type_t clothing_by_type(LLWearableType::WT_COUNT); + LLAppearanceMgr::getInstance()->divvyWearablesByType(cof_items, clothing_by_type); + + populateClothingList(clothing_by_type); + + // Restore previous selection + for (selection_map_t::iterator + iter = preserve_selection.begin(), + iter_end = preserve_selection.end(); + iter != iter_end; ++iter) + { + LLFlatListView* list = iter->first; + const values_vector_t& values = iter->second; + for (values_vector_t::const_iterator + value_it = values.begin(), + value_it_end = values.end(); + value_it != value_it_end; ++value_it) + { + list->selectItemByValue(*value_it); + } + } +} + + +void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items) +{ + for (U32 i = 0; i < cof_items.size(); ++i) + { + LLViewerInventoryItem* item = cof_items.get(i); + if (!item) continue; + + const LLAssetType::EType item_type = item->getType(); + if (item_type == LLAssetType::AT_CLOTHING) continue; + LLPanelInventoryListItemBase* item_panel = NULL; + if (item_type == LLAssetType::AT_OBJECT) + { + item_panel = buildAttachemntListItem(item); + mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); + } + else if (item_type == LLAssetType::AT_BODYPART) + { + item_panel = buildBodypartListItem(item); + if (!item_panel) continue; + + mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); + } + } + + if (mAttachments->size()) + { + mAttachments->sort(); + mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) + } + + if (mBodyParts->size()) + { + mBodyParts->sort(); + mBodyParts->notify(REARRANGE); + } +} + +//create a clothing list item, update verbs and show/hide line separator +LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last) +{ + llassert(item); + + LLPanelClothingListItem* item_panel = LLPanelClothingListItem::create(item); + if (!item_panel) return NULL; + + //updating verbs + //we don't need to use permissions of a link but of an actual/linked item + if (item->getLinkedItem()) item = item->getLinkedItem(); + + bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); + + item_panel->setShowLockButton(!allow_modify); + item_panel->setShowEditButton(allow_modify); + + item_panel->setShowMoveUpButton(!first); + item_panel->setShowMoveDownButton(!last); + + //setting callbacks + //*TODO move that item panel's inner structure disclosing stuff into the panels + item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); + item_panel->childSetAction("btn_move_up", mCOFCallbacks.mMoveWearableFurther); + item_panel->childSetAction("btn_move_down", mCOFCallbacks.mMoveWearableCloser); + item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); + + //turning on gray separator line for the last item in the items group of the same wearable type + item_panel->childSetVisible("wearable_type_separator_panel", last); + + return item_panel; +} + +LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventoryItem* item) +{ + llassert(item); + + LLPanelBodyPartsListItem* item_panel = LLPanelBodyPartsListItem::create(item); + if (!item_panel) return NULL; + + //updating verbs + //we don't need to use permissions of a link but of an actual/linked item + if (item->getLinkedItem()) item = item->getLinkedItem(); + + bool allow_modify = item->getPermissions().allowModifyBy(gAgentID); + item_panel->setShowLockButton(!allow_modify); + item_panel->setShowEditButton(allow_modify); + + //setting callbacks + //*TODO move that item panel's inner structure disclosing stuff into the panels + item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); + item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); + + return item_panel; +} + +LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLViewerInventoryItem* item) +{ + llassert(item); + if (!item) return NULL; + + LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); + if (!item_panel) return NULL; + + //setting callbacks + //*TODO move that item panel's inner structure disclosing stuff into the panels + item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable); + + return item_panel; +} + +void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type) +{ + llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); + + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; ++type) + { + U32 size = clothing_by_type[type].size(); + if (!size) continue; + + LLAppearanceMgr::sortItemsByActualDescription(clothing_by_type[type]); + + //clothing items are displayed in reverse order, from furthest ones to closest ones (relatively to the body) + for (U32 i = size; i != 0; --i) + { + LLViewerInventoryItem* item = clothing_by_type[type][i-1]; + + LLPanelClothingListItem* item_panel = buildClothingListItem(item, i == size, i == 1); + if (!item_panel) continue; + + mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false); + } + } + + addClothingTypesDummies(clothing_by_type); + + mClothing->notify(REARRANGE); +} + +//adding dummy items for missing wearable types +void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type) +{ + llassert(clothing_by_type.size() == LLWearableType::WT_COUNT); + + for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) + { + U32 size = clothing_by_type[type].size(); + if (size) continue; + + LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type); + LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type); + if(!item_panel) continue; + mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false); + } +} + +LLUUID LLCOFWearables::getSelectedUUID() +{ + if (!mLastSelectedList) return LLUUID::null; + + return mLastSelectedList->getSelectedUUID(); +} + +void LLCOFWearables::clear() +{ + mAttachments->clear(); + mClothing->clear(); + mBodyParts->clear(); +} + +//EOF diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h new file mode 100644 index 0000000000..612bb103d2 --- /dev/null +++ b/indra/newview/llcofwearables.h @@ -0,0 +1,195 @@ +/** + * @file llcofwearables.h + * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts) + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLCOFWEARABLES_H +#define LL_LLCOFWEARABLES_H + +#include "llpanel.h" +#include "llinventorymodel.h" +#include "llappearancemgr.h" +#include "llwearableitemslist.h" + +class LLFlatListView; + + +/** Abstract comparator of wearable list items */ +class LLWearableListItemComparator : public LLFlatListView::ItemComparator +{ + LOG_CLASS(LLWearableListItemComparator); + +public: + LLWearableListItemComparator() {}; + virtual ~LLWearableListItemComparator() {}; + + virtual bool compare(const LLPanel* item1, const LLPanel* item2) const + { + const LLPanelWearableListItem* wearable_item1 = dynamic_cast<const LLPanelWearableListItem*>(item1); + const LLPanelWearableListItem* wearable_item2 = dynamic_cast<const LLPanelWearableListItem*>(item2); + + if (!wearable_item1 || !wearable_item2) + { + llwarning("item1 and item2 cannot be null", 0); + return true; + } + + return doCompare(wearable_item1, wearable_item2); + } + +protected: + + /** + * Returns true if wearable_item1 < wearable_item2, false otherwise + * Implement this method in your particular comparator. + */ + virtual bool doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const = 0; +}; + + +class LLWearableItemNameComparator : public LLWearableListItemComparator +{ + LOG_CLASS(LLWearableItemNameComparator); + +public: + LLWearableItemNameComparator() {}; + virtual ~LLWearableItemNameComparator() {}; + +protected: + virtual bool doCompare(const LLPanelWearableListItem* wearable_item1, const LLPanelWearableListItem* wearable_item2) const; +}; + + +/** + * Adaptor between LLAccordionCtrlTab and LLFlatListView to facilitate communication between them + * (notify, notifyParent) regarding size changes of a list and selection changes across accordion tabs. + * Besides that it acts as a container for the LLFlatListView and a button bar on top of it. + */ +class LLCOFAccordionListAdaptor : public LLPanel +{ +public: + LLCOFAccordionListAdaptor() : LLPanel() {}; + ~LLCOFAccordionListAdaptor() {}; + + S32 notifyParent(const LLSD& info) + { + LLView* parent = getParent(); + if (!parent) return -1; + + if (!(info.has("action") && "size_changes" == info["action"].asString())) + { + return parent->notifyParent(info); + } + + LLRect rc; + childGetRect("button_bar", rc); + + LLSD params; + params["action"] = "size_changes"; + params["width"] = info["width"]; + params["height"] = info["height"].asInteger() + rc.getHeight(); + + return parent->notifyParent(params); + } + + + S32 notify(const LLSD& info) + { + for (child_list_const_iter_t iter = beginChild(); iter != endChild(); iter++) + { + if (dynamic_cast<LLFlatListView*>(*iter)) + { + return (*iter)->notify(info); + } + } + return LLPanel::notify(info); + }; +}; + + +class LLCOFWearables : public LLPanel +{ +public: + + /** + * Represents a collection of callbacks assigned to inventory panel item's buttons + */ + class LLCOFCallbacks + { + public: + LLCOFCallbacks() {}; + virtual ~LLCOFCallbacks() {}; + + typedef boost::function<void (void*)> cof_callback_t; + + cof_callback_t mMoveWearableCloser; + cof_callback_t mMoveWearableFurther; + cof_callback_t mEditWearable; + cof_callback_t mDeleteWearable; + }; + + + + LLCOFWearables(); + virtual ~LLCOFWearables() {}; + + /*virtual*/ BOOL postBuild(); + + LLUUID getSelectedUUID(); + + void refresh(); + void clear(); + + LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; } + +protected: + + void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); + void populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type); + + void addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type); + void onSelectionChange(LLFlatListView* selected_list); + + LLPanelClothingListItem* buildClothingListItem(LLViewerInventoryItem* item, bool first, bool last); + LLPanelBodyPartsListItem* buildBodypartListItem(LLViewerInventoryItem* item); + LLPanelDeletableWearableListItem* buildAttachemntListItem(LLViewerInventoryItem* item); + + LLFlatListView* mAttachments; + LLFlatListView* mClothing; + LLFlatListView* mBodyParts; + + LLFlatListView* mLastSelectedList; + + LLCOFCallbacks mCOFCallbacks; + +}; + + +#endif diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index be6c15eab4..fd3df359bd 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -284,7 +284,7 @@ void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, static std::string transactionURI; if (transactionURI.empty()) { - transactionURI = LLViewerLogin::getInstance()->getHelperURI() + "currency.php"; + transactionURI = LLGridManager::getInstance()->getHelperURI() + "currency.php"; } delete mTransaction; diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index ebd767d654..40ce0ebcf4 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -534,7 +534,7 @@ void LLDriverParam::resetDrivenParams() mDriven.reserve(getInfo()->mDrivenInfoList.size()); } -void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type) +void LLDriverParam::updateCrossDrivenParams(LLWearableType::EType driven_type) { bool needs_update = (getWearableType()==driven_type); @@ -551,7 +551,7 @@ void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type) if (needs_update) { - EWearableType driver_type = (EWearableType)getWearableType(); + LLWearableType::EType driver_type = (LLWearableType::EType)getWearableType(); // If we've gotten here, we've added a new wearable of type "type" // Thus this wearable needs to get updates from the driver wearable. diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index e963a2d55a..1069f7ad51 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -34,7 +34,7 @@ #define LL_LLDRIVERPARAM_H #include "llviewervisualparam.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" class LLVOAvatar; class LLWearable; @@ -94,7 +94,7 @@ public: void setWearable(LLWearable *wearablep); void setAvatar(LLVOAvatar *avatarp); - void updateCrossDrivenParams(EWearableType driven_type); + void updateCrossDrivenParams(LLWearableType::EType driven_type); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 4c1e3461a5..6b7a257a4b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1165,6 +1165,17 @@ void LLFavoritesBarCtrl::pastFromClipboard() const void LLFavoritesBarCtrl::onButtonMouseDown(LLUUID id, LLUICtrl* ctrl, S32 x, S32 y, MASK mask) { + // EXT-6997 (Fav bar: Pop-up menu for LM in overflow dropdown is kept after LM was dragged away) + // mInventoryItemsPopupMenuHandle.get() - is a pop-up menu (of items) in already opened dropdown menu. + // We have to check and set visibility of pop-up menu in such a way instead of using + // LLMenuHolderGL::hideMenus() because it will close both menus(dropdown and pop-up), but + // we need to close only pop-up menu while dropdown one should be still opened. + LLMenuGL* menu = (LLMenuGL*)mInventoryItemsPopupMenuHandle.get(); + if(menu && menu->getVisible()) + { + menu->setVisible(FALSE); + } + mDragItemId = id; mStartDrag = TRUE; diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp new file mode 100644 index 0000000000..01d3c3f22e --- /dev/null +++ b/indra/newview/llfilteredwearablelist.cpp @@ -0,0 +1,113 @@ +/** + * @file llfilteredwearablelist.cpp + * @brief Functionality for showing filtered wearable flat list + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llfilteredwearablelist.h" + +// newview +#include "llinventoryfunctions.h" +#include "llinventoryitemslist.h" +#include "llinventorymodel.h" + +class LLFindItemsByMask : public LLInventoryCollectFunctor +{ +public: + LLFindItemsByMask(U64 mask) + : mFilterMask(mask) + {} + + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if(item) + { + if( mFilterMask & (1LL << item->getInventoryType()) ) + { + return TRUE; + } + } + return FALSE; + } + +private: + U64 mFilterMask; +}; + +////////////////////////////////////////////////////////////////////////// + +LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask) +: mWearableList(list) +, mFilterMask(filter_mask) +{ + llassert(mWearableList); + gInventory.addObserver(this); + gInventory.fetchDescendentsOf(gInventory.getRootFolderID()); +} + +LLFilteredWearableListManager::~LLFilteredWearableListManager() +{ + gInventory.removeObserver(this); +} + +void LLFilteredWearableListManager::changed(U32 mask) +{ + if(!gInventory.isInventoryUsable()) + { + return; + } + + populateList(); +} + +void LLFilteredWearableListManager::setFilterMask(U64 mask) +{ + mFilterMask = mask; + populateList(); +} + +void LLFilteredWearableListManager::populateList() +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLFindItemsByMask collector(mFilterMask); + + gInventory.collectDescendentsIf( + gInventory.getRootFolderID(), + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + collector); + + // Probably will also need to get items from Library (waiting for reply in EXT-6724). + + mWearableList->refreshList(item_array); +} + +// EOF diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h new file mode 100644 index 0000000000..3f42833bb4 --- /dev/null +++ b/indra/newview/llfilteredwearablelist.h @@ -0,0 +1,70 @@ +/** + * @file llfilteredwearablelist.h + * @brief Functionality for showing filtered wearable flat list + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLFILTEREDWEARABLELIST_H +#define LL_LLFILTEREDWEARABLELIST_H + +#include "llinventoryobserver.h" + +class LLInventoryItemsList; + +// Class that fills LLInventoryItemsList with filtered data. +class LLFilteredWearableListManager : public LLInventoryObserver +{ + LOG_CLASS(LLFilteredWearableListManager); +public: + + LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask); + ~LLFilteredWearableListManager(); + + /** LLInventoryObserver implementation + * + */ + /*virtual*/ void changed(U32 mask); + + /** + * Sets new filter and applies it immediately + */ + void setFilterMask(U64 mask); + + /** + * Populates wearable list with filtered data. + */ + void populateList(); + +private: + LLInventoryItemsList* mWearableList; + U64 mFilterMask; +}; + +#endif //LL_LLFILTEREDWEARABLELIST_H + +// EOF diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index ef69f39ad2..56bc4a7933 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -266,8 +266,18 @@ LLSD LLFloaterAbout::getInfo() info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); bool want_fullname = true; info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); - info["VIVOX_VERSION"] = gVoiceClient ? gVoiceClient->getAPIVersion() : LLTrans::getString("NotConnected"); - + if(LLVoiceClient::getInstance()->voiceEnabled()) + { + LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); + std::ostringstream version_string; + version_string << version.serverType << " " << version.serverVersion << std::endl; + info["VOICE_VERSION"] = version_string.str(); + } + else + { + info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); + } + // TODO: Implement media plugin version query info["QT_WEBKIT_VERSION"] = "4.6 (version number hard-coded)"; diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index deef85cc6c..fd392d949a 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -84,7 +84,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, { if (avatarp->isSelf()) { - const EWearableType wearable_type = tex_entry->mWearableType; + const LLWearableType::EType wearable_type = tex_entry->mWearableType; LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); if (wearable) { @@ -175,7 +175,7 @@ void LLFloaterAvatarTextures::onClickDump(void* data) if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i)) { LLUUID id = IMG_DEFAULT_AVATAR; - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); if (avatarp->isSelf()) { LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 44c82f1941..46b3695511 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -43,7 +43,7 @@ #include "llagent.h" // for agent id #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" -#include "llfloaterinventory.h" // for get_item_icon +#include "llinventoryicon.h" #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llnotificationsutil.h" @@ -152,9 +152,8 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) LLSD row; // Compute icon for this item - std::string icon_name = get_item_icon_name(LLAssetType::AT_OBJECT, - LLInventoryType::IT_OBJECT, - 0x0, FALSE); + std::string icon_name = LLInventoryIcon::getIconName(LLAssetType::AT_OBJECT, + LLInventoryType::IT_OBJECT); row["columns"][0]["column"] = "icon"; row["columns"][0]["type"] = "icon"; @@ -253,8 +252,9 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), + inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 1d989ad0fd..c35653178a 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -48,7 +48,7 @@ #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" -#include "llfloaterinventory.h" // for get_item_icon +#include "llfloaterinventory.h" // for LLInventoryIcon::getIcon #include "llnotificationsutil.h" #include "llselectmgr.h" #include "llscrolllistctrl.h" @@ -221,8 +221,9 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, item_is_multi = TRUE; } - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), + inv_item->getIsLinkType(), inv_item->getFlags(), item_is_multi); row["columns"][0]["column"] = "icon"; diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index d37bc01885..7ca7ace0fc 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -54,6 +54,7 @@ #include "llstatusbar.h" #include "lltextbox.h" #include "lltexturectrl.h" +#include "lltrans.h" #include "llviewchildren.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" @@ -830,7 +831,7 @@ void LLFloaterBuyLandUI::updateNames() else { mParcelSellerName = - LLSLURL::buildCommand("agent", parcelp->getOwnerID(), "inspect"); + LLSLURL("agent", parcelp->getOwnerID(), "inspect").getSLURLString(); } } @@ -859,7 +860,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCVa static std::string transaction_uri; if (transaction_uri.empty()) { - transaction_uri = LLViewerLogin::getInstance()->getHelperURI() + "landtool.php"; + transaction_uri = LLGridManager::getInstance()->getHelperURI() + "landtool.php"; } const char* method; @@ -1172,13 +1173,13 @@ void LLFloaterBuyLandUI::refreshUI() if (!mParcelValid) { - message += getString("no_parcel_selected"); + message += LLTrans::getString("sentences_separator") + getString("no_parcel_selected"); } else if (mParcelBillableArea == mParcelActualArea) { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea); - message += getString("parcel_meters", string_args); + message += LLTrans::getString("sentences_separator") + getString("parcel_meters", string_args); } else { @@ -1187,13 +1188,13 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); - message += getString("premium_land", string_args); + message += LLTrans::getString("sentences_separator") + getString("premium_land", string_args); } else { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); - message += getString("discounted_land", string_args); + message += LLTrans::getString("sentences_separator") + getString("discounted_land", string_args); } } diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index cdb9b8edb8..882d12f68e 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -166,7 +166,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& if (chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID != LLUUID::null) { - chat.mURL = LLSLURL::buildCommand("agent", chat.mFromID, "inspect"); + chat.mURL = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString(); } // If the chat line has an associated url, link it up to the name. diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 774caaec90..a15cef7ea4 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -318,7 +318,7 @@ LLFloaterChatterBox* LLFloaterChatterBox::getInstance() //static LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater() { - if (!LLVoiceClient::voiceEnabled()) + if (!LLVoiceClient::getInstance()->voiceEnabled()) { return NULL; } diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index 560cc29080..f6cffd4b14 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -192,7 +192,7 @@ void LLFloaterEvent::processEventInfoReply(LLMessageSystem *msg, void **) floater->mTBCategory->setText(floater->mEventInfo.mCategoryStr); floater->mTBDate->setText(floater->mEventInfo.mTimeStr); floater->mTBDesc->setText(floater->mEventInfo.mDesc); - floater->mTBRunBy->setText(LLSLURL::buildCommand("agent", floater->mEventInfo.mRunByID, "inspect")); + floater->mTBRunBy->setText(LLSLURL("agent", floater->mEventInfo.mRunByID, "inspect").getSLURLString()); floater->mTBDuration->setText(llformat("%d:%.2d", floater->mEventInfo.mDuration / 60, floater->mEventInfo.mDuration % 60)); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index ef9da30552..8a20712ea8 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -59,13 +59,18 @@ #include "llviewertexturelist.h" #include "llstring.h" +#include "llendianswizzle.h" + +#include "llviewercontrol.h" +#include "lltrans.h" +#include "llimagedimensionsinfo.h" + const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 300; - //----------------------------------------------------------------------------- // LLFloaterImagePreview() //----------------------------------------------------------------------------- @@ -124,6 +129,11 @@ BOOL LLFloaterImagePreview::postBuild() childShow("bad_image_text"); childDisable("clothing_type_combo"); childDisable("ok_btn"); + + if(!mImageLoadError.empty()) + { + childSetValue("bad_image_text",mImageLoadError.c_str()); + } } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); @@ -341,6 +351,27 @@ bool LLFloaterImagePreview::loadImage(const std::string& src_filename) codec = IMG_CODEC_PNG; } + LLImageDimensionsInfo image_info; + if(!image_info.load(src_filename,codec)) + { + mImageLoadError = image_info.getLastError(); + return false; + } + + S32 max_width = gSavedSettings.getS32("max_texture_dimension_X"); + S32 max_heigh = gSavedSettings.getS32("max_texture_dimension_Y"); + + if(image_info.getWidth() > max_width|| image_info.getHeight() > max_heigh) + { + LLStringUtil::format_map_t args; + args["WIDTH"] = llformat("%d", max_width); + args["HEIGHT"] = llformat("%d", max_heigh); + + mImageLoadError = LLTrans::getString("texture_load_dimensions_error", args); + return false; + } + + LLPointer<LLImageRaw> raw_image = new LLImageRaw; switch (codec) diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 466bd1d0ec..3a7e1ff7d8 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -143,7 +143,8 @@ protected: LLRect mPreviewRect; LLRectf mPreviewImageRect; LLPointer<LLViewerTexture> mImagep ; - + + std::string mImageLoadError; }; #endif // LL_LLFLOATERIMAGEPREVIEW_H diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2ff483cd34..256796aa80 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -42,7 +42,6 @@ #include "llnotificationsutil.h" #include "llparcel.h" #include "message.h" -#include "lluserauth.h" #include "llagent.h" #include "llbutton.h" @@ -805,7 +804,7 @@ void LLPanelLandGeneral::refreshNames() else { // Figure out the owner's name - owner = LLSLURL::buildCommand("agent", parcel->getOwnerID(), "inspect"); + owner = LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString(); } if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) @@ -817,7 +816,7 @@ void LLPanelLandGeneral::refreshNames() std::string group; if (!parcel->getGroupID().isNull()) { - group = LLSLURL::buildCommand("group", parcel->getGroupID(), "inspect"); + group = LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString(); } mTextGroup->setText(group); @@ -826,9 +825,9 @@ void LLPanelLandGeneral::refreshNames() const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); if(auth_buyer_id.notNull()) { - std::string name; - name = LLSLURL::buildCommand("agent", auth_buyer_id, "inspect"); - mSaleInfoForSale2->setTextArg("[BUYER]", name); + std::string name; + name = LLSLURL("agent", auth_buyer_id, "inspect").getSLURLString(); + mSaleInfoForSale2->setTextArg("[BUYER]", name); } else { diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e2c5ad6d02..0eeef0039c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -599,7 +599,7 @@ void LLFloaterPreference::onBtnOK() llinfos << "Can't close preferences!" << llendl; } - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateLocationCombo( false ); } // static @@ -616,7 +616,7 @@ void LLFloaterPreference::onBtnApply( ) apply(); saveSettings(); - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateLocationCombo( false ); } // static @@ -1197,7 +1197,7 @@ void LLFloaterPreference::applyResolution() gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth); gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight); - gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("WindowFullScreen")); + gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen")); send_agent_update(TRUE); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 3758cbe74f..8c219cb3fd 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2922,8 +2922,7 @@ bool LLDispatchEstateUpdateInfo::operator()( LLUUID owner_id(strings[1]); regionp->setOwner(owner_id); // Update estate owner name in UI - std::string owner_name = - LLSLURL::buildCommand("agent", owner_id, "inspect"); + std::string owner_name = LLSLURL("agent", owner_id, "inspect").getSLURLString(); panel->setOwnerName(owner_name); U32 estate_id = strtoul(strings[2].c_str(), NULL, 10); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index b42b34835d..f7c8855bf6 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -126,7 +126,9 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) // virtual BOOL LLFloaterReporter::postBuild() { - childSetText("abuse_location_edit", LLAgentUI::buildSLURL()); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + childSetText("abuse_location_edit", slurl.getSLURLString()); enableControls(TRUE); @@ -280,7 +282,6 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) { object_owner.append("Unknown"); } - setFromAvatar(mObjectID, object_owner); } else @@ -325,7 +326,8 @@ void LLFloaterReporter::setFromAvatar(const LLUUID& avatar_id, const std::string mAbuserID = mObjectID = avatar_id; mOwnerName = avatar_name; - std::string avatar_link = LLSLURL::buildCommand("agent", mObjectID, "inspect"); + std::string avatar_link = + LLSLURL("agent", mObjectID, "inspect").getSLURLString(); childSetText("owner_name", avatar_link); childSetText("object_name", avatar_name); childSetText("abuser_name_edit", avatar_name); @@ -504,7 +506,7 @@ void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name { childSetText("object_name", object_name); std::string owner_link = - LLSLURL::buildCommand("agent", owner_id, "inspect"); + LLSLURL("agent", owner_id, "inspect").getSLURLString(); childSetText("owner_name", owner_link); childSetText("abuser_name_edit", owner_name); mAbuserID = owner_id; @@ -566,7 +568,7 @@ LLSD LLFloaterReporter::gatherReport() mCopyrightWarningSeen = FALSE; std::ostringstream summary; - if (!LLViewerLogin::getInstance()->isInProductionGrid()) + if (!LLGridManager::getInstance()->isInProductionGrid()) { summary << "Preview "; } diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 980b456497..9dddbd998a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -94,7 +94,6 @@ private: static void doSellLand(void *userdata); bool onConfirmSale(const LLSD& notification, const LLSD& response); static void doShowObjects(void *userdata); - static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids); @@ -102,6 +101,7 @@ public: virtual BOOL postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); + static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); }; // static @@ -423,11 +423,13 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata) send_parcel_select_objects(parcel->getLocalID(), RT_SELL); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration LLNotificationsUtil::add("TransferObjectsHighlighted", - LLSD(), LLSD(), - &LLFloaterSellLandUI::callbackHighlightTransferable); + LLSD(), LLSD()); } +static LLNotificationFunctorRegistration tr("TransferObjectsHighlighted", &LLFloaterSellLandUI::callbackHighlightTransferable); + // static bool LLFloaterSellLandUI::callbackHighlightTransferable(const LLSD& notification, const LLSD& data) { diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index e994a18d9b..b9008fa53b 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1145,7 +1145,7 @@ void LLSnapshotLivePreview::saveWeb(std::string url) void LLSnapshotLivePreview::regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z) { - body["slurl"] = LLSLURL::buildSLURL(name, x, y, z); + body["slurl"] = LLSLURL(name, LLVector3d(x, y, z)).getSLURLString(); LLHTTPClient::post(url, body, new LLSendWebResponder()); diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 002d417e4c..0e802e9736 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -70,11 +70,6 @@ public: completeAny(status, mime_type); } - virtual void error( U32 status, const std::string& reason ) - { - completeAny(status, LLMIMETypes::getDefaultMimeType()); - } - void completeAny(U32 status, const std::string& mime_type) { // Set empty type to none/none. Empty string is reserved for legacy parcels diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 638c9f1b8c..63365e3461 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -64,9 +64,6 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() // grab "live" mic volume level mMicVolume = gSavedSettings.getF32("AudioLevelMic"); - // ask for new device enumeration - // now do this in onOpen() instead... - //gVoiceClient->refreshDeviceLists(); } LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() @@ -105,7 +102,7 @@ void LLPanelVoiceDeviceSettings::draw() refresh(); // let user know that volume indicator is not yet available - bool is_in_tuning_mode = gVoiceClient->inTuningMode(); + bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode(); childSetVisible("wait_text", !is_in_tuning_mode); LLPanel::draw(); @@ -113,7 +110,7 @@ void LLPanelVoiceDeviceSettings::draw() if (is_in_tuning_mode) { const S32 num_bars = 5; - F32 voice_power = gVoiceClient->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; + F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL; S32 discrete_power = llmin(num_bars, llfloor(voice_power * (F32)num_bars + 0.1f)); for(S32 power_bar_idx = 0; power_bar_idx < num_bars; power_bar_idx++) @@ -194,13 +191,13 @@ void LLPanelVoiceDeviceSettings::refresh() 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); + LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume); // Fill in popup menus mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device"); - if(!gVoiceClient->deviceSettingsAvailable()) + if(!LLVoiceClient::getInstance()->deviceSettingsAvailable()) { // The combo boxes are disabled, since we can't get the device settings from the daemon just now. // Put the currently set default (ONLY) in the box, and select it. @@ -219,17 +216,16 @@ void LLPanelVoiceDeviceSettings::refresh() } else if (!mDevicesUpdated) { - LLVoiceClient::deviceList *devices; - - LLVoiceClient::deviceList::iterator iter; + LLVoiceDeviceList::const_iterator iter; if(mCtrlInputDevices) { mCtrlInputDevices->removeall(); mCtrlInputDevices->add( getString("default_text"), ADD_BOTTOM ); - devices = gVoiceClient->getCaptureDevices(); - for(iter=devices->begin(); iter != devices->end(); iter++) + for(iter=LLVoiceClient::getInstance()->getCaptureDevices().begin(); + iter != LLVoiceClient::getInstance()->getCaptureDevices().end(); + iter++) { mCtrlInputDevices->add( *iter, ADD_BOTTOM ); } @@ -245,8 +241,8 @@ void LLPanelVoiceDeviceSettings::refresh() mCtrlOutputDevices->removeall(); mCtrlOutputDevices->add( getString("default_text"), ADD_BOTTOM ); - devices = gVoiceClient->getRenderDevices(); - for(iter=devices->begin(); iter != devices->end(); iter++) + for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin(); + iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++) { mCtrlOutputDevices->add( *iter, ADD_BOTTOM ); } @@ -268,37 +264,34 @@ void LLPanelVoiceDeviceSettings::initialize() mDevicesUpdated = FALSE; // ask for new device enumeration - gVoiceClient->refreshDeviceLists(); + LLVoiceClient::getInstance()->refreshDeviceLists(); // put voice client in "tuning" mode - gVoiceClient->tuningStart(); + LLVoiceClient::getInstance()->tuningStart(); LLVoiceChannel::suspend(); } void LLPanelVoiceDeviceSettings::cleanup() { - if (gVoiceClient) - { - gVoiceClient->tuningStop(); - } + LLVoiceClient::getInstance()->tuningStop(); LLVoiceChannel::resume(); } // static void LLPanelVoiceDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { - gVoiceClient->setCaptureDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setCaptureDevice(ctrl->getValue().asString()); } } // static void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { - gVoiceClient->setRenderDevice(ctrl->getValue().asString()); + LLVoiceClient::getInstance()->setRenderDevice(ctrl->getValue().asString()); } } diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b3223ad494..152360a96e 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -461,7 +461,7 @@ void LLFloaterWorldMap::draw() childSetEnabled("Teleport", (BOOL)tracking_status); // childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->isTracking()); - childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); + childSetEnabled("copy_slurl", (mSLURL.isValid()) ); setMouseOpaque(TRUE); getDragHandle()->setMouseOpaque(TRUE); @@ -660,14 +660,8 @@ void LLFloaterWorldMap::updateLocation() childSetValue("location", agent_sim_name); // Figure out where user is - LLVector3d agentPos = gAgent.getPositionGlobal(); - - S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) ); - S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) ); - S32 agent_z = llround( (F32)agentPos.mdV[VZ] ); - // Set the current SLURL - mSLURL = LLSLURL::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); + mSLURL = LLSLURL(agent_sim_name, gAgent.getPositionGlobal()); } } @@ -694,18 +688,15 @@ void LLFloaterWorldMap::updateLocation() } childSetValue("location", sim_name); - - F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); - F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); // simNameFromPosGlobal can fail, so don't give the user an invalid SLURL if ( gotSimName ) { - mSLURL = LLSLURL::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])); + mSLURL = LLSLURL(sim_name, pos_global); } else { // Empty SLURL will disable the "Copy SLURL to clipboard" button - mSLURL = ""; + mSLURL = LLSLURL(); } } } @@ -1174,7 +1165,7 @@ void LLFloaterWorldMap::onClearBtn() mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); LLWorldMap::getInstance()->cancelTracking(); - mSLURL = ""; // Clear the SLURL since it's invalid + mSLURL = LLSLURL(); // Clear the SLURL since it's invalid mSetToUserPosition = TRUE; // Revert back to the current user position } @@ -1197,10 +1188,10 @@ void LLFloaterWorldMap::onClickTeleportBtn() void LLFloaterWorldMap::onCopySLURL() { - getWindow()->copyTextToClipboard(utf8str_to_wstring(mSLURL)); + getWindow()->copyTextToClipboard(utf8str_to_wstring(mSLURL.getSLURLString())); LLSD args; - args["SLURL"] = mSLURL; + args["SLURL"] = mSLURL.getSLURLString(); LLNotificationsUtil::add("CopySLURL", args); } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 00f5e788fb..52809ff830 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -43,6 +43,7 @@ #include "llhudtext.h" #include "llmapimagetype.h" #include "lltracker.h" +#include "llslurl.h" class LLEventInfo; class LLFriendObserver; @@ -183,7 +184,7 @@ private: LLTracker::ETrackingStatus mTrackedStatus; std::string mTrackedSimName; std::string mTrackedAvatarName; - std::string mSLURL; + LLSLURL mSLURL; }; extern LLFloaterWorldMap* gFloaterWorldMap; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c492bfcef1..2ae11aa2b5 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -846,16 +846,16 @@ void LLFolderView::clearSelection() mSelectThisID.setNull(); } -BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const +std::set<LLUUID> LLFolderView::getSelectionList() const { + std::set<LLUUID> selection; for (selected_items_t::const_iterator item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { selection.insert((*item_it)->getListener()->getUUID()); } - - return (selection.size() != 0); + return selection; } BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source) @@ -946,7 +946,9 @@ void LLFolderView::draw() } else { - mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig()); + mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args); //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } mStatusTextBox->setValue(mStatusText); @@ -2068,8 +2070,7 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) } - std::set<LLUUID> selected_items; - getSelectionList(selected_items); + std::set<LLUUID> selected_items = getSelectionList(); LLMultiPreview* multi_previewp = NULL; LLMultiProperties* multi_propertiesp = NULL; diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 874723bb1a..0dfdbd364b 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -164,7 +164,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const; + virtual std::set<LLUUID> getSelectionList() const; // make sure if ancestor is selected, descendents are not void sanitizeSelection(); @@ -230,6 +230,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) { setShowSelectionContext(FALSE); } virtual void draw(); virtual void deleteAllChildren(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 3208218302..54e9bd5383 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -387,6 +387,12 @@ void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection) getRoot()->extendSelection(selection, NULL, selected_items); } +std::set<LLUUID> LLFolderViewItem::getSelectionList() const +{ + std::set<LLUUID> selection; + return selection; +} + EInventorySortGroup LLFolderViewItem::getSortGroup() const { return SG_ITEM; @@ -836,6 +842,7 @@ void LLFolderViewItem::draw() static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); + static LLUIColor sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); @@ -965,6 +972,8 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; + const LLViewerInventoryItem *item = getInventoryItem(); + if (item && item->getIsLinkType()) color = sLinkColor; if (in_library) color = sLibraryColor; F32 right_x = 0; diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 655ad89e99..57c722afa4 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -231,7 +231,7 @@ public: virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; } // gets multiple-element selection - virtual BOOL getSelectionList(std::set<LLUUID> &selection) const {return TRUE;} + virtual std::set<LLUUID> getSelectionList() const; // Returns true is this object and all of its children can be removed (deleted by user) virtual BOOL isRemovable(); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 8a056f836f..3224ac6d9b 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -40,12 +40,12 @@ #include "llmenugl.h" #include "lltextbox.h" #include "lltrans.h" +#include "lluitextutil.h" // newview #include "llagent.h" #include "llgroupactions.h" #include "llfloaterreg.h" -#include "lltextutil.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder #include "llvoiceclient.h" @@ -71,18 +71,10 @@ public: static const LLGroupComparator GROUP_COMPARATOR; -LLGroupList::Params::Params() -: no_groups_msg("no_groups_msg") -, no_filtered_groups_msg("no_filtered_groups_msg") -{ - -} LLGroupList::LLGroupList(const Params& p) -: LLFlatListView(p) +: LLFlatListViewEx(p) , mDirty(true) // to force initial update - , mNoFilteredGroupsMsg(p.no_filtered_groups_msg) - , mNoGroupsMsg(p.no_groups_msg) { // Listen for agent group changes. gAgent.addListener(this, "new group"); @@ -139,9 +131,15 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) void LLGroupList::setNameFilter(const std::string& filter) { - if (mNameFilter != filter) + std::string filter_upper = filter; + LLStringUtil::toUpper(filter_upper); + if (mNameFilter != filter_upper) { - mNameFilter = filter; + mNameFilter = filter_upper; + + // set no items message depend on filter state + updateNoItemsMessage(filter); + setDirty(); } } @@ -159,18 +157,6 @@ void LLGroupList::refresh() LLUUID id; bool have_filter = !mNameFilter.empty(); - // set no items message depend on filter state & total count of groups - if (have_filter) - { - // groups were filtered - setNoItemsCommentText(mNoFilteredGroupsMsg); - } - else if (0 == count) - { - // user is not a member of any group - setNoItemsCommentText(mNoGroupsMsg); - } - clear(); for(S32 i = 0; i < count; ++i) @@ -287,7 +273,7 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) return gAgent.getGroupID() != selected_group_id; if (userdata.asString() == "call") - return real_group_selected && LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); + return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); return real_group_selected; } diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 0e9da25c58..16f3fc05a3 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -47,23 +47,10 @@ * * @see setNameFilter() */ -class LLGroupList: public LLFlatListView, public LLOldEvents::LLSimpleListener +class LLGroupList: public LLFlatListViewEx, public LLOldEvents::LLSimpleListener { LOG_CLASS(LLGroupList); public: - struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> - { - /** - * Contains a message for empty list when user is not a member of any group - */ - Optional<std::string> no_groups_msg; - - /** - * Contains a message for empty list when all groups don't match passed filter - */ - Optional<std::string> no_filtered_groups_msg; - Params(); - }; LLGroupList(const Params& p); virtual ~LLGroupList(); @@ -75,11 +62,6 @@ public: void toggleIcons(); bool getIconsVisible() const { return mShowIcons; } - // *WORKAROUND: two methods to overload appropriate Params due to localization issue: - // no_groups_msg & no_filtered_groups_msg attributes are not defined as translatable in VLT. See EXT-5931 - void setNoGroupsMsg(const std::string& msg) { mNoGroupsMsg = msg; } - void setNoFilteredGroupsMsg(const std::string& msg) { mNoFilteredGroupsMsg = msg; } - private: void setDirty(bool val = true) { mDirty = val; } void refresh(); @@ -94,8 +76,6 @@ private: bool mShowIcons; bool mDirty; std::string mNameFilter; - std::string mNoFilteredGroupsMsg; - std::string mNoGroupsMsg; }; class LLButton; diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 5b653638f2..47fe641680 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -78,8 +78,8 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLVector3 up_axis; if (orthographic) { - right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightRaw(), 0.f); - up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw()); + right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightScaled(), 0.f); + up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightScaled()); } else { diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 19dbc564d1..3aa9d75bc0 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -53,12 +53,12 @@ #include "llsyswellwindow.h" #include "lltrans.h" #include "llchathistory.h" +#include "llnotifications.h" #include "llviewerwindow.h" #include "llvoicechannel.h" #include "lltransientfloatermgr.h" #include "llinventorymodel.h" #include "llrootview.h" - #include "llspeakers.h" @@ -371,6 +371,8 @@ void LLIMFloater::onSlide() //static LLIMFloater* LLIMFloater::show(const LLUUID& session_id) { + closeHiddenIMToasts(); + if (!gIMMgr->hasSession(session_id)) return NULL; if(!isChatMultiTab()) @@ -1084,6 +1086,41 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info) } // static +void LLIMFloater::closeHiddenIMToasts() +{ + class IMToastMatcher: public LLNotificationsUI::LLScreenChannel::Matcher + { + public: + bool matches(const LLNotificationPtr notification) const + { + // "notifytoast" type of notifications is reserved for IM notifications + return "notifytoast" == notification->getType(); + } + }; + + LLNotificationsUI::LLScreenChannel* channel = LLNotificationsUI::LLChannelManager::getNotificationScreenChannel(); + if (channel != NULL) + { + channel->closeHiddenToasts(IMToastMatcher()); + } +} +// static +void LLIMFloater::confirmLeaveCallCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + const LLSD& payload = notification["payload"]; + LLUUID session_id = payload["session_id"]; + + LLFloater* im_floater = LLFloaterReg::findInstance("impanel", session_id); + if (option == 0 && im_floater != NULL) + { + im_floater->closeFloater(); + } + + return; +} + +// static bool LLIMFloater::isChatMultiTab() { // Restart is required in order to change chat window type. @@ -1132,3 +1169,31 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) } } + +void LLIMFloater::onClickCloseBtn() +{ + + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( + mSessionID); + + if (session == NULL) + { + llwarns << "Empty session." << llendl; + return; + } + + bool is_call_with_chat = session->isGroupSessionType() + || session->isAdHocSessionType() || session->isP2PSessionType(); + + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + + if (is_call_with_chat && voice_channel != NULL && voice_channel->isActive()) + { + LLSD payload; + payload["session_id"] = mSessionID; + LLNotificationsUtil::add("ConfirmLeaveCall", LLSD(), payload, confirmLeaveCallCallback); + return; + } + + LLFloater::onClickCloseBtn(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 763dd5655b..fef178e3a2 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -50,6 +50,7 @@ class LLInventoryCategory; */ class LLIMFloater : public LLTransientDockableFloater { + LOG_CLASS(LLIMFloater); public: LLIMFloater(const LLUUID& session_id); @@ -120,6 +121,10 @@ public: virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } +protected: + /* virtual */ + void onClickCloseBtn(); + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); @@ -148,6 +153,10 @@ private: // Remove the "User is typing..." indicator. void removeTypingIndicator(const LLIMInfo* im_info = NULL); + static void closeHiddenIMToasts(); + + static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); + LLPanelChatControlPanel* mControlPanel; LLUUID mSessionID; S32 mLastMessageIndex; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 4bdf5f42dc..0e3b78df7f 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -300,7 +300,7 @@ void LLFloaterIMPanel::onVolumeChange(LLUICtrl* source, void* user_data) LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)user_data; if (floaterp) { - gVoiceClient->setUserVolume(floaterp->mOtherParticipantUUID, (F32)source->getValue().asReal()); + LLVoiceClient::getInstance()->setUserVolume(floaterp->mOtherParticipantUUID, (F32)source->getValue().asReal()); } } @@ -312,7 +312,7 @@ void LLFloaterIMPanel::draw() BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "") && mSessionInitialized - && LLVoiceClient::voiceEnabled() + && LLVoiceClient::getInstance()->voiceEnabled() && mCallBackEnabled; // hide/show start call and end call buttons @@ -320,8 +320,8 @@ void LLFloaterIMPanel::draw() if (!voice_channel) return; - childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); - childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("end_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("start_call_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED); childSetEnabled("start_call_btn", enable_connect); childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty()); @@ -384,11 +384,11 @@ void LLFloaterIMPanel::draw() else { // refresh volume and mute checkbox - childSetVisible("speaker_volume", LLVoiceClient::voiceEnabled() && voice_channel->isActive()); - childSetValue("speaker_volume", gVoiceClient->getUserVolume(mOtherParticipantUUID)); + childSetVisible("speaker_volume", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive()); + childSetValue("speaker_volume", LLVoiceClient::getInstance()->getUserVolume(mOtherParticipantUUID)); childSetValue("mute_btn", LLMuteList::getInstance()->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat)); - childSetVisible("mute_btn", LLVoiceClient::voiceEnabled() && voice_channel->isActive()); + childSetVisible("mute_btn", LLVoiceClient::getInstance()->voiceEnabled() && voice_channel->isActive()); } LLFloater::draw(); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4357c7d426..c143ac9dea 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -257,9 +257,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { - std::string you = LLTrans::getString("You"); - std::string started_call = LLTrans::getString("started_call"); - std::string joined_call = LLTrans::getString("joined_call"); + std::string you_joined_call = LLTrans::getString("you_joined_call"); + std::string you_started_call = LLTrans::getString("you_started_call"); std::string other_avatar_name = ""; std::string message; @@ -277,13 +276,15 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - message = other_avatar_name + " " + started_call; - LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); - - break; + { + LLStringUtil::format_map_t string_args; + string_args["[NAME]"] = other_avatar_name; + message = LLTrans::getString("name_started_call", string_args); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); + break; + } case LLVoiceChannel::STATE_CONNECTED : - message = you + " " + joined_call; - LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call); default: break; } @@ -293,8 +294,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - message = you + " " + started_call; - LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call); break; case LLVoiceChannel::STATE_CONNECTED : message = LLTrans::getString("answered_call"); @@ -312,8 +312,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CONNECTED : - message = you + " " + joined_call; - LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call); default: break; } @@ -323,8 +322,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - message = you + " " + started_call; - LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call); break; default: break; @@ -344,13 +342,13 @@ LLIMModel::LLIMSession::~LLIMSession() mSpeakers = NULL; // End the text IM session if necessary - if(gVoiceClient && mOtherParticipantID.notNull()) + if(LLVoiceClient::getInstance() && mOtherParticipantID.notNull()) { switch(mType) { case IM_NOTHING_SPECIAL: case IM_SESSION_P2P_INVITE: - gVoiceClient->endUserIMSession(mOtherParticipantID); + LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantID); break; default: @@ -925,7 +923,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) { // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. - sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text); + sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); } if(!sent) @@ -1722,7 +1720,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) - bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); @@ -1767,6 +1765,8 @@ void LLOutgoingCallDialog::show(const LLSD& key) getChild<LLTextBox>("leaving")->setVisible(true); } break; + // STATE_READY is here to show appropriate text for ad-hoc and group calls when floater is shown(EXT-6893) + case LLVoiceChannel::STATE_READY : case LLVoiceChannel::STATE_RINGING : if(show_oldchannel) { @@ -1847,8 +1847,8 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { - // check whether a call is valid or not - if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + std::string session_handle = mPayload["session_handle"].asString(); + if (LLVoiceClient::getInstance()->isValidChannel(session_handle)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); @@ -2067,8 +2067,9 @@ void LLIncomingCallDialog::processCallResponse(S32 response) // send notification message to the corresponding chat if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc") { - std::string started_call = LLTrans::getString("started_call"); - std::string message = mPayload["caller_name"].asString() + " " + started_call; + LLStringUtil::format_map_t string_args; + string_args["[NAME]"] = mPayload["caller_name"].asString(); + std::string message = LLTrans::getString("name_started_call", string_args); LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message); } } @@ -2082,10 +2083,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { std::string s = mPayload["session_handle"].asString(); - gVoiceClient->declineInvite(s); + LLVoiceClient::getInstance()->declineInvite(s); } } else @@ -2173,11 +2174,8 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) - { - std::string s = payload["session_handle"].asString(); - gVoiceClient->declineInvite(s); - } + std::string s = payload["session_handle"].asString(); + LLVoiceClient::getInstance()->declineInvite(s); } else { @@ -2744,6 +2742,12 @@ bool LLIMMgr::endCall(const LLUUID& session_id) if (!voice_channel) return false; voice_channel->deactivate(); + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (im_session) + { + // need to update speakers' state + im_session->mSpeakers->update(FALSE); + } return true; } @@ -3083,7 +3087,7 @@ public: return; } - if(!LLVoiceClient::voiceEnabled() || !LLVoiceClient::getInstance()->voiceWorking()) + if(!LLVoiceClient::getInstance()->voiceEnabled() || !LLVoiceClient::getInstance()->isVoiceWorking()) { // Don't display voice invites unless the user has voice enabled. return; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index e48bb77bda..d9fdc876db 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -541,8 +541,7 @@ void LLInspectAvatar::toggleSelectedVoice(bool enabled) void LLInspectAvatar::updateVolumeSlider() { - - bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); + bool voice_enabled = LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarID); // Do not display volume slider and mute button if it // is ourself or we are not in a voice channel together @@ -572,6 +571,7 @@ void LLInspectAvatar::updateVolumeSlider() volume_slider->setEnabled( !is_muted ); F32 volume; + if (is_muted) { // it's clearer to display their volume as zero @@ -580,7 +580,7 @@ void LLInspectAvatar::updateVolumeSlider() else { // actual volume - volume = gVoiceClient->getUserVolume(mAvatarID); + volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarID); } volume_slider->setValue( (F64)volume ); } @@ -609,7 +609,7 @@ void LLInspectAvatar::onClickMuteVolume() void LLInspectAvatar::onVolumeChange(const LLSD& data) { F32 volume = (F32)data.asReal(); - gVoiceClient->setUserVolume(mAvatarID, volume); + LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume); } void LLInspectAvatar::nameUpdatedCallback( diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 91cbbbf430..a2b5ffbac4 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -480,7 +480,7 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep) // Objects cannot be created by a group, so use agent URL format LLUUID creator_id = nodep->mPermissions->getCreator(); std::string creator_url = - LLSLURL::buildCommand("agent", creator_id, "about"); + LLSLURL("agent", creator_id, "about").getSLURLString(); args["[CREATOR]"] = creator_url; // created by one user but owned by another @@ -490,12 +490,12 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep) if (group_owned) { owner_id = nodep->mPermissions->getGroup(); - owner_url = LLSLURL::buildCommand("group", owner_id, "about"); + owner_url = LLSLURL("group", owner_id, "about").getSLURLString(); } else { owner_id = nodep->mPermissions->getOwner(); - owner_url = LLSLURL::buildCommand("agent", owner_id, "about"); + owner_url = LLSLURL("agent", owner_id, "about").getSLURLString(); } args["[OWNER]"] = owner_url; diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 66e4a1bf66..97ff771658 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -176,11 +176,11 @@ void LLInspectRemoteObject::update() { if (mGroupOwned) { - owner = LLSLURL::buildCommand("group", mOwnerID, "about"); + owner = LLSLURL("group", mOwnerID, "about").getSLURLString(); } else { - owner = LLSLURL::buildCommand("agent", mOwnerID, "about"); + owner = LLSLURL("agent", mOwnerID, "about").getSLURLString(); } } else diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b85bf0d518..973257b19c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -108,45 +108,6 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); -std::string ICON_NAME[ICON_NAME_COUNT] = -{ - "Inv_Texture", - "Inv_Sound", - "Inv_CallingCard", - "Inv_CallingCard", - "Inv_Landmark", - "Inv_Landmark", - "Inv_Script", - "Inv_Clothing", - "Inv_Object", - "Inv_Object_Multi", - "Inv_Notecard", - "Inv_Skin", - "Inv_Snapshot", - - "Inv_BodyShape", - "Inv_Skin", - "Inv_Hair", - "Inv_Eye", - "Inv_Shirt", - "Inv_Pants", - "Inv_Shoe", - "Inv_Socks", - "Inv_Jacket", - "Inv_Gloves", - "Inv_Undershirt", - "Inv_Underpants", - "Inv_Skirt", - "Inv_Alpha", - "Inv_Tattoo", - - "Inv_Animation", - "Inv_Gesture", - - "Inv_LinkItem", - "Inv_LinkFolder" -}; - // +=================================================+ // | LLInvFVBridge | // +=================================================+ @@ -156,14 +117,17 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : mUUID(uuid), mRoot(root), - mInvType(LLInventoryType::IT_NONE) + mInvType(LLInventoryType::IT_NONE), + mIsLink(FALSE) { mInventoryPanel = inventory->getHandle(); + const LLInventoryObject* obj = getInventoryObject(); + mIsLink = obj && obj->getIsLinkType(); } const std::string& LLInvFVBridge::getName() const { - LLInventoryObject* obj = getInventoryObject(); + const LLInventoryObject* obj = getInventoryObject(); if(obj) { return obj->getName(); @@ -211,10 +175,14 @@ BOOL LLInvFVBridge::isItemRemovable() const return FALSE; } - // Disable delete from COF folder; have users explicitly choose "detach/take off". + // Disable delete from COF folder; have users explicitly choose "detach/take off", + // unless the item is not worn but in the COF (i.e. is bugged). if (LLAppearanceMgr::instance().getIsProtectedCOFItem(mUUID)) { - return FALSE; + if (get_is_item_worn(mUUID)) + { + return FALSE; + } } const LLInventoryObject *obj = model->getItem(mUUID); @@ -235,6 +203,11 @@ BOOL LLInvFVBridge::isItemMovable() const return TRUE; } +BOOL LLInvFVBridge::isLink() const +{ + return mIsLink; +} + /*virtual*/ /** * @brief Adds this item into clipboard storage @@ -494,7 +467,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const } } const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i)); - if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType())) + if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { return FALSE; } @@ -641,7 +614,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste")); } - if (gAgent.isGodlike()) + if (gSavedSettings.getBOOL("InventoryLinking")) { items.push_back(std::string("Paste As Link")); if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) @@ -677,7 +650,8 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { disabled_items.push_back(std::string("Share")); } - items.push_back(std::string("Open")); + + addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); getClipboardEntries(true, items, disabled_items, flags); @@ -712,7 +686,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, const LLInventoryObject *obj = getInventoryObject(); // Don't allow delete as a direct option from COF folder. - if (obj && obj->getIsLinkType() && isCOFFolder()) + if (obj && obj->getIsLinkType() && isCOFFolder() && get_is_item_worn(mUUID)) { return; } @@ -733,6 +707,17 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, } } +void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items) +{ + const LLInventoryObject *obj = getInventoryObject(); + const BOOL is_link = (obj && obj->getIsLinkType()); + + if (is_link) + items.push_back(std::string("Open Original")); + else + items.push_back(std::string("Open")); +} + // *TODO: remove this BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { @@ -840,21 +825,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, const LLUUID& new_parent_id, BOOL restamp) { - if (item->getParentUUID() != new_parent_id) - { - LLInventoryModel::update_list_t update; - LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1); - update.push_back(old_folder); - LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); - update.push_back(new_folder); - gInventory.accountForUpdate(update); - - LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); - new_item->setParent(new_parent_id); - new_item->updateParentOnServer(restamp); - model->updateItem(new_item); - model->notifyObservers(); - } + change_item_parent(model, item, new_parent_id, restamp); } // static @@ -931,7 +902,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, { llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLScriptBridge(inventory, root, uuid); + new_listener = new LLItemBridge(inventory, root, uuid); break; case LLAssetType::AT_OBJECT: @@ -980,7 +951,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, { llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (EWearableType)flags); + new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (LLWearableType::EType)flags); break; case LLAssetType::AT_CATEGORY: if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) @@ -1026,46 +997,36 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } -bool LLInvFVBridge::isInOutfitsSidePanel() const +BOOL LLInvFVBridge::isInOutfitsSidePanel() const { LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); LLPanelOutfitsInventory *outfit_panel = dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) - return false; + return FALSE; return outfit_panel->isTabPanel(my_panel); } -bool LLInvFVBridge::canShare() +BOOL LLInvFVBridge::canShare() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) - { - return false; - } + if (!model) return FALSE; - LLViewerInventoryItem *item = model->getItem(mUUID); + const LLViewerInventoryItem *item = model->getItem(mUUID); if (item) { - bool allowed = false; - allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); - if (allowed && - !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - allowed = false; - } - if (allowed && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - allowed = false; - } - return allowed; + if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) + return FALSE; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + return FALSE; + if (!item->getPermissions().allowCopyBy(gAgent.getID())) + return FALSE; + return TRUE; } - LLViewerInventoryCategory* cat = model->getCategory(mUUID); - // All categories can be given. - return cat != NULL; + const LLViewerInventoryCategory* cat = model->getCategory(mUUID); + return (cat != NULL); } // +=================================================+ @@ -1099,7 +1060,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) gotoItem(); } - if ("open" == action) + if ("open" == action || "open_original" == action) { openItem(); return; @@ -1243,7 +1204,15 @@ void LLItemBridge::gotoItem() LLUIImagePtr LLItemBridge::getIcon() const { - return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]); + LLInventoryObject *obj = getInventoryObject(); + if (obj) + { + return LLInventoryIcon::getIcon(obj->getType(), + LLInventoryType::IT_NONE, + mIsLink); + } + + return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT); } PermissionMask LLItemBridge::getPermissionMask() const @@ -1406,13 +1375,65 @@ BOOL LLItemBridge::removeItem() { return FALSE; } + + // move it to the trash LLPreview::hide(mUUID, TRUE); LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; - const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); + const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); + LLViewerInventoryItem* item = getItem(); + if (!item) return FALSE; + + // Already in trash + if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; + + LLNotification::Params params("ConfirmItemDeleteHasLinks"); + params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); + + // Check if this item has any links. If generic inventory linking is enabled, + // we can't do this check because we may have items in a folder somewhere that is + // not yet in memory, so we don't want false negatives. (If disabled, then we + // know we only have links in the Outfits folder which we explicitly fetch.) + if (!gSavedSettings.getBOOL("InventoryLinking")) + { + if (!item->getIsLinkType()) + { + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLLinkedItemIDMatches is_linked_item_match(mUUID); + gInventory.collectDescendentsIf(gInventory.getRootFolderID(), + cat_array, + item_array, + LLInventoryModel::INCLUDE_TRASH, + is_linked_item_match); + + const U32 num_links = cat_array.size() + item_array.size(); + if (num_links > 0) + { + // Warn if the user is will break any links when deleting this item. + LLNotifications::instance().add(params); + return FALSE; + } + } + } + + LLNotifications::instance().forceResponse(params, 0); + return TRUE; +} + +BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return FALSE; + + LLInventoryModel* model = getInventoryModel(); + if (!model) return FALSE; + LLViewerInventoryItem* item = getItem(); + if (!item) return FALSE; + const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); // if item is not already in trash if(item && !model->isObjectDescendentOf(mUUID, trash_id)) { @@ -1421,11 +1442,7 @@ BOOL LLItemBridge::removeItem() // delete was successful return TRUE; } - else - { - // tried to delete already item in trash (should purge?) - return FALSE; - } + return FALSE; } BOOL LLItemBridge::isItemCopyable() const @@ -1445,17 +1462,11 @@ BOOL LLItemBridge::isItemCopyable() const return FALSE; } - if (gAgent.isGodlike()) - { - // 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())); - } + // 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; + // return (item->getPermissions().allowCopyBy(gAgent.getID())); } return FALSE; } @@ -1596,6 +1607,11 @@ BOOL LLFolderBridge::isUpToDate() const BOOL LLFolderBridge::isItemCopyable() const { + if (gSavedSettings.getBOOL("InventoryLinking")) + { + // Can copy folders to paste-as-link, but not for straight paste. + return TRUE; + } return FALSE; } @@ -1827,11 +1843,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, else { LLPointer<LLInventoryCallback> cb = NULL; + const std::string empty_description = ""; link_inventory_item( gAgent.getID(), inv_cat->getUUID(), mUUID, inv_cat->getName(), + empty_description, LLAssetType::AT_LINK_FOLDER, cb); } @@ -2319,23 +2337,39 @@ LLUIImagePtr LLFolderBridge::getIcon() const return getIcon(preferred_type); } -LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) +// static +LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type, BOOL is_link) { - // we only have one folder image now - if (preferred_type == LLFolderType::FT_OUTFIT) + // Bypassing LLViewerFolderType::lookup() since + // we aren't using different system folder icons + if (is_link) { - return LLUI::getUIImage("Inv_LookFolderClosed"); + if (preferred_type == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderClosed_Link"); + else + return LLUI::getUIImage("Inv_FolderClosed_Link"); } - return LLUI::getUIImage("Inv_FolderClosed"); + if (preferred_type == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderClosed"); + else + return LLUI::getUIImage("Inv_FolderClosed"); } LLUIImagePtr LLFolderBridge::getOpenIcon() const { - if (getPreferredType() == LLFolderType::FT_OUTFIT) + // Bypassing LLViewerFolderType::lookup() since + // we aren't using different system folder icons + if (isLink()) { - return LLUI::getUIImage("Inv_LookFolderOpen"); + if (getPreferredType() == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderOpen_Link"); + else + return LLUI::getUIImage("Inv_FolderOpen_Link"); } - return LLUI::getUIImage("Inv_FolderOpen"); + if (getPreferredType() == LLFolderType::FT_OUTFIT) + return LLUI::getUIImage("Inv_LookFolderOpen"); + else + return LLUI::getUIImage("Inv_FolderOpen"); } BOOL LLFolderBridge::renameItem(const std::string& new_name) @@ -2500,29 +2534,29 @@ void LLFolderBridge::pasteLinkFromClipboard() ++iter) { const LLUUID &object_id = (*iter); -#if SUPPORT_ENSEMBLES if (LLInventoryCategory *cat = model->getCategory(object_id)) { + const std::string empty_description = ""; link_inventory_item( gAgent.getID(), cat->getUUID(), parent_id, cat->getName(), + empty_description, LLAssetType::AT_LINK_FOLDER, LLPointer<LLInventoryCallback>(NULL)); } - else -#endif - if (LLInventoryItem *item = model->getItem(object_id)) - { - link_inventory_item( - gAgent.getID(), - item->getLinkedUUID(), - parent_id, - item->getName(), - LLAssetType::AT_LINK, - LLPointer<LLInventoryCallback>(NULL)); - } + else if (LLInventoryItem *item = model->getItem(object_id)) + { + link_inventory_item( + gAgent.getID(), + item->getLinkedUUID(), + parent_id, + item->getName(), + item->getDescription(), + LLAssetType::AT_LINK, + LLPointer<LLInventoryCallback>(NULL)); + } } } } @@ -2899,71 +2933,71 @@ void LLFolderBridge::createNewCategory(void* user_data) void LLFolderBridge::createNewShirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHIRT); } void LLFolderBridge::createNewPants(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_PANTS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_PANTS); } void LLFolderBridge::createNewShoes(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHOES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHOES); } void LLFolderBridge::createNewSocks(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SOCKS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SOCKS); } void LLFolderBridge::createNewJacket(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_JACKET); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_JACKET); } void LLFolderBridge::createNewSkirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SKIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SKIRT); } void LLFolderBridge::createNewGloves(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_GLOVES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_GLOVES); } void LLFolderBridge::createNewUndershirt(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_UNDERSHIRT); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_UNDERSHIRT); } void LLFolderBridge::createNewUnderpants(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_UNDERPANTS); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_UNDERPANTS); } void LLFolderBridge::createNewShape(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SHAPE); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SHAPE); } void LLFolderBridge::createNewSkin(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_SKIN); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_SKIN); } void LLFolderBridge::createNewHair(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_HAIR); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_HAIR); } void LLFolderBridge::createNewEyes(void* user_data) { - LLFolderBridge::createWearable((LLFolderBridge*)user_data, WT_EYES); + LLFolderBridge::createWearable((LLFolderBridge*)user_data, LLWearableType::WT_EYES); } // static -void LLFolderBridge::createWearable(LLFolderBridge* bridge, EWearableType type) +void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::EType type) { if(!bridge) return; LLUUID parent_id = bridge->getUUID(); @@ -2973,7 +3007,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, EWearableType type) // Separate function so can be called by global menu as well as right-click // menu. // static -void LLFolderBridge::createWearable(const LLUUID &parent_id, EWearableType type) +void LLFolderBridge::createWearable(const LLUUID &parent_id, LLWearableType::EType type) { LLWearable* wearable = LLWearableList::instance().createNewWearable(type); LLAssetType::EType asset_type = wearable->getAssetType(); @@ -3166,6 +3200,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, inv_item->getLinkedUUID(), mUUID, inv_item->getName(), + inv_item->getDescription(), LLAssetType::AT_LINK, cb); } @@ -3271,21 +3306,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } // +=================================================+ -// | LLScriptBridge (DEPRECTED) | -// +=================================================+ - -LLUIImagePtr LLScriptBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - -// +=================================================+ // | LLTextureBridge | // +=================================================+ LLUIImagePtr LLTextureBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_TEXTURE, mInvType, 0, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType, mIsLink); } void LLTextureBridge::openItem() @@ -3331,7 +3357,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Share")); } - items.push_back(std::string("Open")); + addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); getClipboardEntries(true, items, disabled_items, flags); @@ -3365,32 +3391,14 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action) // | LLSoundBridge | // +=================================================+ -LLUIImagePtr LLSoundBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); -} - void LLSoundBridge::openItem() { - LLViewerInventoryItem* item = getItem(); - + const LLViewerInventoryItem* item = getItem(); if (item) { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } -/* -// Changed this back to the way it USED to work: -// only open the preview dialog through the contextual right-click menu -// double-click just plays the sound - -LLViewerInventoryItem* item = getItem(); -if(item) -{ -openSoundPreview((void*)this); -//send_uuid_sound_trigger(item->getAssetUUID(), 1.0); } -*/ - } void LLSoundBridge::previewItem() { @@ -3455,7 +3463,7 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, LLUIImagePtr LLLandmarkBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mIsLink, mVisited, FALSE); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -3647,7 +3655,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, mIsLink, online, FALSE); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -3697,7 +3705,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { disabled_items.push_back(std::string("Share")); } - items.push_back(std::string("Open")); + addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); getClipboardEntries(true, items, disabled_items, flags); @@ -3805,39 +3813,19 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // | LLNotecardBridge | // +=================================================+ -LLUIImagePtr LLNotecardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); -} - void LLNotecardBridge::openItem() { LLViewerInventoryItem* item = getItem(); - if (item) { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } - -/* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); - } -*/ } - // +=================================================+ // | LLGestureBridge | // +=================================================+ -LLUIImagePtr LLGestureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); -} - LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const { if( LLGestureMgr::instance().isGestureActive(mUUID) ) @@ -3976,7 +3964,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if (!is_sidepanel) { - items.push_back(std::string("Open")); + addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); } @@ -4013,11 +4001,6 @@ void LLGestureBridge::playGesture(const LLUUID& item_id) // | LLAnimationBridge | // +=================================================+ -LLUIImagePtr LLAnimationBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); -} - void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { menuentry_vec_t items; @@ -4102,17 +4085,16 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags) : - LLItemBridge(inventory, root, uuid), - mInvType(type) + LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mInvType = type; } LLUIImagePtr LLObjectBridge::getIcon() const { - return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject ); + return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, mInvType, mIsLink, mAttachPt, mIsMultiObject); } LLInventoryObject* LLObjectBridge::getObject() const @@ -4432,11 +4414,6 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) // | LLLSLTextBridge | // +=================================================+ -LLUIImagePtr LLLSLTextBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - void LLLSLTextBridge::openItem() { LLViewerInventoryItem* item = getItem(); @@ -4456,12 +4433,12 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, - EWearableType wearable_type) : + LLWearableType::EType wearable_type) : LLItemBridge(inventory, root, uuid), mAssetType( asset_type ), - mInvType(inv_type), mWearableType(wearable_type) { + mInvType = inv_type; } // *NOTE: hack to get from avatar inventory to avatar @@ -4565,7 +4542,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ if (item->getType() == LLAssetType::AT_BODYPART) continue; if (gAgent.isTeen() && item->isWearableType() && - (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT)) + (item->getWearableType() == LLWearableType::WT_UNDERPANTS || item->getWearableType() == LLWearableType::WT_UNDERSHIRT)) continue; if (get_is_item_worn(item->getUUID())) { @@ -4643,7 +4620,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return get_item_icon(mAssetType, mInvType, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mIsLink, mWearableType, FALSE); } // virtual @@ -4714,7 +4691,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if (can_open && !is_sidepanel) { - items.push_back(std::string("Open")); + addOpenRightClickMenuOption(items); } if (!is_sidepanel) @@ -4987,10 +4964,10 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, { if( get_is_item_worn( item_id ) ) { - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); - if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES ) ) //&& - //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) + if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&& + //!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) ) { bool do_remove_all = false; U32 index = gAgentWearables.getWearableIndex(wearable); @@ -5010,14 +4987,14 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, void LLWearableBridge::removeAllClothesFromAvatar() { // Remove COF links. - for (S32 itype = WT_SHAPE; itype < WT_COUNT; ++itype) + for (S32 itype = LLWearableType::WT_SHAPE; itype < LLWearableType::WT_COUNT; ++itype) { - if (itype == WT_SHAPE || itype == WT_SKIN || itype == WT_HAIR || itype == WT_EYES) + if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES) continue; // MULTI-WEARABLES: fixed to index 0 LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>( - gAgentWearables.getWearableInventoryItem((EWearableType)itype, 0)); + gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, 0)); if (!item) continue; const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID()); @@ -5060,18 +5037,9 @@ void LLWearableBridge::removeFromAvatar() // | LLLinkItemBridge | // +=================================================+ // For broken item links + std::string LLLinkItemBridge::sPrefix("Link: "); -LLUIImagePtr LLLinkItemBridge::getIcon() const -{ - if (LLViewerInventoryItem *item = getItem()) - { - U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags - bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); - } - return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); -} void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate @@ -5101,16 +5069,24 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::string LLLinkFolderBridge::sPrefix("Link: "); LLUIImagePtr LLLinkFolderBridge::getIcon() const { - LLFolderType::EType preferred_type = LLFolderType::FT_NONE; - if (LLViewerInventoryItem *item = getItem()) + LLFolderType::EType folder_type = LLFolderType::FT_NONE; + const LLInventoryObject *obj = getInventoryObject(); + if (obj) { - if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) + LLViewerInventoryCategory* cat = NULL; + LLInventoryModel* model = getInventoryModel(); + if(model) { - preferred_type = cat->getPreferredType(); + cat = (LLViewerInventoryCategory*)model->getCategory(obj->getLinkedUUID()); + if (cat) + { + folder_type = cat->getPreferredType(); + } } } - return LLFolderBridge::getIcon(preferred_type); + return LLFolderBridge::getIcon(folder_type, TRUE); } + void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate @@ -5175,9 +5151,13 @@ const LLUUID &LLLinkFolderBridge::getFolderID() const // static void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type, - const LLUUID& uuid,LLInventoryModel* model) + const LLUUID& uuid, + LLInventoryModel* model) { - LLInvFVBridgeAction* action = createAction(asset_type,uuid,model); + // Perform indirection in case of link. + const LLUUID& linked_uuid = gInventory.getLinkedItemID(uuid); + + LLInvFVBridgeAction* action = createAction(asset_type,linked_uuid,model); if(action) { action->doIt(); @@ -5290,7 +5270,8 @@ protected: }; -class LLNotecardBridgeAction: public LLInvFVBridgeAction +class LLNotecardBridgeAction +: public LLInvFVBridgeAction { friend class LLInvFVBridgeAction; public: @@ -5523,3 +5504,67 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_ /** Bridge Actions ** ********************************************************************************/ + +/************************************************************************/ +/* Recent Inventory Panel related classes */ +/************************************************************************/ +void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + LLFolderBridge::buildContextMenu(menu, flags); + + menuentry_vec_t disabled_items, items = getMenuItems(); + + items.erase(std::find(items.begin(), items.end(), std::string("New Folder"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Script"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Note"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Gesture"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Clothes"))); + items.erase(std::find(items.begin(), items.end(), std::string("New Body Parts"))); + + hide_context_entries(menu, items, disabled_items); +} + +LLInvFVBridge* LLRecentInventoryBridgeBuilder::createBridge( + LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags /*= 0x00*/ ) const +{ + LLInvFVBridge* new_listener = NULL; + switch(asset_type) + { + case LLAssetType::AT_CATEGORY: + if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) + { + // *TODO: Create a link folder handler instead if it is necessary + new_listener = LLInventoryFVBridgeBuilder::createBridge( + asset_type, + actual_asset_type, + inv_type, + inventory, + root, + uuid, + flags); + break; + } + new_listener = new LLRecentItemsFolderBridge(inv_type, inventory, root, uuid); + break; + default: + new_listener = LLInventoryFVBridgeBuilder::createBridge( + asset_type, + actual_asset_type, + inv_type, + inventory, + root, + uuid, + flags); + } + return new_listener; + +} + + +// EOF diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index f378d219f6..c5efefac7e 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -74,21 +74,26 @@ public: U32 flags = 0x00); virtual ~LLInvFVBridge() {} - virtual const LLUUID& getUUID() const { return mUUID; } + BOOL isInOutfitsSidePanel() const; // allow context menus to be customized for side panel + BOOL canShare() const; + //-------------------------------------------------------------------- + // LLInvFVBridge functionality + //-------------------------------------------------------------------- + virtual const LLUUID& getUUID() const { return mUUID; } + virtual void clearDisplayName() {} virtual void restoreItem() {} virtual void restoreToWorld() {} - // LLFolderViewEventListener functions + //-------------------------------------------------------------------- + // Inherited LLFolderViewEventListener functions + //-------------------------------------------------------------------- virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; virtual PermissionMask getPermissionMask() const; virtual LLFolderType::EType getPreferredType() const; virtual time_t getCreationDate() const; - virtual LLFontGL::StyleFlags getLabelStyle() const - { - return LLFontGL::NORMAL; - } + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual void openItem() {} virtual void closeItem() {} @@ -99,7 +104,7 @@ public: virtual BOOL isItemRemovable() const; virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; - + virtual BOOL isLink() const; //virtual BOOL removeItem() = 0; virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch); virtual void move(LLFolderViewEventListener* new_parent_bridge) {} @@ -119,14 +124,6 @@ public: void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } - // LLInvFVBridge functionality - virtual void clearDisplayName() {} - - // Allow context menus to be customized for side panel. - bool isInOutfitsSidePanel() const; - - bool canShare(); - //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. //-------------------------------------------------------------------- @@ -135,7 +132,7 @@ protected: menuentry_vec_t &disabled_items); virtual void addDeleteContextMenuOptions(menuentry_vec_t &items, menuentry_vec_t &disabled_items); - + virtual void addOpenRightClickMenuOption(menuentry_vec_t &items); protected: LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); @@ -146,7 +143,7 @@ protected: BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? BOOL isAgentInventory() const; // false if lost or in the inventory library - BOOL isCOFFolder() const; // true if COF or descendent of. + BOOL isCOFFolder() const; // true if COF or descendent of virtual BOOL isItemPermissive() const; static void changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, @@ -162,11 +159,12 @@ protected: LLFolderView* mRoot; const LLUUID mUUID; // item id LLInventoryType::EType mInvType; + BOOL mIsLink; void purgeItem(LLInventoryModel *model, const LLUUID &uuid); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge +// Class LLInvFVBridgeBuilder // // This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. // It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. @@ -184,49 +182,6 @@ public: U32 flags = 0x00) const; }; -// Used by LLItemBridge::getIcon -enum EInventoryIcon -{ - TEXTURE_ICON_NAME, - SOUND_ICON_NAME, - CALLINGCARD_ONLINE_ICON_NAME, - CALLINGCARD_OFFLINE_ICON_NAME, - LANDMARK_ICON_NAME, - LANDMARK_VISITED_ICON_NAME, - SCRIPT_ICON_NAME, - CLOTHING_ICON_NAME, - OBJECT_ICON_NAME, - OBJECT_MULTI_ICON_NAME, - NOTECARD_ICON_NAME, - BODYPART_ICON_NAME, - SNAPSHOT_ICON_NAME, - - BODYPART_SHAPE_ICON_NAME, - BODYPART_SKIN_ICON_NAME, - BODYPART_HAIR_ICON_NAME, - BODYPART_EYES_ICON_NAME, - CLOTHING_SHIRT_ICON_NAME, - CLOTHING_PANTS_ICON_NAME, - CLOTHING_SHOES_ICON_NAME, - CLOTHING_SOCKS_ICON_NAME, - CLOTHING_JACKET_ICON_NAME, - CLOTHING_GLOVES_ICON_NAME, - CLOTHING_UNDERSHIRT_ICON_NAME, - CLOTHING_UNDERPANTS_ICON_NAME, - CLOTHING_SKIRT_ICON_NAME, - CLOTHING_ALPHA_ICON_NAME, - CLOTHING_TATTOO_ICON_NAME, - - ANIMATION_ICON_NAME, - GESTURE_ICON_NAME, - - LINKITEM_ICON_NAME, - LINKFOLDER_ICON_NAME, - - ICON_NAME_COUNT -}; -extern std::string ICON_NAME[ICON_NAME_COUNT]; - class LLItemBridge : public LLInvFVBridge { public: @@ -236,7 +191,6 @@ public: LLInvFVBridge(inventory, root, uuid) {} virtual void performAction(LLInventoryModel* model, std::string action); - virtual void selectItem(); virtual void restoreItem(); virtual void restoreToWorld(); @@ -255,28 +209,32 @@ public: virtual BOOL hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } - // override for LLInvFVBridge - virtual void clearDisplayName() { mDisplayName.clear(); } + /*virtual*/ void clearDisplayName() { mDisplayName.clear(); } LLViewerInventoryItem* getItem() const; - bool isAddAction(std::string action) const; bool isRemoveAction(std::string action) const; - protected: + BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); virtual BOOL isItemPermissive() const; static void buildDisplayName(LLInventoryItem* item, std::string& name); + mutable std::string mDisplayName; }; class LLFolderBridge : public LLInvFVBridge { - friend class LLInvFVBridge; public: - BOOL dragItemIntoFolder(LLInventoryItem* inv_item, - BOOL drop); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, - BOOL drop); + LLFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid), + mCallingCards(FALSE), + mWearables(FALSE), + mMenu(NULL) {} + BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop); + BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); @@ -287,7 +245,7 @@ public: virtual LLFolderType::EType getPreferredType() const; virtual LLUIImagePtr getIcon() const; virtual LLUIImagePtr getOpenIcon() const; - static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type, BOOL is_link = FALSE); virtual BOOL renameItem(const std::string& new_name); @@ -311,24 +269,17 @@ public: virtual BOOL isClipboardPasteableAsLink() const; virtual BOOL copyToClipboard() const; - static void createWearable(LLFolderBridge* bridge, EWearableType type); - static void createWearable(const LLUUID &parent_folder_id, EWearableType type); + static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type); + static void createWearable(const LLUUID &parent_folder_id, LLWearableType::EType type); LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), - mMenu(NULL) {} - - // menu callbacks + //-------------------------------------------------------------------- + // Menu callbacks + //-------------------------------------------------------------------- static void pasteClipboard(void* user_data); static void createNewCategory(void* user_data); - static void createNewShirt(void* user_data); static void createNewPants(void* user_data); static void createNewShoes(void* user_data); @@ -349,10 +300,17 @@ protected: void modifyOutfit(BOOL append); void determineFolderType(); + menuentry_vec_t getMenuItems() { return mItems; } // returns a copy of current menu items + + + //-------------------------------------------------------------------- + // Messy hacks for handling folder options + //-------------------------------------------------------------------- public: static LLFolderBridge* sSelf; static void staticFolderOptionsMenu(); void folderOptionsMenu(); + private: BOOL mCallingCards; BOOL mWearables; @@ -361,80 +319,59 @@ private: menuentry_vec_t mDisabledItems; }; -// DEPRECATED -class LLScriptBridge : public LLItemBridge -{ - friend class LLInvFVBridge; -public: - LLUIImagePtr getIcon() const; - -protected: - LLScriptBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid ) : - LLItemBridge(inventory, root, uuid) {} -}; - class LLTextureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLInventoryModel* model, std::string action); - -protected: LLTextureBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid, LLInventoryType::EType type) : - LLItemBridge(inventory, root, uuid), - mInvType(type) - {} + LLItemBridge(inventory, root, uuid) + { + mInvType = type; + } + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); bool canSaveTexture(void); - LLInventoryType::EType mInvType; }; class LLSoundBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; + LLSoundBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual void openItem(); virtual void previewItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void*); - -protected: - LLSoundBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} }; class LLLandmarkBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLUIImagePtr getIcon() const; virtual void openItem(); - -protected: - LLLandmarkBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00); protected: BOOL mVisited; }; class LLCallingCardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* folder, + const LLUUID& uuid ); + ~LLCallingCardBridge(); virtual std::string getLabelSuffix() const; //virtual const std::string& getDisplayName() const; virtual LLUIImagePtr getIcon() const; @@ -446,75 +383,57 @@ public: void* cargo_data); void refreshFolderViewItem(); protected: - LLCallingCardBridge(LLInventoryPanel* inventory, - LLFolderView* folder, - const LLUUID& uuid ); - ~LLCallingCardBridge(); -protected: LLCallingCardObserver* mObserver; }; - class LLNotecardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); -protected: LLNotecardBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLGestureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - + LLGestureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} // Only suffix for gesture items, not task items, because only // gestures in your inventory can be active. virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; - virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual BOOL removeItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - static void playGesture(const LLUUID& item_id); - -protected: - LLGestureBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) - : LLItemBridge(inventory, root, uuid) {} }; class LLAnimationBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - -protected: LLAnimationBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void openItem(); }; class LLObjectBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -522,38 +441,32 @@ public: virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); - LLInventoryObject* getObject() const; protected: - LLObjectBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLInventoryType::EType type, - U32 flags); -protected: - static LLUUID sContextMenuItemID; // Only valid while the context menu is open. - LLInventoryType::EType mInvType; + static LLUUID sContextMenuItemID; // Only valid while the context menu is open. U32 mAttachPt; BOOL mIsMultiObject; }; class LLLSLTextBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); -protected: LLLSLTextBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid ) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLWearableBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + LLWearableType::EType wearable_type); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -579,52 +492,38 @@ public: static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); - -protected: - LLWearableBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, - EWearableType wearable_type); protected: LLAssetType::EType mAssetType; - LLInventoryType::EType mInvType; - EWearableType mWearableType; + LLWearableType::EType mWearableType; }; class LLLinkItemBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -protected: LLLinkItemBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual const std::string& getPrefix() { return sPrefix; } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); protected: static std::string sPrefix; }; class LLLinkFolderBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLinkFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual const std::string& getPrefix() { return sPrefix; } virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); virtual void gotoItem(); protected: - LLLinkFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} const LLUUID &getFolderID() const; -protected: static std::string sPrefix; }; @@ -658,6 +557,41 @@ protected: LLInventoryModel* mModel; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Recent Inventory Panel related classes +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +// Overridden version of the Inventory-Folder-View-Bridge for Folders +class LLRecentItemsFolderBridge : public LLFolderBridge +{ +public: + // Creates context menu for Folders related to Recent Inventory Panel. + // Uses base logic and than removes from visible items "New..." menu items. + LLRecentItemsFolderBridge(LLInventoryType::EType type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLFolderBridge(inventory, root, uuid) + { + mInvType = type; + } + /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); +}; + +// Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel +class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder +{ +public: + // Overrides FolderBridge for Recent Inventory Panel. + // It use base functionality for bridges other than FolderBridge. + virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) const; +}; void wear_inventory_item_on_avatar(LLInventoryItem* item); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 1a488175ac..901a570487 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -329,9 +329,10 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) // appending new characters const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString); - mFilterSubString = string; + mFilterSubStringOrig = string; + LLStringUtil::trimHead(mFilterSubStringOrig); + mFilterSubString = mFilterSubStringOrig; LLStringUtil::toUpper(mFilterSubString); - LLStringUtil::trimHead(mFilterSubString); if (less_restrictive) { setModified(FILTER_LESS_RESTRICTIVE); diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index b01554edc8..2376ba5d22 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -84,6 +84,7 @@ public: void setFilterSubString(const std::string& string); const std::string& getFilterSubString(BOOL trim = FALSE) const; + const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; } BOOL hasFilterString() const; void setFilterPermissions(PermissionMask perms); @@ -181,6 +182,7 @@ private: std::string::size_type mSubStringMatchOffset; std::string mFilterSubString; + std::string mFilterSubStringOrig; const std::string mName; S32 mFilterGeneration; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 8487588404..2b4d9fb25c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1,5 +1,5 @@ /** - * @file llfloaterinventory.cpp + * @file llinventoryfunctions.cpp * @brief Implementation of the inventory view and associated stuff. * * $LicenseInfo:firstyear=2001&license=viewergpl$ @@ -87,45 +87,108 @@ BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; +// Generates a string containing the path to the item specified by +// item_id. +void append_path(const LLUUID& id, std::string& path) +{ + std::string temp; + const LLInventoryObject* obj = gInventory.getObject(id); + LLUUID parent_id; + if(obj) parent_id = obj->getParentUUID(); + std::string forward_slash("/"); + while(obj) + { + obj = gInventory.getCategory(parent_id); + if(obj) + { + temp.assign(forward_slash + obj->getName() + temp); + parent_id = obj->getParentUUID(); + } + } + path.append(temp); +} + +void change_item_parent(LLInventoryModel* model, + LLViewerInventoryItem* item, + const LLUUID& new_parent_id, + BOOL restamp) +{ + if (item->getParentUUID() != new_parent_id) + { + LLInventoryModel::update_list_t update; + LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1); + update.push_back(old_folder); + LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); + update.push_back(new_folder); + gInventory.accountForUpdate(update); + + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); + new_item->setParent(new_parent_id); + new_item->updateParentOnServer(restamp); + model->updateItem(new_item); + model->notifyObservers(); + } +} + + +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: + { + if (isAgentAvatarValid() && gAgentAvatarp->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 (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) + return TRUE; + break; + default: + break; + } + return FALSE; +} ///---------------------------------------------------------------------------- /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- // static -bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) +bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryItem* item) { if (!item) return false; - bool allowed = false; - switch(item->getType()) { case LLAssetType::AT_CALLINGCARD: - // not allowed + return false; break; - case LLAssetType::AT_OBJECT: if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID())) - { - allowed = true; - } + return true; break; - case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(!gAgentWearables.isWearingItem(item->getUUID())) - { - allowed = true; - } + return true; break; default: - allowed = true; + return true; break; } - - return allowed; + return false; } bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) @@ -406,179 +469,3 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); } } - -static void assign_clothing_bodypart_icon(EInventoryIcon &idx, U32 attachment_point) -{ - const EWearableType wearable_type = EWearableType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point); - switch(wearable_type) - { - case WT_SHAPE: - idx = BODYPART_SHAPE_ICON_NAME; - break; - case WT_SKIN: - idx = BODYPART_SKIN_ICON_NAME; - break; - case WT_HAIR: - idx = BODYPART_HAIR_ICON_NAME; - break; - case WT_EYES: - idx = BODYPART_EYES_ICON_NAME; - break; - case WT_SHIRT: - idx = CLOTHING_SHIRT_ICON_NAME; - break; - case WT_PANTS: - idx = CLOTHING_PANTS_ICON_NAME; - break; - case WT_SHOES: - idx = CLOTHING_SHOES_ICON_NAME; - break; - case WT_SOCKS: - idx = CLOTHING_SOCKS_ICON_NAME; - break; - case WT_JACKET: - idx = CLOTHING_JACKET_ICON_NAME; - break; - case WT_GLOVES: - idx = CLOTHING_GLOVES_ICON_NAME; - break; - case WT_UNDERSHIRT: - idx = CLOTHING_UNDERSHIRT_ICON_NAME; - break; - case WT_UNDERPANTS: - idx = CLOTHING_UNDERPANTS_ICON_NAME; - break; - case WT_SKIRT: - idx = CLOTHING_SKIRT_ICON_NAME; - break; - case WT_ALPHA: - idx = CLOTHING_ALPHA_ICON_NAME; - break; - case WT_TATTOO: - idx = CLOTHING_TATTOO_ICON_NAME; - break; - default: - break; - } -} - - -const std::string& get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ) -{ - EInventoryIcon idx = OBJECT_ICON_NAME; - if ( item_is_multi ) - { - idx = OBJECT_MULTI_ICON_NAME; - } - - switch(asset_type) - { - case LLAssetType::AT_TEXTURE: - if(LLInventoryType::IT_SNAPSHOT == inventory_type) - { - idx = SNAPSHOT_ICON_NAME; - } - else - { - idx = TEXTURE_ICON_NAME; - } - break; - - case LLAssetType::AT_SOUND: - idx = SOUND_ICON_NAME; - break; - case LLAssetType::AT_CALLINGCARD: - if(attachment_point!= 0) - { - idx = CALLINGCARD_ONLINE_ICON_NAME; - } - else - { - idx = CALLINGCARD_OFFLINE_ICON_NAME; - } - break; - case LLAssetType::AT_LANDMARK: - if(attachment_point!= 0) - { - idx = LANDMARK_VISITED_ICON_NAME; - } - else - { - idx = LANDMARK_ICON_NAME; - } - break; - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: - case LLAssetType::AT_LSL_BYTECODE: - idx = SCRIPT_ICON_NAME; - break; - case LLAssetType::AT_CLOTHING: - idx = CLOTHING_ICON_NAME; - assign_clothing_bodypart_icon(idx, attachment_point); - break; - case LLAssetType::AT_BODYPART: - idx = BODYPART_ICON_NAME; - assign_clothing_bodypart_icon(idx, attachment_point); - break; - case LLAssetType::AT_NOTECARD: - idx = NOTECARD_ICON_NAME; - break; - case LLAssetType::AT_ANIMATION: - idx = ANIMATION_ICON_NAME; - break; - case LLAssetType::AT_GESTURE: - idx = GESTURE_ICON_NAME; - break; - case LLAssetType::AT_LINK: - idx = LINKITEM_ICON_NAME; - break; - case LLAssetType::AT_LINK_FOLDER: - idx = LINKFOLDER_ICON_NAME; - break; - default: - break; - } - - return ICON_NAME[idx]; -} - -LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi) -{ - 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: - { - if (isAgentAvatarValid() && gAgentAvatarp->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 (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) - return TRUE; - break; - default: - break; - } - return FALSE; -} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index e3cd988e39..79b9b4a9cc 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -40,6 +40,27 @@ /******************************************************************************** ** ** + ** MISCELLANEOUS GLOBAL FUNCTIONS + **/ + +// Is this item or its baseitem is worn, attached, etc... +BOOL get_is_item_worn(const LLUUID& id); + + +void change_item_parent(LLInventoryModel* model, + LLViewerInventoryItem* item, + const LLUUID& new_parent_id, + BOOL restamp); + +// Generates a string containing the path to the item specified by item_id. +void append_path(const LLUUID& id, std::string& path); + +/** Miscellaneous global functions + ** ** + *******************************************************************************/ + +/******************************************************************************** + ** ** ** INVENTORY COLLECTOR FUNCTIONS **/ @@ -58,7 +79,7 @@ public: virtual ~LLInventoryCollectFunctor(){}; virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; - static bool itemTransferCommonlyAllowed(LLInventoryItem* item); + static bool itemTransferCommonlyAllowed(const LLInventoryItem* item); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -297,19 +318,6 @@ public: virtual void doItem(LLFolderViewItem* item); }; -const std::string& get_item_icon_name(LLAssetType::EType asset_type, - 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 ); - -// 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/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp new file mode 100644 index 0000000000..2fb55f4c1f --- /dev/null +++ b/indra/newview/llinventoryicon.cpp @@ -0,0 +1,187 @@ +/** + * @file llinventoryicon.cpp + * @brief Implementation of the inventory icon. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-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 "llinventoryicon.h" + +#include "lldictionary.h" +#include "llinventorydefines.h" +#include "llui.h" +#include "llwearabletype.h" + +struct IconEntry : public LLDictionaryEntry +{ + IconEntry(const std::string &item_name, + const std::string &link_name) + : + LLDictionaryEntry(item_name), + mLinkName(link_name) + {} + const std::string mLinkName; +}; + +class LLIconDictionary : public LLSingleton<LLIconDictionary>, + public LLDictionary<LLInventoryIcon::EIconName, IconEntry> +{ +public: + LLIconDictionary(); +}; + +LLIconDictionary::LLIconDictionary() +{ + addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture", "Inv_Texture_Link")); + addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture", "Inv_Texture_Link")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); + addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard", "Inv_CallingCard_Link")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); + addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark", "Inv_Landmark_Link")); + addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script", "Inv_Script_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing", "Inv_Clothing_Link")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object", "Inv_Object_Link")); + addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi", "Inv_Object_Multi_Link")); + addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard", "Inv_Notecard_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin", "Inv_Skin_Link")); + addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot", "Inv_Snapshot_Link")); + + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape", "Inv_BodyShape_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin", "Inv_Skin_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair", "Inv_Hair_Link")); + addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye", "Inv_Eye_Link")); + + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt", "Inv_Shirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants", "Inv_Pants_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe", "Inv_Shoe_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks", "Inv_Socks_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket", "Inv_Jacket_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves", "Inv_Gloves_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt", "Inv_Undershirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants", "Inv_Underpants_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt", "Inv_Skirt_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha", "Inv_Alpha_Link")); + addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo", "Inv_Tattoo_Link")); + addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation", "Inv_Animation_Link")); + addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture", "Inv_Gesture_Link")); + + addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); + addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem", "Inv_LinkItem")); + + addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE", "NONE")); +} + +LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + BOOL item_is_link, + U32 misc_flag, + BOOL item_is_multi) +{ + const std::string& icon_name = getIconName(asset_type, inventory_type, item_is_link, misc_flag, item_is_multi); + return LLUI::getUIImage(icon_name); +} + +LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx) +{ + return LLUI::getUIImage(getIconName(idx)); +} + +const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type, + BOOL item_is_link, + U32 misc_flag, + BOOL item_is_multi) +{ + EIconName idx = ICONNAME_OBJECT; + if (item_is_multi) + { + idx = ICONNAME_OBJECT_MULTI; + } + + switch(asset_type) + { + case LLAssetType::AT_TEXTURE: + idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? ICONNAME_SNAPSHOT : ICONNAME_TEXTURE; + break; + case LLAssetType::AT_SOUND: + idx = ICONNAME_SOUND; + break; + case LLAssetType::AT_CALLINGCARD: + idx = (misc_flag != 0) ? ICONNAME_CALLINGCARD_ONLINE : ICONNAME_CALLINGCARD_OFFLINE; + break; + case LLAssetType::AT_LANDMARK: + idx = (misc_flag != 0) ? ICONNAME_LANDMARK_VISITED : ICONNAME_LANDMARK; + break; + case LLAssetType::AT_SCRIPT: + case LLAssetType::AT_LSL_TEXT: + case LLAssetType::AT_LSL_BYTECODE: + idx = ICONNAME_SCRIPT; + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + idx = assignWearableIcon(misc_flag); + break; + case LLAssetType::AT_NOTECARD: + idx = ICONNAME_NOTECARD; + break; + case LLAssetType::AT_ANIMATION: + idx = ICONNAME_ANIMATION; + break; + case LLAssetType::AT_GESTURE: + idx = ICONNAME_GESTURE; + break; + case LLAssetType::AT_LINK: + idx = ICONNAME_LINKITEM; + break; + case LLAssetType::AT_LINK_FOLDER: + idx = ICONNAME_LINKFOLDER; + break; + case LLAssetType::AT_OBJECT: + idx = ICONNAME_OBJECT; + break; + default: + break; + } + + return getIconName(idx, item_is_link); +} + + +const std::string& LLInventoryIcon::getIconName(EIconName idx, BOOL item_is_link) +{ + const IconEntry *entry = LLIconDictionary::instance().lookup(idx); + if (item_is_link) return entry->mLinkName; + return entry->mName; +} + +LLInventoryIcon::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag) +{ + const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag); + return LLWearableType::getIconName(wearable_type); +} diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h new file mode 100644 index 0000000000..4cb7a123c4 --- /dev/null +++ b/indra/newview/llinventoryicon.h @@ -0,0 +1,108 @@ +/** + * @file llinventoryfunctions.h + * @brief Miscellaneous inventory-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-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_LLINVENTORYICON_H +#define LL_LLINVENTORYICON_H + +#include "llassettype.h" +#include "llinventorytype.h" +#include "lluiimage.h" + +class LLInventoryIcon +{ +public: + enum EIconName + { + ICONNAME_TEXTURE, + ICONNAME_SOUND, + ICONNAME_CALLINGCARD_ONLINE, + ICONNAME_CALLINGCARD_OFFLINE, + ICONNAME_LANDMARK, + ICONNAME_LANDMARK_VISITED, + ICONNAME_SCRIPT, + ICONNAME_CLOTHING, + ICONNAME_OBJECT, + ICONNAME_OBJECT_MULTI, + ICONNAME_NOTECARD, + ICONNAME_BODYPART, + ICONNAME_SNAPSHOT, + + ICONNAME_BODYPART_SHAPE, + ICONNAME_BODYPART_SKIN, + ICONNAME_BODYPART_HAIR, + ICONNAME_BODYPART_EYES, + ICONNAME_CLOTHING_SHIRT, + ICONNAME_CLOTHING_PANTS, + ICONNAME_CLOTHING_SHOES, + ICONNAME_CLOTHING_SOCKS, + ICONNAME_CLOTHING_JACKET, + ICONNAME_CLOTHING_GLOVES, + ICONNAME_CLOTHING_UNDERSHIRT, + ICONNAME_CLOTHING_UNDERPANTS, + ICONNAME_CLOTHING_SKIRT, + ICONNAME_CLOTHING_ALPHA, + ICONNAME_CLOTHING_TATTOO, + + ICONNAME_ANIMATION, + ICONNAME_GESTURE, + + ICONNAME_LINKITEM, + ICONNAME_LINKFOLDER, + + ICONNAME_COUNT, + + ICONNAME_NONE = -1 + }; + + static const std::string& getIconName(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + BOOL item_is_link = FALSE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static const std::string& getIconName(EIconName idx, + BOOL item_is_link = FALSE); + + static LLUIImagePtr getIcon(LLAssetType::EType asset_type, + LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, + BOOL item_is_link = FALSE, + U32 misc_flag = 0, // different meanings depending on item type + BOOL item_is_multi = FALSE); + static LLUIImagePtr getIcon(EIconName idx); + +protected: + static EIconName assignWearableIcon(U32 misc_flag); +}; +#endif // LL_LLINVENTORYICON_H + + + diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp new file mode 100644 index 0000000000..2d1d401cd4 --- /dev/null +++ b/indra/newview/llinventoryitemslist.cpp @@ -0,0 +1,456 @@ +/** + * @file llinventoryitemslist.cpp + * @brief A list of inventory items represented by LLFlatListView. + * + * Class LLInventoryItemsList implements a flat list of inventory items. + * Class LLPanelInventoryListItem displays inventory item as an element + * of LLInventoryItemsList. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llinventoryitemslist.h" + +// llcommon +#include "llcommonutils.h" + +// llui +#include "lliconctrl.h" +#include "lluitextutil.h" + +#include "llcallbacklist.h" +#include "llinventoryfunctions.h" +#include "llinventorymodel.h" +#include "lltrans.h" + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +static const S32 WIDGET_SPACING = 3; + +LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item) +{ + LLPanelInventoryListItemBase* list_item = NULL; + if (item) + { + list_item = new LLPanelInventoryListItemBase(item); + list_item->init(); + } + return list_item; +} + +void LLPanelInventoryListItemBase::draw() +{ + if (getNeedsRefresh()) + { + updateItem(); + setNeedsRefresh(false); + } + LLPanel::draw(); +} + +void LLPanelInventoryListItemBase::updateItem() +{ + setIconImage(mIconImage); + setTitle(mItem->getName(), mHighlightedText); +} + +void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/) +{ + LLUICtrl* ctrl = findChild<LLUICtrl>(name); + if(ctrl) + { + addWidgetToLeftSide(ctrl, show_widget); + } +} + +void LLPanelInventoryListItemBase::addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget/* = true*/) +{ + mLeftSideWidgets.push_back(ctrl); + setShowWidget(ctrl, show_widget); +} + +void LLPanelInventoryListItemBase::addWidgetToRightSide(const std::string& name, bool show_widget/* = true*/) +{ + LLUICtrl* ctrl = findChild<LLUICtrl>(name); + if(ctrl) + { + addWidgetToRightSide(ctrl, show_widget); + } +} + +void LLPanelInventoryListItemBase::addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget/* = true*/) +{ + mRightSideWidgets.push_back(ctrl); + setShowWidget(ctrl, show_widget); +} + +void LLPanelInventoryListItemBase::setShowWidget(const std::string& name, bool show) +{ + LLUICtrl* widget = findChild<LLUICtrl>(name); + if(widget) + { + setShowWidget(widget, show); + } +} + +void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) +{ + // Enable state determines whether widget may become visible in setWidgetsVisible() + ctrl->setEnabled(show); +} + +BOOL LLPanelInventoryListItemBase::postBuild() +{ + setIconCtrl(getChild<LLIconCtrl>("item_icon")); + setTitleCtrl(getChild<LLTextBox>("item_name")); + + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getIsLinkType(), mItem->getFlags(), FALSE); + + setNeedsRefresh(true); + + setWidgetsVisible(false); + reshapeWidgets(); + + return TRUE; +} + +void LLPanelInventoryListItemBase::setValue(const LLSD& value) +{ + if (!value.isMap()) return; + if (!value.has("selected")) return; + childSetVisible("selected_icon", value["selected"]); +} + +void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask) +{ + childSetVisible("hovered_icon", true); + LLPanel::onMouseEnter(x, y, mask); +} + +void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) +{ + childSetVisible("hovered_icon", false); + LLPanel::onMouseLeave(x, y, mask); +} + +S32 LLPanelInventoryListItemBase::notify(const LLSD& info) +{ + S32 rv = 0; + if(info.has("match_filter")) + { + mHighlightedText = info["match_filter"].asString(); + + std::string test(mItem->getName()); + LLStringUtil::toUpper(test); + + if(mHighlightedText.empty() || std::string::npos != test.find(mHighlightedText)) + { + rv = 0; // substring is found + } + else + { + rv = -1; + } + + setNeedsRefresh(true); + } + else + { + rv = LLPanel::notify(info); + } + return rv; +} + +LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item) +: LLPanel() +, mItem(item) +, mIconCtrl(NULL) +, mTitleCtrl(NULL) +, mWidgetSpacing(WIDGET_SPACING) +, mLeftWidgetsWidth(0) +, mRightWidgetsWidth(0) +, mNeedsRefresh(false) +{ +} + +void LLPanelInventoryListItemBase::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); +} + +class WidgetVisibilityChanger +{ +public: + WidgetVisibilityChanger(bool visible) : mVisible(visible){} + void operator()(LLUICtrl* widget) + { + // Disabled widgets never become visible. see LLPanelInventoryListItemBase::setShowWidget() + widget->setVisible(mVisible && widget->getEnabled()); + } +private: + bool mVisible; +}; + +void LLPanelInventoryListItemBase::setWidgetsVisible(bool visible) +{ + std::for_each(mLeftSideWidgets.begin(), mLeftSideWidgets.end(), WidgetVisibilityChanger(visible)); + std::for_each(mRightSideWidgets.begin(), mRightSideWidgets.end(), WidgetVisibilityChanger(visible)); +} + +void LLPanelInventoryListItemBase::reshapeWidgets() +{ + // disabled reshape left for now to reserve space for 'delete' button in LLPanelClothingListItem + /*reshapeLeftWidgets();*/ + reshapeRightWidgets(); + reshapeMiddleWidgets(); +} + +void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image) +{ + if(image) + { + mIconImage = image; + mIconCtrl->setImage(mIconImage); + } +} + +void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text) +{ + LLTextUtil::textboxSetHighlightedVal( + mTitleCtrl, + LLStyle::Params(), + title, + highlit_text); +} + +void LLPanelInventoryListItemBase::reshapeLeftWidgets() +{ + S32 widget_left = 0; + mLeftWidgetsWidth = 0; + + widget_array_t::const_iterator it = mLeftSideWidgets.begin(); + const widget_array_t::const_iterator it_end = mLeftSideWidgets.end(); + for( ; it_end != it; ++it) + { + LLUICtrl* widget = *it; + if(!widget->getVisible()) + { + continue; + } + LLRect widget_rect(widget->getRect()); + widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight()); + widget->setShape(widget_rect); + + widget_left += widget_rect.getWidth() + getWidgetSpacing(); + mLeftWidgetsWidth = widget_rect.mRight; + } +} + +void LLPanelInventoryListItemBase::reshapeRightWidgets() +{ + S32 widget_right = getLocalRect().getWidth(); + S32 widget_left = widget_right; + + widget_array_t::const_reverse_iterator it = mRightSideWidgets.rbegin(); + const widget_array_t::const_reverse_iterator it_end = mRightSideWidgets.rend(); + for( ; it_end != it; ++it) + { + LLUICtrl* widget = *it; + if(!widget->getVisible()) + { + continue; + } + LLRect widget_rect(widget->getRect()); + widget_left = widget_right - widget_rect.getWidth(); + widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight()); + widget->setShape(widget_rect); + + widget_right = widget_left - getWidgetSpacing(); + } + mRightWidgetsWidth = getLocalRect().getWidth() - widget_left; +} + +void LLPanelInventoryListItemBase::reshapeMiddleWidgets() +{ + LLRect icon_rect(mIconCtrl->getRect()); + icon_rect.setLeftTopAndSize(mLeftWidgetsWidth + getWidgetSpacing(), icon_rect.mTop, + icon_rect.getWidth(), icon_rect.getHeight()); + mIconCtrl->setShape(icon_rect); + + S32 name_left = icon_rect.mRight + getWidgetSpacing(); + S32 name_right = getLocalRect().getWidth() - mRightWidgetsWidth - getWidgetSpacing(); + LLRect name_rect(mTitleCtrl->getRect()); + name_rect.set(name_left, name_rect.mTop, name_right, name_rect.mBottom); + mTitleCtrl->setShape(name_rect); +} + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +LLInventoryItemsList::Params::Params() +{} + +LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p) +: LLFlatListViewEx(p) +, mNeedsRefresh(false) +, mPrevVisibility(false) +{ + // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView + // but reset to true in all derived classes. This settings might need to + // be added to LLFlatListView::Params() and/or set to "true" by default. + setCommitOnSelectionChange(true); + + setNoFilteredItemsMsg(LLTrans::getString("InventoryNoMatchingItems")); + + gIdleCallbacks.addFunction(idle, this); +} + +// virtual +LLInventoryItemsList::~LLInventoryItemsList() +{} + +void LLInventoryItemsList::refreshList(const LLInventoryModel::item_array_t item_array) +{ + getIDs().clear(); + LLInventoryModel::item_array_t::const_iterator it = item_array.begin(); + for( ; item_array.end() != it; ++it) + { + getIDs().push_back((*it)->getUUID()); + } + mNeedsRefresh = true; +} + +boost::signals2::connection LLInventoryItemsList::setRefreshCompleteCallback(const commit_signal_t::slot_type& cb) +{ + return mRefreshCompleteSignal.connect(cb); +} + +void LLInventoryItemsList::doIdle() +{ + bool cur_visibility = getVisible(); + if(cur_visibility != mPrevVisibility || mNeedsRefresh) + { + refresh(); + + mRefreshCompleteSignal(this, LLSD()); + + mPrevVisibility = getVisible(); + } +} + +//static +void LLInventoryItemsList::idle(void* user_data) +{ + LLInventoryItemsList* self = static_cast<LLInventoryItemsList*>(user_data); + if ( self ) + { // Do the real idle + self->doIdle(); + } +} + +void LLInventoryItemsList::refresh() +{ + static const unsigned ADD_LIMIT = 50; + + uuid_vec_t added_items; + uuid_vec_t removed_items; + + computeDifference(getIDs(), added_items, removed_items); + + bool add_limit_exceeded = false; + unsigned nadded = 0; + + uuid_vec_t::const_iterator it = added_items.begin(); + for( ; added_items.end() != it; ++it) + { + if(nadded >= ADD_LIMIT) + { + add_limit_exceeded = true; + break; + } + LLViewerInventoryItem* item = gInventory.getItem(*it); + // Do not rearrange items on each adding, let's do that on filter call + addNewItem(item, false); + ++nadded; + } + + it = removed_items.begin(); + for( ; removed_items.end() != it; ++it) + { + removeItemByUUID(*it); + } + + // Filter, rearrange and notify parent about shape changes + filterItems(); + + bool needs_refresh = add_limit_exceeded; + setNeedsRefresh(needs_refresh); +} + +void LLInventoryItemsList::computeDifference( + const uuid_vec_t& vnew, + uuid_vec_t& vadded, + uuid_vec_t& vremoved) +{ + uuid_vec_t vcur; + { + std::vector<LLSD> vcur_values; + getValues(vcur_values); + + for (size_t i=0; i<vcur_values.size(); i++) + vcur.push_back(vcur_values[i].asUUID()); + } + + LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved); +} + +void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/) +{ + if (!item) + { + llwarns << "No inventory item. Couldn't create flat list item." << llendl; + llassert(item != NULL); + } + + LLPanelInventoryListItemBase *list_item = LLPanelInventoryListItemBase::create(item); + if (!list_item) + return; + + bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange); + if (!is_item_added) + { + llwarns << "Couldn't add flat list item." << llendl; + llassert(is_item_added); + } +} + +// EOF diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h new file mode 100644 index 0000000000..60cccc0f4f --- /dev/null +++ b/indra/newview/llinventoryitemslist.h @@ -0,0 +1,267 @@ +/** + * @file llinventoryitemslist.h + * @brief A list of inventory items represented by LLFlatListView. + * + * Class LLInventoryItemsList implements a flat list of inventory items. + * Class LLPanelInventoryListItem displays inventory item as an element + * of LLInventoryItemsList. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLINVENTORYITEMSLIST_H +#define LL_LLINVENTORYITEMSLIST_H + +#include "lldarray.h" + +#include "llpanel.h" + +// newview +#include "llflatlistview.h" +#include "llviewerinventory.h" + +class LLIconCtrl; +class LLTextBox; +class LLViewerInventoryItem; + +/** + * @class LLPanelInventoryListItemBase + * + * Base class for Inventory flat list item. Panel consists of inventory icon + * and inventory item name. + * This class is able to display widgets(buttons) on left(before icon) and right(after text-box) sides + * of panel. + * + * How to use (see LLPanelClothingListItem for example): + * - implement init() to build panel from xml + * - create new xml file, fill it with widgets you want to dynamically show/hide/reshape on left/right sides + * - redefine postBuild()(call base implementation) and add needed widgets to needed sides, + * + */ +class LLPanelInventoryListItemBase : public LLPanel +{ +public: + static LLPanelInventoryListItemBase* create(LLViewerInventoryItem* item); + + virtual void draw(); + + /** + * Let item know it need to be refreshed in next draw() + */ + void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; } + + bool getNeedsRefresh(){ return mNeedsRefresh; } + + /** + * Add widget to left side + */ + void addWidgetToLeftSide(const std::string& name, bool show_widget = true); + void addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget = true); + + /** + * Add widget to right side, widget is supposed to be child of calling panel + */ + void addWidgetToRightSide(const std::string& name, bool show_widget = true); + void addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget = true); + + /** + * Mark widgets as visible. Only visible widgets take part in reshaping children + */ + void setShowWidget(const std::string& name, bool show); + void setShowWidget(LLUICtrl* ctrl, bool show); + + /** + * Set spacing between widgets during reshape + */ + void setWidgetSpacing(S32 spacing) { mWidgetSpacing = spacing; } + + S32 getWidgetSpacing() { return mWidgetSpacing; } + + /** + * Inheritors need to call base implementation of postBuild() + */ + /*virtual*/ BOOL postBuild(); + + /** + * Handles item selection + */ + /*virtual*/ void setValue(const LLSD& value); + + /** + * Handles filter request + */ + /*virtual*/ S32 notify(const LLSD& info); + + /* Highlights item */ + /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + /* Removes item highlight */ + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + + /** Get the name of a corresponding inventory item */ + const std::string& getItemName() const { return mItem->getName(); } + + virtual ~LLPanelInventoryListItemBase(){} + +protected: + + LLPanelInventoryListItemBase(LLViewerInventoryItem* item); + + typedef std::vector<LLUICtrl*> widget_array_t; + + /** + * Use it from a factory function to build panel, do not build panel in constructor + */ + virtual void init(); + + /** + * Called after inventory item was updated, update panel widgets to reflect inventory changes. + */ + virtual void updateItem(); + + /** setter for mIconCtrl */ + void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } + /** setter for MTitleCtrl */ + void setTitleCtrl(LLTextBox* tb) { mTitleCtrl = tb; } + + void setLeftWidgetsWidth(S32 width) { mLeftWidgetsWidth = width; } + void setRightWidgetsWidth(S32 width) { mRightWidgetsWidth = width; } + + /** + * Set all widgets from both side visible/invisible. Only enabled widgets + * (see setShowWidget()) can become visible + */ + virtual void setWidgetsVisible(bool visible); + + /** + * Reshape all child widgets - icon, text-box and side widgets + */ + virtual void reshapeWidgets(); + + /** set wearable type icon image */ + void setIconImage(const LLUIImagePtr& image); + + /** Set item title - inventory item name usually */ + void setTitle(const std::string& title, const std::string& highlit_text); + +private: + + /** reshape left side widgets + * Deprecated for now. Disabled reshape left for now to reserve space for 'delete' + * button in LLPanelClothingListItem according to Neal's comment (https://codereview.productengine.com/secondlife/r/325/) + */ + void reshapeLeftWidgets(); + + /** reshape right side widgets */ + void reshapeRightWidgets(); + + /** reshape remaining widgets */ + void reshapeMiddleWidgets(); + + LLViewerInventoryItem* mItem; + + LLIconCtrl* mIconCtrl; + LLTextBox* mTitleCtrl; + + LLUIImagePtr mIconImage; + std::string mHighlightedText; + + widget_array_t mLeftSideWidgets; + widget_array_t mRightSideWidgets; + S32 mWidgetSpacing; + + S32 mLeftWidgetsWidth; + S32 mRightWidgetsWidth; + bool mNeedsRefresh; +}; + +////////////////////////////////////////////////////////////////////////// + +class LLInventoryItemsList : public LLFlatListViewEx +{ +public: + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> + { + Params(); + }; + + virtual ~LLInventoryItemsList(); + + void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array); + + boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb); + + /** + * Let list know items need to be refreshed in next doIdle() + */ + void setNeedsRefresh(bool needs_refresh){ mNeedsRefresh = needs_refresh; } + + bool getNeedsRefresh(){ return mNeedsRefresh; } + + /** + * Idle routine used to refresh the list regardless of the current list + * visibility, unlike draw() which is called only for the visible list. + * This is needed for example to filter items of the list hidden by closed + * accordion tab. + */ + void doIdle(); // Real idle routine + static void idle(void* user_data); // static glue to doIdle() + +protected: + friend class LLUICtrlFactory; + LLInventoryItemsList(const LLInventoryItemsList::Params& p); + + uuid_vec_t& getIDs() { return mIDs; } + + /** + * Refreshes list items, adds new items and removes deleted items. + * Called from doIdle() until all new items are added, + * maximum 50 items can be added during single call. + */ + void refresh(); + + /** + * Compute difference between new items and current items, fills 'vadded' with added items, + * 'vremoved' with removed items. See LLCommonUtils::computeDifference + */ + void computeDifference(const uuid_vec_t& vnew, uuid_vec_t& vadded, uuid_vec_t& vremoved); + + /** + * Add an item to the list + */ + virtual void addNewItem(LLViewerInventoryItem* item, bool rearrange = true); + +private: + uuid_vec_t mIDs; // IDs of items that were added in refreshList(). + // Will be used in refresh() to determine added and removed ids + bool mNeedsRefresh; + + bool mPrevVisibility; + + commit_signal_t mRefreshCompleteSignal; +}; + +#endif //LL_LLINVENTORYITEMSLIST_H diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 6452ae82f8..a527694d25 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -319,30 +319,18 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id) // specifies 'type' as what it defaults to containing. The category is // not necessarily only for that type. *NOTE: This will create a new // inventory category on the fly if one does not exist. -const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder, bool find_in_library) -{ - const LLUUID &rv = findCatUUID(t, find_in_library); - if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) - { - const LLUUID &root_id = gInventory.getRootFolderID(); - if(root_id.notNull()) - { - return createNewCategory(root_id, t, LLStringUtil::null); - } - } - return rv; -} - -// Internal method which looks for a category with the specified -// preferred type. Returns LLUUID::null if not found. -const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, bool find_in_library) const +const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType preferred_type, + bool create_folder, + bool find_in_library) { + LLUUID rv = LLUUID::null; + const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID(); if(LLFolderType::FT_ROOT_INVENTORY == preferred_type) { - return root_id; + rv = root_id; } - if(root_id.notNull()) + else if (root_id.notNull()) { cat_array_t* cats = NULL; cats = get_ptr_in_map(mParentChildCategoryTree, root_id); @@ -353,12 +341,21 @@ const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, { if(cats->get(i)->getPreferredType() == preferred_type) { - return cats->get(i)->getUUID(); + rv = cats->get(i)->getUUID(); + break; } } } } - return LLUUID::null; + + if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) + { + if(root_id.notNull()) + { + return createNewCategory(root_id, preferred_type, LLStringUtil::null); + } + } + return rv; } // Convenience function to create a new category. You could call @@ -583,27 +580,6 @@ LLInventoryModel::item_array_t LLInventoryModel::collectLinkedItems(const LLUUID return items; } -// Generates a string containing the path to the item specified by -// item_id. -void LLInventoryModel::appendPath(const LLUUID& id, std::string& path) const -{ - std::string temp; - const LLInventoryObject* obj = getObject(id); - LLUUID parent_id; - if(obj) parent_id = obj->getParentUUID(); - std::string forward_slash("/"); - while(obj) - { - obj = getCategory(parent_id); - if(obj) - { - temp.assign(forward_slash + obj->getName() + temp); - parent_id = obj->getParentUUID(); - } - } - path.append(temp); -} - bool LLInventoryModel::isInventoryUsable() const { bool result = false; @@ -1024,98 +1000,6 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) } } -void LLInventoryModel::deleteFromServer(LLDynamicArray<LLUUID>& category_ids, - LLDynamicArray<LLUUID>& item_ids) -{ - // Store off tre UUIDS of parents which are being deleted (thus no - // need to increment) and the parents which are being modified. We - // have to increment the version of the parent with each message - // sent upstream since the dataserver will increment each unique - // parent per update message. - std::set<LLUUID> ignore_parents; - update_map_t inc_parents; - - S32 i; - S32 count = category_ids.count(); - BOOL start_new_message = TRUE; - LLMessageSystem* msg = gMessageSystem; - LLPointer<LLViewerInventoryCategory> cat; - for(i = 0; i < count; i++) - { - if(start_new_message) - { - start_new_message = FALSE; - msg->newMessageFast(_PREHASH_RemoveInventoryObjects); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - } - LLUUID cat_id = category_ids.get(i); - - msg->nextBlockFast(_PREHASH_FolderData); - msg->addUUIDFast(_PREHASH_FolderID, cat_id); - cat = getCategory(cat_id); - ignore_parents.insert(cat_id); - addChangedMask(LLInventoryObserver::REMOVE | LLInventoryObserver::STRUCTURE, cat_id); - if(cat.notNull() && (ignore_parents.find(cat->getParentUUID())==ignore_parents.end())) - { - --inc_parents[cat->getParentUUID()]; - } - if(msg->isSendFullFast(_PREHASH_FolderData)) - { - start_new_message = TRUE; - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, LLUUID::null); - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - inc_parents.clear(); - } - } - - count = item_ids.count(); - std::set<LLUUID>::iterator not_ignored = ignore_parents.end(); - LLPointer<LLViewerInventoryItem> item; - if((0 == count) && (!start_new_message)) - { - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, LLUUID::null); - } - for(i = 0; i < count; i++) - { - if(start_new_message) - { - start_new_message = FALSE; - msg->newMessageFast(_PREHASH_RemoveInventoryObjects); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_FolderData); - msg->addUUIDFast(_PREHASH_FolderID, LLUUID::null); - } - LLUUID item_id = item_ids.get(i); - msg->nextBlockFast(_PREHASH_ItemData); - msg->addUUIDFast(_PREHASH_ItemID, item_id); - item = getItem(item_id); - addChangedMask(LLInventoryObserver::REMOVE | LLInventoryObserver::STRUCTURE, item_id); - if(item.notNull() && (ignore_parents.find(item->getParentUUID()) == not_ignored)) - { - --inc_parents[item->getParentUUID()]; - } - if(msg->isSendFullFast(_PREHASH_ItemData)) - { - start_new_message = TRUE; - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - inc_parents.clear(); - } - } - if(!start_new_message) - { - gAgent.sendReliableMessage(); - accountForUpdate(inc_parents); - } -} - // Add/remove an observer. If the observer is destroyed, be sure to // remove it. void LLInventoryModel::addObserver(LLInventoryObserver* observer) @@ -1206,29 +1090,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) } } -// This method to prepares a set of mock inventory which provides -// minimal functionality before the actual arrival of inventory. -/* -void LLInventoryModel::mock(const LLUUID& root_id) -{ - llinfos << "LLInventoryModel::mock() " << root_id << llendl; - if(root_id.isNull()) - { - llwarns << "Not a valid root id" << llendl; - return; - } - LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory( - root_id, - LLUUID::null, - LLAssetType::AT_CATEGORY, - LLFolderType::lookupNewCategoryName(LLFolderType::FT_ROOT_INVENTORY), - gAgent.getID()); - addCategory(cat); - gInventory.buildParentChildMap(); -} -*/ - -//If we get back a normal response, handle it here +// If we get back a normal response, handle it here void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) { start_new_inventory_observer(); @@ -1301,7 +1163,7 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str gInventory.notifyObservers("fetchinventory"); } -bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) +bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const { if(folder_id.isNull()) { @@ -1329,7 +1191,6 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) return cat->fetch(); } - void LLInventoryModel::cache( const LLUUID& parent_folder_id, const LLUUID& agent_id) @@ -1837,88 +1698,6 @@ bool LLInventoryModel::loadSkeleton( return rv; } -bool LLInventoryModel::loadMeat(const LLSD& options, const LLUUID& owner_id) -{ - llinfos << "importing inventory for " << owner_id << llendl; - bool rv = true; - for(LLSD::array_const_iterator it = options.beginArray(), - end = options.endArray(); it != end; ++it) - { - LLSD name = (*it)["name"]; - LLSD item_id = (*it)["item_id"]; - LLSD parent_id = (*it)["parent_id"]; - LLSD asset_type = (*it)["type"]; - LLSD data_id = (*it)["data_id"]; - if(name.isDefined() - && item_id.isDefined() - && parent_id.isDefined() - && asset_type.isDefined() - && data_id.isDefined()) - { - LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; - item->rename(name.asString()); - item->setUUID(item_id.asUUID()); - item->setParent(parent_id.asUUID()); - LLAssetType::EType type = (LLAssetType::EType)asset_type.asInteger(); - item->setType(type); - - LLSD llsd_inv_type = (*it)["inv_type"]; - if(llsd_inv_type.isDefined()) - { - LLInventoryType::EType inv_type = (LLInventoryType::EType)llsd_inv_type.asInteger(); - item->setInventoryType(inv_type); - } - - if(LLAssetType::AT_CALLINGCARD == type) - { - LLPermissions perm; - perm.init(data_id.asUUID(), owner_id, LLUUID::null, LLUUID::null); - item->setPermissions(perm); - } - else - { - LLPermissions default_perm; - default_perm.init(LLUUID::null, owner_id, LLUUID::null, LLUUID::null); - LLSD llsd_perm_mask = (*it)["perm_mask"]; - if(llsd_perm_mask.isDefined()) - { - PermissionMask perm_mask = llsd_perm_mask.asInteger(); - default_perm.initMasks( - perm_mask, perm_mask, perm_mask, perm_mask, perm_mask); - } - else - { - default_perm.initMasks( - PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE, PERM_NONE); - } - item->setPermissions(default_perm); - item->setAssetUUID(data_id.asUUID()); - } - - LLSD flags = (*it)["flags"]; - if(flags.isDefined()) - { - // Not sure how well LLSD.asInteger() maps to - // unsigned long - using strtoul() - item->setFlags(strtoul(flags.asString().c_str(), NULL, 0)); - } - - LLSD time = (*it)["time"]; - if(time.isDefined()) - { - item->setCreationDate(time.asInteger()); - } - addItem(item); - } - else - { - llwarns << "Unable to import near " << name.asString() << llendl; - rv = false; - } - } - return rv; -} - // This is a brute force method to rebuild the entire parent-child // relations. The overall operation has O(NlogN) performance, which // should be sufficient for our needs. @@ -2186,73 +1965,6 @@ bool LLUUIDAndName::operator>(const LLUUIDAndName& rhs) const return (mID > rhs.mID); } -// Given the current state of the inventory items, figure out the -// clone information. *FIX: This is sub-optimal, since we can insert -// this information snurgically, but this makes sure the implementation -// works before we worry about optimization. -//void LLInventoryModel::recalculateCloneInformation() -//{ -// //dumpInventory(); -// -// // This implements a 'multi-map' like structure to keep track of -// // how many clones we find. -// typedef LLDynamicArray<LLViewerInventoryItem*> viewer_item_array_t; -// typedef std::map<LLUUIDAndName, viewer_item_array_t*> clone_map_t; -// clone_map_t clone_map; -// LLUUIDAndName id_and_name; -// viewer_item_array_t* clones = NULL; -// LLViewerInventoryItem* item = NULL; -// for(item = (LLViewerInventoryItem*)mItemMap.getFirstData(); -// item != NULL; -// item = (LLViewerInventoryItem*)mItemMap.getNextData()) -// { -// if(item->getType() == LLAssetType::AT_CALLINGCARD) -// { -// // if it's a calling card, we key off of the creator id, not -// // the asset id. -// id_and_name.mID = item->getCreatorUUID(); -// } -// else -// { -// // if it's not a calling card, we key clones from the -// // asset id. -// id_and_name.mID = item->getAssetUUID(); -// } -// if(id_and_name.mID == LLUUID::null) -// { -// continue; -// } -// id_and_name.mName = item->getName(); -// if(clone_map.checkData(id_and_name)) -// { -// clones = clone_map.getData(id_and_name); -// } -// else -// { -// clones = new viewer_item_array_t; -// clone_map.addData(id_and_name, clones); -// } -// clones->put(item); -// } -// -// S32 count = 0; -// for(clones = clone_map.getFirstData(); -// clones != NULL; -// clones = clone_map.getNextData()) -// { -// count = clones->count(); -// for(S32 i = 0; i < count; i++) -// { -// item = clones->get(i); -// item->setCloneCount(count - 1); -// //clones[i] = NULL; -// } -// delete clones; -// } -// clone_map.removeAllData(); -// //dumpInventory(); -//} - // static bool LLInventoryModel::loadFromFile(const std::string& filename, LLInventoryModel::cat_array_t& categories, @@ -3098,6 +2810,10 @@ static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInvento } // static +// * @param[in, out] items - vector with items to be updated. It should be sorted in a right way +// * before calling this method. +// * @param src_item_id - LLUUID of inventory item to be moved in new position +// * @param dest_item_id - LLUUID of inventory item before which source item should be placed. void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id) { LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id); @@ -3113,6 +2829,7 @@ void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, c items.insert(it_dest, src_item); } +//* @param[in] items vector of items in order to be saved. void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& items) { int sortField = 0; @@ -3156,6 +2873,8 @@ static void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& i std::sort(items.begin(), items.end(), sort_functor); } +// * @param source_item_id - LLUUID of the source item to be moved into new position +// * @param target_item_id - LLUUID of the target item before which source item should be placed. void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id) { LLInventoryModel::cat_array_t cats; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index b7c1b57397..5f5d4d6118 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -58,17 +58,15 @@ class LLMessageSystem; class LLInventoryCollectFunctor; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryModel +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// LLInventoryModel // -// This class represents a collection of inventory, and provides -// efficient ways to access that information. This class could in -// theory be used for any place where you need inventory, though it -// optimizes for time efficiency - not space efficiency, probably -// making it inappropriate for use on tasks. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - +// Represents a collection of inventory, and provides efficient ways to access +// that information. +// NOTE: This class could in theory be used for any place where you need +// inventory, though it optimizes for time efficiency - not space efficiency, +// probably making it inappropriate for use on tasks. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryModel { public: @@ -84,79 +82,129 @@ public: typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t; typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t; typedef std::set<LLUUID> changed_items_t; - - // construction & destruction - LLInventoryModel(); - ~LLInventoryModel(); - - void cleanupInventory(); - + class fetchInventoryResponder : public LLHTTPClient::Responder { public: fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; void result(const LLSD& content); - void error(U32 status, const std::string& reason); - - public: - typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; protected: LLSD mRequestSD; }; - // - // Accessors - // +/******************************************************************************** + ** ** + ** INITIALIZATION/SETUP + **/ - // Check if one object has a parent chain up to the category specified by UUID. - BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + //-------------------------------------------------------------------- + // Constructors / Destructors + //-------------------------------------------------------------------- +public: + LLInventoryModel(); + ~LLInventoryModel(); + void cleanupInventory(); +protected: + void empty(); // empty the entire contents - // Get whatever special folder this object is a child of, if any. - const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; + //-------------------------------------------------------------------- + // Initialization + //-------------------------------------------------------------------- +public: + // The inventory model usage is sensitive to the initial construction of the model + bool isInventoryUsable() const; +private: + bool mIsAgentInvUsable; // used to handle an invalid inventory state - // Get the object by id. Returns NULL if not found. - // * WARNING: use the pointer returned for read operations - do - // not modify the object values in place or you will break stuff. - LLInventoryObject* getObject(const LLUUID& id) const; + //-------------------------------------------------------------------- + // Root Folders + //-------------------------------------------------------------------- +public: + // The following are set during login with data from the server + void setRootFolderID(const LLUUID& id); + void setLibraryOwnerID(const LLUUID& id); + void setLibraryRootFolderID(const LLUUID& id); - // Get the item by id. Returns NULL if not found. - // * WARNING: use the pointer for read operations - use the - // updateItem() method to actually modify values. - LLViewerInventoryItem* getItem(const LLUUID& id) const; + const LLUUID &getRootFolderID() const; + const LLUUID &getLibraryOwnerID() const; + const LLUUID &getLibraryRootFolderID() const; +private: + LLUUID mRootFolderID; + LLUUID mLibraryRootFolderID; + LLUUID mLibraryOwnerID; + + //-------------------------------------------------------------------- + // Structure + //-------------------------------------------------------------------- +public: + // Methods to load up inventory skeleton & meat. These are used + // during authentication. Returns true if everything parsed. + bool loadSkeleton(const LLSD& options, const LLUUID& owner_id); + void buildParentChildMap(); // brute force method to rebuild the entire parent-child relations + // Call on logout to save a terse representation. + void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id); +private: + // Information for tracking the actual inventory. We index this + // information in a lot of different ways so we can access + // the inventory using several different identifiers. + // mInventory member data is the 'master' list of inventory, and + // mCategoryMap and mItemMap store uuid->object mappings. + typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; + typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t; + cat_map_t mCategoryMap; + item_map_t mItemMap; + // This last set of indices is used to map parents to children. + typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; + typedef std::map<LLUUID, item_array_t*> parent_item_map_t; + parent_cat_map_t mParentChildCategoryTree; + parent_item_map_t mParentChildItemTree; - // Get the category by id. Returns NULL if not found. - // * WARNING: use the pointer for read operations - use the - // updateCategory() method to actually modify values. - LLViewerInventoryCategory* getCategory(const LLUUID& id) const; + //-------------------------------------------------------------------- + // Login + //-------------------------------------------------------------------- +public: + static BOOL getIsFirstTimeInViewer2(); +private: + static BOOL sFirstTimeInViewer2; + const static S32 sCurrentInvCacheVersion; // expected inventory cache version - // Return the number of items or categories - S32 getItemCount() const; - S32 getCategoryCount() const; +/** Initialization/Setup + ** ** + *******************************************************************************/ + +/******************************************************************************** + ** ** + ** ACCESSORS + **/ + + //-------------------------------------------------------------------- + // Descendents + //-------------------------------------------------------------------- +public: + // Make sure we have the descendents in the structure. Returns true + // if a fetch was performed. + bool fetchDescendentsOf(const LLUUID& folder_id) const; // Return the direct descendents of the id provided.Set passed // in values to NULL if the call fails. - // *WARNING: The array provided points straight into the guts of - // this object, and should only be used for read operations, since - // modifications may invalidate the internal state of the - // inventory. + // NOTE: The array provided points straight into the guts of + // this object, and should only be used for read operations, since + // modifications may invalidate the internal state of the inventory. void getDirectDescendentsOf(const LLUUID& cat_id, cat_array_t*& categories, item_array_t*& items) const; - // SJB: Added version to lock the arrays to catch potential logic bugs - void lockDirectDescendentArrays(const LLUUID& cat_id, - cat_array_t*& categories, - item_array_t*& items); - void unlockDirectDescendentArrays(const LLUUID& cat_id); - // Starting with the object specified, add its descendents to the // array provided, but do not add the inventory object specified - // by id. There is no guaranteed order. Neither array will be - // erased before adding objects to it. Do not store a copy of the - // pointers collected - use them, and collect them again later if - // you need to reference the same objects. - enum { EXCLUDE_TRASH = FALSE, INCLUDE_TRASH = TRUE }; + // by id. There is no guaranteed order. + // NOTE: Neither array will be erased before adding objects to it. + // Do not store a copy of the pointers collected - use them, and + // collect them again later if you need to reference the same objects. + enum { + EXCLUDE_TRASH = FALSE, + INCLUDE_TRASH = TRUE + }; void collectDescendents(const LLUUID& id, cat_array_t& categories, item_array_t& items, @@ -172,156 +220,162 @@ public: // Assumes item_id is itself not a linked item. item_array_t collectLinkedItems(const LLUUID& item_id, const LLUUID& start_folder_id = LLUUID::null); + - // Get the inventoryID that this item points to, else just return item_id + // Check if one object has a parent chain up to the category specified by UUID. + BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + + //-------------------------------------------------------------------- + // Find + //-------------------------------------------------------------------- +public: + // Returns the uuid of the category that specifies 'type' as what it + // defaults to containing. The category is not necessarily only for that type. + // NOTE: If create_folder is true, this will create a new inventory category + // on the fly if one does not exist. *NOTE: if find_in_library is true it + // will search in the user's library folder instead of "My Inventory" + const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, + bool create_folder = true, + bool find_in_library = false); + + // Get whatever special folder this object is a child of, if any. + const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; + + // Get the object by id. Returns NULL if not found. + // NOTE: Use the pointer returned for read operations - do + // not modify the object values in place or you will break stuff. + LLInventoryObject* getObject(const LLUUID& id) const; + + // Get the item by id. Returns NULL if not found. + // NOTE: Use the pointer for read operations - use the + // updateItem() method to actually modify values. + LLViewerInventoryItem* getItem(const LLUUID& id) const; + + // Get the category by id. Returns NULL if not found. + // NOTE: Use the pointer for read operations - use the + // updateCategory() method to actually modify values. + LLViewerInventoryCategory* getCategory(const LLUUID& id) const; + + // Get the inventoryID that this item points to, else just return item_id. const LLUUID& getLinkedItemID(const LLUUID& object_id) const; +private: + mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups - // The inventory model usage is sensitive to the initial construction of the - // model. - bool isInventoryUsable() const; + //-------------------------------------------------------------------- + // Count + //-------------------------------------------------------------------- +public: + // Return the number of items or categories + S32 getItemCount() const; + S32 getCategoryCount() const; + +/** Accessors + ** ** + *******************************************************************************/ - // - // Mutators - // +/******************************************************************************** + ** ** + ** MUTATORS + **/ - // Calling this method with an inventory item will either change - // an existing item with a matching item_id, or will add the item +public: + // Change an existing item with a matching item_id or add the item // to the current inventory. Returns the change mask generated by // the update. No notification will be sent to observers. This // method will only generate network traffic if the item had to be // reparented. - // *NOTE: In usage, you will want to perform cache accounting - // operations in LLInventoryModel::accountForUpdate() or - // LLViewerInventoryItem::updateServer() before calling this - // method. + // NOTE: In usage, you will want to perform cache accounting + // operations in LLInventoryModel::accountForUpdate() or + // LLViewerInventoryItem::updateServer() before calling this method. U32 updateItem(const LLViewerInventoryItem* item); - // Calling this method with an inventory category will either - // change an existing item with the matching id, or it will add + // Change an existing item with the matching id or add // the category. No notifcation will be sent to observers. This // method will only generate network traffic if the item had to be // reparented. - // *NOTE: In usage, you will want to perform cache accounting - // operations in LLInventoryModel::accountForUpdate() or - // LLViewerInventoryCategory::updateServer() before calling this - // method. + // NOTE: In usage, you will want to perform cache accounting + // operations in accountForUpdate() or LLViewerInventoryCategory:: + // updateServer() before calling this method. void updateCategory(const LLViewerInventoryCategory* cat); - // This method will move the specified object id to the specified - // category, update the internal structures. No cache accounting, + // Move the specified object id to the specified category and + // update the internal structures. No cache accounting, // observer notification, or server update is performed. void moveObject(const LLUUID& object_id, const LLUUID& cat_id); - // delete a particular inventory object by ID. This will purge one - // object from the internal data structures maintaining a + //-------------------------------------------------------------------- + // Delete + //-------------------------------------------------------------------- +public: + // Delete a particular inventory object by ID. Will purge one + // object from the internal data structures, maintaining a // consistent internal state. No cache accounting, observer - // notification, or server update is performed. Purges linked items. + // notification, or server update is performed. void deleteObject(const LLUUID& id); + void removeItem(const LLUUID& item_id); - // delete a particular inventory object by ID, and delete it from - // the server. Also updates linked items. + // Delete a particular inventory object by ID, and delete it from + // the server. Also updates linked items. void purgeObject(const LLUUID& id); - void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); - // This is a method which collects the descendants of the id + // Collects and purges the descendants of the id // provided. If the category is not found, no action is // taken. This method goes through the long winded process of // removing server representation of folders and items while doing // cache accounting in a fairly efficient manner. This method does // not notify observers (though maybe it should...) void purgeDescendentsOf(const LLUUID& id); +protected: + void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); + + //-------------------------------------------------------------------- + // Reorder + //-------------------------------------------------------------------- +public: + // Changes items order by insertion of the item identified by src_item_id + // before the item identified by dest_item_id. Both items must exist in items array. + // Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id. + static void updateItemsOrder(LLInventoryModel::item_array_t& items, + const LLUUID& src_item_id, + const LLUUID& dest_item_id); + + // Saves current order of the passed items using inventory item sort field. + // Resets 'items' sort fields and saves them on server. + // Is used to save order for Favorites folder. + void saveItemsOrder(const LLInventoryModel::item_array_t& items); - // This method optimally removes the referenced categories and - // items from the current agent's inventory in the database. It - // performs all of the during deletion. The local representation - // is not removed. - void deleteFromServer(LLDynamicArray<LLUUID>& category_ids, - LLDynamicArray<LLUUID>& item_ids); - - // Add/remove an observer. If the observer is destroyed, be sure - // to remove it. - void addObserver(LLInventoryObserver* observer); - void removeObserver(LLInventoryObserver* observer); - BOOL containsObserver(LLInventoryObserver* observer) const; - - // - // Misc Methods - // - - // findCategoryUUIDForType() returns the uuid of the category that - // specifies 'type' as what it defaults to containing. The - // category is not necessarily only for that type. *NOTE: If create_folder is true, this - // will create a new inventory category on the fly if one does not exist. *NOTE: if find_in_library is - // true it will search in the user's library folder instead of "My Inventory" - // SDK: Added flag to specify whether the folder should be created if not found. This fixes the horrible - // multiple trash can bug. - const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true, bool find_in_library = false); - - // This gets called by the idle loop. It only updates if new - // state is detected. Call notifyObservers() manually to update - // regardless of whether state change has been indicated. - void idleNotifyObservers(); - - // Call this method to explicitly update everyone on a new state. - // The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328] - void notifyObservers(const std::string service_name=""); - - // This allows outsiders to tell the inventory if something has - // been changed 'under the hood', but outside the control of the - // inventory. For example, if we grant someone modify permissions, - // then that changes the data structures for LLAvatarTracker, but - // potentially affects inventory observers. This API makes sure - // that the next notify will include that notification. - void addChangedMask(U32 mask, const LLUUID& referent); - - const changed_items_t& getChangedIDs() const { return mChangedItemIDs; } - - // This method to prepares a set of mock inventory which provides - // minimal functionality before the actual arrival of inventory. - //void mock(const LLUUID& root_id); - - // Make sure we have the descendents in the structure. Returns true - // if a fetch was performed. - bool fetchDescendentsOf(const LLUUID& folder_id); - - // call this method to request the inventory. - //void requestFromServer(const LLUUID& agent_id); - - // call this method on logout to save a terse representation - void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id); - - // Generates a string containing the path to the item specified by - // item_id. - void appendPath(const LLUUID& id, std::string& path) const; - - // message handling functionality - static void registerCallbacks(LLMessageSystem* msg); + // Rearranges Landmarks inside Favorites folder. + // Moves source landmark before target one. + void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); - // Convenience function to create a new category. You could call - // updateCatgory() with a newly generated UUID category, but this - // version will take care of details like what the name should be - // based on preferred type. Returns the UUID of the new - // category. If you want to use the default name based on type, - // pass in a NULL to the 'name parameter. + //-------------------------------------------------------------------- + // Creation + //-------------------------------------------------------------------- +public: + // Returns the UUID of the new category. If you want to use the default + // name based on type, pass in a NULL to the 'name' parameter. LLUUID createNewCategory(const LLUUID& parent_id, LLFolderType::EType preferred_type, const std::string& name); +protected: + // Internal methods that add inventory and make sure that all of + // the internal data structures are consistent. These methods + // should be passed pointers of newly created objects, and the + // instance will take over the memory management from there. + void addCategory(LLViewerInventoryCategory* category); + void addItem(LLViewerInventoryItem* item); + +/** Mutators + ** ** + *******************************************************************************/ - // methods to load up inventory skeleton & meat. These are used - // during authentication. return true if everything parsed. - bool loadSkeleton(const LLSD& options, const LLUUID& owner_id); - bool loadMeat(const LLSD& options, const LLUUID& owner_id); - - // This is a brute force method to rebuild the entire parent-child - // relations. - void buildParentChildMap(); - - // - // Category accounting. - // +/******************************************************************************** + ** ** + ** CATEGORY ACCOUNTING + **/ - // This structure represents the number of items added or removed - // from a category. +public: + // Represents the number of items added or removed from a category. struct LLCategoryUpdate { LLCategoryUpdate() : mDescendentDelta(0) {} @@ -333,8 +387,7 @@ public: }; typedef std::vector<LLCategoryUpdate> update_list_t; - // This structure eixts to make it easier to account for deltas in - // a map. + // This exists to make it easier to account for deltas in a map. struct LLInitializedS32 { LLInitializedS32() : mValue(0) {} @@ -345,102 +398,89 @@ public: }; typedef std::map<LLUUID, LLInitializedS32> update_map_t; - // Call these methods when there are category updates, but call - // them *before* the actual update so the method can do descendent - // accounting correctly. + // Call when there are category updates. Call them *before* the + // actual update so the method can do descendent accounting correctly. void accountForUpdate(const LLCategoryUpdate& update) const; void accountForUpdate(const update_list_t& updates); void accountForUpdate(const update_map_t& updates); - // Return child status of category children. yes/no/maybe + // Return (yes/no/maybe) child status of category children. EHasChildren categoryHasChildren(const LLUUID& cat_id) const; - // returns true iff category version is known and theoretical + // Returns true iff category version is known and theoretical // descendents == actual descendents. bool isCategoryComplete(const LLUUID& cat_id) const; - // callbacks - // Trigger a notification and empty the folder type (FT_TRASH or FT_LOST_AND_FOUND) if confirmed - void emptyFolderType(const std::string notification, LLFolderType::EType folder_type); - bool callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type); - - // Utility Functions - void removeItem(const LLUUID& item_id); - - // Data about the agent's root folder and root library folder - // are stored here, rather than in LLAgent where it used to be, because - // gInventory is a singleton and represents the agent's inventory. - // The "library" is actually the inventory of a special agent, - // usually Alexandria Linden. - const LLUUID &getRootFolderID() const; - const LLUUID &getLibraryOwnerID() const; - const LLUUID &getLibraryRootFolderID() const; - - // These are set during login with data from the server - void setRootFolderID(const LLUUID& id); - void setLibraryOwnerID(const LLUUID& id); - void setLibraryRootFolderID(const LLUUID& id); +/** Category Accounting + ** ** + *******************************************************************************/ +/******************************************************************************** + ** ** + ** NOTIFICATIONS + **/ - /** - * Changes items order by insertion of the item identified by src_item_id - * BEFORE the item identified by dest_item_id. Both items must exist in items array. - * - * Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id. - * - * @param[in, out] items - vector with items to be updated. It should be sorted in a right way - * before calling this method. - * @param src_item_id - LLUUID of inventory item to be moved in new position - * @param dest_item_id - LLUUID of inventory item before which source item should be placed. - */ - static void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id); - - /** - * Saves current order of the passed items using inventory item sort field. - * - * It reset items' sort fields and saves them on server. - * Is used to save order for Favorites folder. - * - * @param[in] items vector of items in order to be saved. - */ - void saveItemsOrder(const LLInventoryModel::item_array_t& items); +public: + // Called by the idle loop. Only updates if new state is detected. Call + // notifyObservers() manually to update regardless of whether state change + // has been indicated. + void idleNotifyObservers(); - /** - * Rearranges Landmarks inside Favorites folder. - * Moves source landmark before target one. - * - * @param source_item_id - LLUUID of the source item to be moved into new position - * @param target_item_id - LLUUID of the target item before which source item should be placed. - */ - void rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id); + // Call to explicitly update everyone on a new state. The optional argument + // 'service_name' is used by Agent Inventory Service [DEV-20328] + void notifyObservers(const std::string service_name=""); + // Allows outsiders to tell the inventory if something has + // been changed 'under the hood', but outside the control of the + // inventory. The next notify will include that notification. + void addChangedMask(U32 mask, const LLUUID& referent); + const changed_items_t& getChangedIDs() const { return mChangedItemIDs; } protected: + // Updates all linked items pointing to this id. + void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); +private: + // Flag set when notifyObservers is being called, to look for bugs + // where it's called recursively. + BOOL mIsNotifyObservers; + // Variables used to track what has changed since the last notify. + U32 mModifyMask; + changed_items_t mChangedItemIDs; + + //-------------------------------------------------------------------- + // Observers + //-------------------------------------------------------------------- +public: + // If the observer is destroyed, be sure to remove it. + void addObserver(LLInventoryObserver* observer); + void removeObserver(LLInventoryObserver* observer); + BOOL containsObserver(LLInventoryObserver* observer) const; +private: + typedef std::set<LLInventoryObserver*> observer_list_t; + observer_list_t mObservers; + +/** Notifications + ** ** + *******************************************************************************/ - // Internal methods which add inventory and make sure that all of - // the internal data structures are consistent. These methods - // should be passed pointers of newly created objects, and the - // instance will take over the memory management from there. - void addCategory(LLViewerInventoryCategory* category); - void addItem(LLViewerInventoryItem* item); - - // ! DEPRECRATE ! Remove this and add it into findCategoryUUIDForType, - // since that's the only function that uses this. It's too confusing - // having both methods. - // - // Internal method which looks for a category with the specified - // preferred type. Returns LLUUID::null if not found - const LLUUID &findCatUUID(LLFolderType::EType preferred_type, bool find_in_library = false) const; - // Empty the entire contents - void empty(); +/******************************************************************************** + ** ** + ** MISCELLANEOUS + **/ - // Given the current state of the inventory items, figure out the - // clone information. *FIX: This is sub-optimal, since we can - // insert this information snurgically, but this makes sure the - // implementation works before we worry about optimization. - //void recalculateCloneInformation(); + //-------------------------------------------------------------------- + // Callbacks + //-------------------------------------------------------------------- +public: + // Trigger a notification and empty the folder type (FT_TRASH or FT_LOST_AND_FOUND) if confirmed + void emptyFolderType(const std::string notification, LLFolderType::EType folder_type); + bool callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type); + static void registerCallbacks(LLMessageSystem* msg); - // file import/export. + //-------------------------------------------------------------------- + // File I/O + //-------------------------------------------------------------------- +protected: static bool loadFromFile(const std::string& filename, cat_array_t& categories, item_array_t& items, @@ -449,86 +489,46 @@ protected: const cat_array_t& categories, const item_array_t& items); - // message handling functionality - //static void processUseCachedInventory(LLMessageSystem* msg, void**); + //-------------------------------------------------------------------- + // Message handling functionality + //-------------------------------------------------------------------- +public: static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**); static void processRemoveInventoryItem(LLMessageSystem* msg, void**); static void processUpdateInventoryFolder(LLMessageSystem* msg, void**); static void processRemoveInventoryFolder(LLMessageSystem* msg, void**); - //static void processExchangeCallingcard(LLMessageSystem* msg, void**); - //static void processAddCallingcard(LLMessageSystem* msg, void**); - //static void processDeclineCallingcard(LLMessageSystem* msg, void**); static void processSaveAssetIntoInventory(LLMessageSystem* msg, void**); static void processBulkUpdateInventory(LLMessageSystem* msg, void**); static void processInventoryDescendents(LLMessageSystem* msg, void**); static void processMoveInventoryItem(LLMessageSystem* msg, void**); static void processFetchInventoryReply(LLMessageSystem* msg, void**); - +protected: bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); - // Updates all linked items pointing to this id. - void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); - + //-------------------------------------------------------------------- + // Locks + //-------------------------------------------------------------------- +public: + void lockDirectDescendentArrays(const LLUUID& cat_id, + cat_array_t*& categories, + item_array_t*& items); + void unlockDirectDescendentArrays(const LLUUID& cat_id); protected: cat_array_t* getUnlockedCatArray(const LLUUID& id); item_array_t* getUnlockedItemArray(const LLUUID& id); - private: - // Variables used to track what has changed since the last notify. - U32 mModifyMask; - changed_items_t mChangedItemIDs; - std::map<LLUUID, bool> mCategoryLock; std::map<LLUUID, bool> mItemLock; - // cache recent lookups - mutable LLPointer<LLViewerInventoryItem> mLastItem; - - // This last set of indices is used to map parents to children. - typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; - typedef std::map<LLUUID, item_array_t*> parent_item_map_t; - parent_cat_map_t mParentChildCategoryTree; - parent_item_map_t mParentChildItemTree; - - typedef std::set<LLInventoryObserver*> observer_list_t; - observer_list_t mObservers; - - // Agent inventory folder information. - LLUUID mRootFolderID; - LLUUID mLibraryRootFolderID; - LLUUID mLibraryOwnerID; - - // Expected inventory cache version - const static S32 sCurrentInvCacheVersion; - - // This flag is used to handle an invalid inventory state. - bool mIsAgentInvUsable; - -private: - // Information for tracking the actual inventory. We index this - // information in a lot of different ways so we can access - // the inventory using several different identifiers. - // mInventory member data is the 'master' list of inventory, and - // mCategoryMap and mItemMap store uuid->object mappings. - typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; - typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t; - //inv_map_t mInventory; - cat_map_t mCategoryMap; - item_map_t mItemMap; - - // Flag set when notifyObservers is being called, to look for bugs - // where it's called recursively. - BOOL mIsNotifyObservers; + //-------------------------------------------------------------------- + // Debugging + //-------------------------------------------------------------------- public: - // *NOTE: DEBUG functionality void dumpInventory() const; - //////////////////////////////////////////////////////////////////////////////// - // Login status -public: - static BOOL getIsFirstTimeInViewer2(); -private: - static BOOL sFirstTimeInViewer2; +/** Miscellaneous + ** ** + *******************************************************************************/ }; // a special inventory model for the agent diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index cfbc2c3e05..0ff6ab2644 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -46,26 +46,11 @@ const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; const S32 MAX_FETCH_RETRIES = 10; -// RN: for some reason, using std::queue in the header file confuses the compiler which thinks it's an xmlrpc_queue -static std::deque<LLUUID> sFetchQueue; -bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) -{ - for (std::deque<LLUUID>::iterator it = sFetchQueue.begin(); - it != sFetchQueue.end(); ++it) - { - const LLUUID& fetch_id = *it; - if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) - return false; - } - return true; -} - - LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mBackgroundFetchActive(FALSE), mAllFoldersFetched(FALSE), - mInventoryFetchStarted(FALSE), - mLibraryFetchStarted(FALSE), + mRecursiveInventoryFetchStarted(FALSE), + mRecursiveLibraryFetchStarted(FALSE), mNumFetchRetries(0), mMinTimeBetweenFetches(0.3f), mMaxTimeBetweenFetches(10.f), @@ -80,12 +65,12 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() { - return sFetchQueue.empty() && mBulkFetchCount<=0; + return mFetchQueue.empty() && mBulkFetchCount<=0; } bool LLInventoryModelBackgroundFetch::libraryFetchStarted() { - return mLibraryFetchStarted; + return mRecursiveLibraryFetchStarted; } bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() @@ -100,7 +85,7 @@ bool LLInventoryModelBackgroundFetch::libraryFetchInProgress() bool LLInventoryModelBackgroundFetch::inventoryFetchStarted() { - return mInventoryFetchStarted; + return mRecursiveInventoryFetchStarted; } bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() @@ -123,41 +108,41 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() return mBackgroundFetchActive; } -void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) +void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive) { if (!mAllFoldersFetched) { mBackgroundFetchActive = TRUE; if (cat_id.isNull()) { - if (!mInventoryFetchStarted) + if (!mRecursiveInventoryFetchStarted) { - mInventoryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getRootFolderID()); + mRecursiveInventoryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } - if (!mLibraryFetchStarted) + if (!mRecursiveLibraryFetchStarted) { - mLibraryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); + mRecursiveLibraryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } } else { // specific folder requests go to front of queue - if (sFetchQueue.empty() || sFetchQueue.front() != cat_id) + if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) { - sFetchQueue.push_front(cat_id); + mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } if (cat_id == gInventory.getLibraryRootFolderID()) { - mLibraryFetchStarted = TRUE; + mRecursiveLibraryFetchStarted |= recursive; } if (cat_id == gInventory.getRootFolderID()) { - mInventoryFetchStarted = TRUE; + mRecursiveInventoryFetchStarted |= recursive; } } } @@ -166,7 +151,7 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) void LLInventoryModelBackgroundFetch::findLostItems() { mBackgroundFetchActive = TRUE; - sFetchQueue.push_back(LLUUID::null); + mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } @@ -183,8 +168,8 @@ void LLInventoryModelBackgroundFetch::stopBackgroundFetch() void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { - if (mInventoryFetchStarted && - mLibraryFetchStarted) + if (mRecursiveInventoryFetchStarted && + mRecursiveLibraryFetchStarted) { mAllFoldersFetched = TRUE; } @@ -210,7 +195,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() //DEPRECATED OLD CODE FOLLOWS. // no more categories to fetch, stop fetch process - if (sFetchQueue.empty()) + if (mFetchQueue.empty()) { llinfos << "Inventory fetch completed" << llendl; @@ -232,7 +217,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() while(1) { - if (sFetchQueue.empty()) + if (mFetchQueue.empty()) { break; } @@ -243,12 +228,13 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() break; } - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + const FetchQueueInfo info = mFetchQueue.front(); + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); // category has been deleted, remove from queue. if (!cat) { - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); continue; } @@ -271,10 +257,10 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } // do I have all my children? - else if (gInventory.isCategoryComplete(sFetchQueue.front())) + else if (gInventory.isCategoryComplete(info.mCatUUID)) { // finished with this category, remove from queue - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); // add all children to queue LLInventoryModel::cat_array_t* categories; @@ -284,7 +270,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() it != categories->end(); ++it) { - sFetchQueue.push_back((*it)->getUUID()); + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); } // we received a response in less than the fast time @@ -303,13 +289,12 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { // received first packet, but our num descendants does not match db's num descendants // so try again later - LLUUID fetch_id = sFetchQueue.front(); - sFetchQueue.pop_front(); + mFetchQueue.pop_front(); if (mNumFetchRetries++ < MAX_FETCH_RETRIES) { // push on back of queue - sFetchQueue.push_back(fetch_id); + mFetchQueue.push_back(info); } mTimelyFetchPending = FALSE; mFetchTimer.reset(); @@ -334,20 +319,25 @@ void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { - public: - LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; - //LLInventoryModelFetchDescendentsResponder() {}; - void result(const LLSD& content); - void error(U32 status, const std::string& reason); - public: - typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; - protected: - LLSD mRequestSD; +public: + LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd, uuid_vec_t recursive_cats) : + mRequestSD(request_sd), + mRecursiveCatUUIDs(recursive_cats) + {}; + //LLInventoryModelFetchDescendentsResponder() {}; + void result(const LLSD& content); + void error(U32 status, const std::string& reason); +protected: + BOOL getIsRecursive(const LLUUID& cat_id) const; +private: + LLSD mRequestSD; + uuid_vec_t mRecursiveCatUUIDs; // Hack for storing away which cat fetches are recursive. }; //If we get back a normal response, handle it here -void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) +void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { + LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); if (content.has("folders")) { @@ -412,11 +402,12 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) { LLSD category = *category_it; tcategory->fromLLSD(category); - - if (LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted() || - LLInventoryModelBackgroundFetch::instance().libraryFetchStarted()) + + const BOOL recursive = getIsRecursive(tcategory->getUUID()); + + if (recursive) { - sFetchQueue.push_back(tcategory->getUUID()); + fetcher->mFetchQueue.push_back(LLInventoryModelBackgroundFetch::FetchQueueInfo(tcategory->getUUID(), recursive)); } else if ( !gInventory.isCategoryComplete(tcategory->getUUID()) ) { @@ -461,12 +452,12 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) } } - LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + fetcher->incrBulkFetch(-1); - if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + if (fetcher->isBulkFetchProcessingComplete()) { llinfos << "Inventory fetch completed" << llendl; - LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + fetcher->setAllFoldersFetched(); } gInventory.notifyObservers("fetchDescendents"); @@ -475,12 +466,14 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) //If we get back an error (not found, etc...), handle it here void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) { + LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); + llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; - LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + fetcher->incrBulkFetch(-1); - if (status==499) //timed out. Let's be awesome! + if (status==499) // Timed out. { for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); folder_it != mRequestSD["folders"].endArray(); @@ -488,24 +481,30 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str { LLSD folder_sd = *folder_it; LLUUID folder_id = folder_sd["folder_id"]; - sFetchQueue.push_front(folder_id); + const BOOL recursive = getIsRecursive(folder_id); + fetcher->mFetchQueue.push_front(LLInventoryModelBackgroundFetch::FetchQueueInfo(folder_id, recursive)); } } else { - if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + if (fetcher->isBulkFetchProcessingComplete()) { - LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + fetcher->setAllFoldersFetched(); } } gInventory.notifyObservers("fetchDescendents"); } +BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat_id) const +{ + return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end()); +} + //static Bundle up a bunch of requests to send all at once. void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. - //If there are items in sFetchQueue, we want to check the time since the last bulkFetch was + //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. //Stopbackgroundfetch will be run from the Responder instead of here. @@ -528,11 +527,16 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1; + uuid_vec_t recursive_cats; + LLSD body; LLSD body_lib; - while (!(sFetchQueue.empty()) && (folder_count < max_batch_size)) + + while (!(mFetchQueue.empty()) && (folder_count < max_batch_size)) { - if (sFetchQueue.front().isNull()) //DEV-17797 + const FetchQueueInfo& fetch_info = mFetchQueue.front(); + const LLUUID &cat_id = fetch_info.mCatUUID; + if (cat_id.isNull()) //DEV-17797 { LLSD folder_sd; folder_sd["folder_id"] = LLUUID::null.asString(); @@ -545,7 +549,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) } else { - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); if (cat) { @@ -564,9 +568,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) body["folders"].append(folder_sd); folder_count++; } - if (mInventoryFetchStarted || mLibraryFetchStarted) - { //Already have this folder but append child folders to list. - // add all children to queue + // May already have this folder, but append child folders to list. + if (fetch_info.mRecursive) + { LLInventoryModel::cat_array_t* categories; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); @@ -574,12 +578,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) it != categories->end(); ++it) { - sFetchQueue.push_back((*it)->getUUID()); + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); } } } } - sFetchQueue.pop_front(); + if (fetch_info.mRecursive) + recursive_cats.push_back(cat_id); + + mFetchQueue.pop_front(); } if (folder_count > 0) @@ -587,12 +594,15 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) mBulkFetchCount++; if (body["folders"].size()) { - LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); + LLHTTPClient::post(url, body, fetcher, 300.0); } if (body_lib["folders"].size()) { std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); - LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); + + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); + LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); } mFetchTimer.reset(); } @@ -601,3 +611,17 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) setAllFoldersFetched(); } } + +bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const +{ + for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); + it != mFetchQueue.end(); ++it) + { + const LLUUID& fetch_id = (*it).mCatUUID; + if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) + return false; + } + return true; +} + + diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 94606fae23..c1e37eda8f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -68,13 +68,15 @@ class LLInventoryCollectFunctor; class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch> { + friend class LLInventoryModelFetchDescendentsResponder; + public: LLInventoryModelBackgroundFetch(); ~LLInventoryModelBackgroundFetch(); // Start and stop background breadth-first fetching of inventory contents. // This gets triggered when performing a filter-search - void start(const LLUUID& cat_id = LLUUID::null); + void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); BOOL backgroundFetchActive(); bool isEverythingFetched(); void incrBulkFetch(S16 fetching); @@ -98,9 +100,20 @@ public: static void backgroundFetchCB(void*); // background fetch idle function void backgroundFetch(); + struct FetchQueueInfo + { + FetchQueueInfo(const LLUUID& id, BOOL recursive) : + mCatUUID(id), mRecursive(recursive) + { + } + LLUUID mCatUUID; + BOOL mRecursive; + }; +protected: + bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; private: - BOOL mInventoryFetchStarted; - BOOL mLibraryFetchStarted; + BOOL mRecursiveInventoryFetchStarted; + BOOL mRecursiveLibraryFetchStarted; BOOL mAllFoldersFetched; // completing the fetch once per session should be sufficient @@ -113,6 +126,8 @@ private: F32 mMinTimeBetweenFetches; F32 mMaxTimeBetweenFetches; + typedef std::deque<FetchQueueInfo> fetch_queue_t; + fetch_queue_t mFetchQueue; }; #endif // LL_LLINVENTORYMODELBACKGROUNDFETCH_H diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 544a815896..c24d2ee0ea 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -148,6 +148,7 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id) LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) : LLInventoryFetchObserver(item_id), + mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) { mIDs.clear(); @@ -155,7 +156,9 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_ } LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) : - LLInventoryFetchObserver(item_ids) + LLInventoryFetchObserver(item_ids), + + mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) { } @@ -212,7 +215,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) void fetch_items_from_llsd(const LLSD& items_llsd) { - if (!items_llsd.size()) return; + if (!items_llsd.size() || gDisconnected) return; LLSD body; body[0]["cap_name"] = "FetchInventory"; body[1]["cap_name"] = "FetchLib"; @@ -232,6 +235,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd) for (S32 i=0; i<body.size(); i++) { + if(!gAgent.getRegion()) + { + llwarns<<"Agent's region is null"<<llendl; + break; + } if (0 >= body[i].size()) continue; std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString()); @@ -647,3 +655,105 @@ void LLInventoryTransactionObserver::changed(U32 mask) } } } + +void LLInventoryCategoriesObserver::changed(U32 mask) +{ + if (!mCategoryMap.size()) + return; + + for (category_map_t::iterator iter = mCategoryMap.begin(); + iter != mCategoryMap.end(); + ++iter) + { + LLViewerInventoryCategory* category = gInventory.getCategory((*iter).first); + if (!category) + continue; + + const S32 version = category->getVersion(); + const S32 expected_num_descendents = category->getDescendentCount(); + if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) || + (expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)) + { + continue; + } + + // Check number of known descendents to find out whether it has changed. + LLInventoryModel::cat_array_t* cats; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf((*iter).first, cats, items); + if (!cats || !items) + { + llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl; + // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean + // that the cat just doesn't have any items or subfolders). + // Unrecoverable, so just skip this category. + + llassert(cats != NULL && items != NULL); + + continue; + } + + const S32 current_num_known_descendents = cats->count() + items->count(); + + LLCategoryData cat_data = (*iter).second; + + // If category version or descendents count has changed + // update category data in mCategoryMap and fire a callback. + if (version != cat_data.mVersion || current_num_known_descendents != cat_data.mDescendentsCount) + { + cat_data.mVersion = version; + cat_data.mDescendentsCount = current_num_known_descendents; + + cat_data.mCallback(); + } + } +} + +bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb) +{ + S32 version = LLViewerInventoryCategory::VERSION_UNKNOWN; + S32 current_num_known_descendents = LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN; + bool can_be_added = true; + + LLViewerInventoryCategory* category = gInventory.getCategory(cat_id); + // If category could not be retrieved it might mean that + // inventory is unusable at the moment so the category is + // stored with VERSION_UNKNOWN and DESCENDENT_COUNT_UNKNOWN, + // it may be updated later. + if (category) + { + // Inventory category version is used to find out if some changes + // to a category have been made. + version = category->getVersion(); + + LLInventoryModel::cat_array_t* cats; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat_id, cats, items); + if (!cats || !items) + { + llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl; + // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean + // that the cat just doesn't have any items or subfolders). + // Unrecoverable, so just return "false" meaning that the category can't be observed. + can_be_added = false; + + llassert(cats != NULL && items != NULL); + } + else + { + current_num_known_descendents = cats->count() + items->count(); + } + } + + if (can_be_added) + { + mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version, current_num_known_descendents))); + } + + return can_be_added; +} + +void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id) +{ + mCategoryMap.erase(cat_id); +} diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index c48ffaa55d..036e6ca40d 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -148,7 +148,6 @@ public: virtual void done() = 0; protected: - BOOL mDone; LLInventoryFetchItemsObserver *mFetchItems; LLInventoryFetchDescendentsObserver *mFetchDescendents; }; @@ -262,5 +261,49 @@ protected: uuid_vec_t mIncomplete; }; -#endif // LL_LLINVENTORYOBSERVERS_H +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryCategoriesObserver +// +// This class is used for monitoring a list of inventory categories +// and firing a callback when there are changes in any of them. +// Categories are identified by their UUIDs. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryCategoriesObserver : public LLInventoryObserver +{ +public: + typedef boost::function<void()> callback_t; + + LLInventoryCategoriesObserver() {}; + virtual void changed(U32 mask); + + /** + * Add cat_id to the list of observed categories with a + * callback fired on category being changed. + * + * @return "true" if category was added, "false" if it could + * not be found. + */ + bool addCategory(const LLUUID& cat_id, callback_t cb); + void removeCategory(const LLUUID& cat_id); +protected: + struct LLCategoryData + { + LLCategoryData(callback_t cb, S32 version, S32 num_descendents) + : mCallback(cb) + , mVersion(version) + , mDescendentsCount(num_descendents) + {} + + callback_t mCallback; + S32 mVersion; + S32 mDescendentsCount; + }; + + typedef std::map<LLUUID, LLCategoryData> category_map_t; + typedef category_map_t::value_type category_map_value_t; + + category_map_t mCategoryMap; +}; + +#endif // LL_LLINVENTORYOBSERVERS_H diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 15c872a7c4..000bcdd265 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -775,8 +775,7 @@ void LLInventoryPanel::doCreate(const LLSD& userdata) bool LLInventoryPanel::beginIMSession() { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string name; static int session_num = 1; @@ -873,8 +872,7 @@ bool LLInventoryPanel::beginIMSession() bool LLInventoryPanel::attachObject(const LLSD& userdata) { - std::set<LLUUID> selected_items; - mFolderRoot->getSelectionList(selected_items); + std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string joint_name = userdata.asString(); LLViewerJointAttachment* attachmentp = NULL; @@ -1001,3 +999,30 @@ BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) co { return (std::find(mHiddenFolderTypes.begin(), mHiddenFolderTypes.end(), folder_type) != mHiddenFolderTypes.end()); } + + +/************************************************************************/ +/* Recent Inventory Panel related class */ +/************************************************************************/ +class LLInventoryRecentItemsPanel; +static LLDefaultChildRegistry::Register<LLInventoryRecentItemsPanel> t_recent_inventory_panel("recent_inventory_panel"); + +static const LLRecentInventoryBridgeBuilder RECENT_ITEMS_BUILDER; +class LLInventoryRecentItemsPanel : public LLInventoryPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params> + {}; + +protected: + LLInventoryRecentItemsPanel (const Params&); + friend class LLUICtrlFactory; +}; + +LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) +: LLInventoryPanel(params) +{ + // replace bridge builder to have necessary View bridges. + mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; +} + diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 7336efb62a..539ca97a93 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -299,7 +299,7 @@ void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slur bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal(global_pos, sim_name); if (gotSimName) { - std::string slurl = LLSLURL::buildSLURLfromPosGlobal(sim_name, global_pos, escaped); + std::string slurl = LLSLURL(sim_name, global_pos).getSLURLString(); cb(slurl); return; @@ -351,7 +351,7 @@ void LLLandmarkActions::onRegionResponseSLURL(slurl_callback_t cb, bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal(global_pos, sim_name); if (gotSimName) { - slurl = LLSLURL::buildSLURLfromPosGlobal(sim_name, global_pos, escaped); + slurl = LLSLURL(sim_name, global_pos).getSLURLString(); } else { diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4e0be81f62..53a11eff04 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -38,6 +38,7 @@ // common includes #include "llbutton.h" #include "llfocusmgr.h" +#include "llhelp.h" #include "llmenugl.h" #include "llparcel.h" #include "llstring.h" @@ -177,6 +178,7 @@ static LLDefaultChildRegistry::Register<LLLocationInputCtrl> r("location_input") LLLocationInputCtrl::Params::Params() : icon_maturity_general("icon_maturity_general"), icon_maturity_adult("icon_maturity_adult"), + icon_maturity_moderate("icon_maturity_moderate"), add_landmark_image_enabled("add_landmark_image_enabled"), add_landmark_image_disabled("add_landmark_image_disabled"), add_landmark_image_hover("add_landmark_image_hover"), @@ -186,14 +188,15 @@ LLLocationInputCtrl::Params::Params() add_landmark_button("add_landmark_button"), for_sale_button("for_sale_button"), info_button("info_button"), - maturity_icon("maturity_icon"), + maturity_button("maturity_button"), voice_icon("voice_icon"), fly_icon("fly_icon"), push_icon("push_icon"), build_icon("build_icon"), scripts_icon("scripts_icon"), damage_icon("damage_icon"), - damage_text("damage_text") + damage_text("damage_text"), + maturity_help_topic("maturity_help_topic") { } @@ -208,7 +211,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mLandmarkImageOn(NULL), mLandmarkImageOff(NULL), mIconMaturityGeneral(NULL), - mIconMaturityAdult(NULL) + mIconMaturityAdult(NULL), + mIconMaturityModerate(NULL), + mMaturityHelpTopic(p.maturity_help_topic) { // Lets replace default LLLineEditor with LLLocationLineEditor // to make needed escaping while copying and cutting url @@ -276,10 +281,15 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) { mIconMaturityAdult = p.icon_maturity_adult; } + if(p.icon_maturity_moderate()) + { + mIconMaturityModerate = p.icon_maturity_moderate; + } - LLIconCtrl::Params maturity_icon = p.maturity_icon; - mMaturityIcon = LLUICtrlFactory::create<LLIconCtrl>(maturity_icon); - addChild(mMaturityIcon); + LLButton::Params maturity_button = p.maturity_button; + mMaturityButton = LLUICtrlFactory::create<LLButton>(maturity_button); + addChild(mMaturityButton); + mMaturityButton->setClickedCallback(boost::bind(&LLLocationInputCtrl::onMaturityButtonClicked, this)); LLButton::Params for_sale_button = p.for_sale_button; for_sale_button.tool_tip = LLTrans::getString("LocationCtrlForSaleTooltip"); @@ -576,7 +586,7 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent if (isHumanReadableLocationVisible) { - refreshMaturityIcon(); + refreshMaturityButton(); } } @@ -613,6 +623,11 @@ void LLLocationInputCtrl::onAgentParcelChange() refresh(); } +void LLLocationInputCtrl::onMaturityButtonClicked() +{ + LLUI::sHelpImpl->showTopic(mMaturityHelpTopic); +} + void LLLocationInputCtrl::onLandmarkLoaded(LLLandmark* lm) { (void) lm; @@ -668,9 +683,8 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) value["item_type"] = TELEPORT_HISTORY; value["global_pos"] = result->mGlobalPos.getValue(); std::string region_name = result->mTitle.substr(0, result->mTitle.find(',')); - //TODO*: add slurl to teleportitem or parse region name from title - value["tooltip"] = LLSLURL::buildSLURLfromPosGlobal(region_name, - result->mGlobalPos, false); + //TODO*: add Surl to teleportitem or parse region name from title + value["tooltip"] = LLSLURL(region_name, result->mGlobalPos).getSLURLString(); add(result->getTitle(), value); } result = std::find_if(result + 1, th_items.end(), boost::bind( @@ -736,7 +750,7 @@ void LLLocationInputCtrl::refreshLocation() setText(location_name); isHumanReadableLocationVisible = true; - refreshMaturityIcon(); + refreshMaturityButton(); } // returns new right edge @@ -852,37 +866,54 @@ void LLLocationInputCtrl::refreshHealth() } } -void LLLocationInputCtrl::refreshMaturityIcon() +void LLLocationInputCtrl::refreshMaturityButton() { // Updating maturity rating icon. LLViewerRegion* region = gAgent.getRegion(); if (!region) return; + bool button_visible = true; + LLPointer<LLUIImage> rating_image = NULL; + std::string rating_tooltip; + U8 sim_access = region->getSimAccess(); switch(sim_access) { case SIM_ACCESS_PG: - mMaturityIcon->setValue(mIconMaturityGeneral->getName()); - mMaturityIcon->setVisible(TRUE); + rating_image = mIconMaturityGeneral; + rating_tooltip = LLTrans::getString("LocationCtrlGeneralIconTooltip"); break; case SIM_ACCESS_ADULT: - mMaturityIcon->setValue(mIconMaturityAdult->getName()); - mMaturityIcon->setVisible(TRUE); + rating_image = mIconMaturityAdult; + rating_tooltip = LLTrans::getString("LocationCtrlAdultIconTooltip"); + break; + + case SIM_ACCESS_MATURE: + rating_image = mIconMaturityModerate; + rating_tooltip = LLTrans::getString("LocationCtrlModerateIconTooltip"); break; default: - mMaturityIcon->setVisible(FALSE); + button_visible = false; + break; } - if (mMaturityIcon->getVisible()) + mMaturityButton->setVisible(button_visible); + mMaturityButton->setToolTip(rating_tooltip); + if(rating_image) + { + mMaturityButton->setImageUnselected(rating_image); + mMaturityButton->setImagePressed(rating_image); + } + if (mMaturityButton->getVisible()) { - positionMaturityIcon(); + positionMaturityButton(); } } -void LLLocationInputCtrl::positionMaturityIcon() +void LLLocationInputCtrl::positionMaturityButton() { const LLFontGL* font = mTextEntry->getFont(); if (!font) @@ -894,11 +925,11 @@ void LLLocationInputCtrl::positionMaturityIcon() // Calculate the right edge of rendered text + a whitespace. left_pad = left_pad + font->getWidth(mTextEntry->getText()) + font->getWidth(" "); - LLRect rect = mMaturityIcon->getRect(); - mMaturityIcon->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); + LLRect rect = mMaturityButton->getRect(); + mMaturityButton->setRect(rect.setOriginAndSize(left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); // Hide icon if it text area is not width enough to display it, show otherwise. - mMaturityIcon->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad); + mMaturityButton->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad); } void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter) @@ -1011,10 +1042,12 @@ void LLLocationInputCtrl::changeLocationPresentation() if(!mTextEntry->hasSelection() && text == mHumanReadableLocation) { //needs unescaped one - mTextEntry->setText(LLAgentUI::buildSLURL(false)); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl, false); + mTextEntry->setText(slurl.getSLURLString()); mTextEntry->selectAll(); - mMaturityIcon->setVisible(FALSE); + mMaturityButton->setVisible(FALSE); isHumanReadableLocationVisible = false; } diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index f790140f07..fc7adf60b0 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -66,17 +66,19 @@ public: { Optional<LLUIImage*> icon_maturity_general, icon_maturity_adult, + icon_maturity_moderate, add_landmark_image_enabled, add_landmark_image_disabled, add_landmark_image_hover, add_landmark_image_selected; + Optional<std::string> maturity_help_topic; Optional<S32> icon_hpad, add_landmark_hpad; - Optional<LLButton::Params> add_landmark_button, + Optional<LLButton::Params> maturity_button, + add_landmark_button, for_sale_button, info_button; - Optional<LLIconCtrl::Params> maturity_icon, - voice_icon, + Optional<LLIconCtrl::Params> voice_icon, fly_icon, push_icon, build_icon, @@ -136,8 +138,8 @@ private: void refreshParcelIcons(); // Refresh the value in the health percentage text field void refreshHealth(); - void refreshMaturityIcon(); - void positionMaturityIcon(); + void refreshMaturityButton(); + void positionMaturityButton(); void rebuildLocationHistory(const std::string& filter = LLStringUtil::null); bool findTeleportItemsByTitle(const LLTeleportHistoryItem& item, const std::string& filter); @@ -156,6 +158,7 @@ private: void onForSaleButtonClicked(); void onAddLandmarkButtonClicked(); void onAgentParcelChange(); + void onMaturityButtonClicked(); // callbacks bool onLocationContextMenuItemEnabled(const LLSD& userdata); void onLocationContextMenuItemClicked(const LLSD& userdata); @@ -168,7 +171,7 @@ private: S32 mIconHPad; // pad between all icons S32 mAddLandmarkHPad; // pad to left of landmark star - LLIconCtrl* mMaturityIcon; + LLButton* mMaturityButton; LLIconCtrl* mParcelIcon[ICON_COUNT]; LLTextBox* mDamageText; @@ -182,14 +185,16 @@ private: boost::signals2::connection mLocationHistoryConnection; LLUIImage* mLandmarkImageOn; LLUIImage* mLandmarkImageOff; - LLUIImage* mIconMaturityGeneral; - LLUIImage* mIconMaturityAdult; + LLPointer<LLUIImage> mIconMaturityGeneral; + LLPointer<LLUIImage> mIconMaturityAdult; + LLPointer<LLUIImage> mIconMaturityModerate; std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; // this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location std::string mHumanReadableLocation; bool isHumanReadableLocationVisible; + std::string mMaturityHelpTopic; }; #endif diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index e3817eecc4..4e0a7594ba 100644 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -35,13 +35,14 @@ #include "llloginhandler.h" // viewer includes +#include "llsecapi.h" #include "lllogininstance.h" // to check if logged in yet #include "llpanellogin.h" // save_password_to_disk() #include "llstartup.h" // getStartupState() -#include "llurlsimstring.h" +#include "llslurl.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewernetwork.h" // EGridInfo -#include "llviewerwindow.h" // getWindow() +#include "llviewerwindow.h" // getWindow() // library includes #include "llmd5.h" @@ -60,109 +61,33 @@ bool LLLoginHandler::parseDirectLogin(std::string url) LLURI uri(url); parse(uri.queryMap()); - if (/*mWebLoginKey.isNull() ||*/ - mFirstName.empty() || - mLastName.empty()) - { - return false; - } - else - { - return true; - } + // NOTE: Need to add direct login as per identity evolution + return true; } - void LLLoginHandler::parse(const LLSD& queryMap) { - //mWebLoginKey = queryMap["web_login_key"].asUUID(); - mFirstName = queryMap["first_name"].asString(); - mLastName = queryMap["last_name"].asString(); - EGridInfo grid_choice = GRID_INFO_NONE; - if (queryMap["grid"].asString() == "aditi") - { - grid_choice = GRID_INFO_ADITI; - } - else if (queryMap["grid"].asString() == "agni") - { - grid_choice = GRID_INFO_AGNI; - } - else if (queryMap["grid"].asString() == "siva") - { - grid_choice = GRID_INFO_SIVA; - } - else if (queryMap["grid"].asString() == "damballah") - { - grid_choice = GRID_INFO_DAMBALLAH; - } - else if (queryMap["grid"].asString() == "durga") - { - grid_choice = GRID_INFO_DURGA; - } - else if (queryMap["grid"].asString() == "shakti") - { - grid_choice = GRID_INFO_SHAKTI; - } - else if (queryMap["grid"].asString() == "soma") - { - grid_choice = GRID_INFO_SOMA; - } - else if (queryMap["grid"].asString() == "ganga") - { - grid_choice = GRID_INFO_GANGA; - } - else if (queryMap["grid"].asString() == "vaak") - { - grid_choice = GRID_INFO_VAAK; - } - else if (queryMap["grid"].asString() == "uma") - { - grid_choice = GRID_INFO_UMA; - } - else if (queryMap["grid"].asString() == "mohini") - { - grid_choice = GRID_INFO_MOHINI; - } - else if (queryMap["grid"].asString() == "yami") - { - grid_choice = GRID_INFO_YAMI; - } - else if (queryMap["grid"].asString() == "nandi") + if (queryMap.has("grid")) { - grid_choice = GRID_INFO_NANDI; + LLGridManager::getInstance()->setGridChoice(queryMap["grid"].asString()); } - else if (queryMap["grid"].asString() == "mitra") - { - grid_choice = GRID_INFO_MITRA; - } - else if (queryMap["grid"].asString() == "radha") - { - grid_choice = GRID_INFO_RADHA; - } - else if (queryMap["grid"].asString() == "ravi") - { - grid_choice = GRID_INFO_RAVI; - } - else if (queryMap["grid"].asString() == "aruna") - { - grid_choice = GRID_INFO_ARUNA; - } - - if(grid_choice != GRID_INFO_NONE) - { - LLViewerLogin::getInstance()->setGridChoice(grid_choice); - } - + + std::string startLocation = queryMap["location"].asString(); - + if (startLocation == "specify") { - LLURLSimString::setString(queryMap["region"].asString()); + LLStartUp::setStartSLURL(LLSLURL(LLGridManager::getInstance()->getGridLoginID(), + queryMap["region"].asString())); } - else if (!startLocation.empty()) // "last" or "home" or ??? (let LLURLSimString figure it out) + else if (startLocation == "home") { - LLURLSimString::setString(startLocation); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + } + else if (startLocation == "last") + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); } } @@ -220,40 +145,65 @@ bool LLLoginHandler::handle(const LLSD& tokens, return true; } - std::string password = query_map["password"].asString(); - - if (!password.empty()) + if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page { - gSavedSettings.setBOOL("RememberPassword", TRUE); - - if (password.substr(0,3) != "$1$") - { - LLMD5 pass((unsigned char*)password.c_str()); - char md5pass[33]; /* Flawfinder: ignore */ - pass.hex_digest(md5pass); - std::string hashed_password = ll_safe_string(md5pass, 32); - LLStartUp::savePasswordToDisk(hashed_password); - } + // as the login page may change from grid to grid, as well as + // things like username/password/etc, we simply refresh the + // login page to make sure everything is set up correctly + LLPanelLogin::loadLoginPage(); + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); } - + return true; +} - if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page - { - if (!mFirstName.empty() || !mLastName.empty()) - { - // Fill in the name, and maybe the password - LLPanelLogin::setFields(mFirstName, mLastName, password); - } - //if (mWebLoginKey.isNull()) - //{ - // LLPanelLogin::loadLoginPage(); - //} - //else - //{ - // LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); - //} - LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); - } - return true; + +// Initialize the credentials +// If the passed in URL contains login info, parse +// that into a credential and web login key. Otherwise +// check the command line. If the command line +// does not contain any login creds, load the last saved +// ones from the protected credential store. +// This always returns with a credential structure set in the +// login handler +LLPointer<LLCredential> LLLoginHandler::initializeLoginInfo() +{ + LLPointer<LLCredential> result = NULL; + // so try to load it from the UserLoginInfo + result = loadSavedUserLoginInfo(); + if (result.isNull()) + { + result = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); + } + + return result; +} + + +LLPointer<LLCredential> LLLoginHandler::loadSavedUserLoginInfo() +{ + // load the saved user login info into a LLCredential. + // perhaps this should be moved. + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + if (cmd_line_login.size() == 3) + { + + LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); + char md5pass[33]; /* Flawfinder: ignore */ + pass.hex_digest(md5pass); + LLSD identifier = LLSD::emptyMap(); + identifier["type"] = "agent"; + identifier["first_name"] = cmd_line_login[0]; + identifier["last_name"] = cmd_line_login[1]; + + LLSD authenticator = LLSD::emptyMap(); + authenticator["type"] = "hash"; + authenticator["algorithm"] = "md5"; + authenticator["secret"] = md5pass; + // yuck, we'll fix this with mani's changes. + gSavedSettings.setBOOL("AutoLogin", TRUE); + return gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), + identifier, authenticator); + } + return NULL; } diff --git a/indra/newview/llloginhandler.h b/indra/newview/llloginhandler.h index ac4648761b..c15b998c91 100644 --- a/indra/newview/llloginhandler.h +++ b/indra/newview/llloginhandler.h @@ -34,6 +34,7 @@ #define LLLOGINHANDLER_H #include "llcommandhandler.h" +#include "llsecapi.h" class LLLoginHandler : public LLCommandHandler { @@ -46,19 +47,15 @@ class LLLoginHandler : public LLCommandHandler // secondlife:///app/login?first=Bob&last=Dobbs bool parseDirectLogin(std::string url); - std::string getFirstName() const { return mFirstName; } - std::string getLastName() const { return mLastName; } - // Web-based login unsupported //LLUUID getWebLoginKey() const { return mWebLoginKey; } + LLPointer<LLCredential> loadSavedUserLoginInfo(); + LLPointer<LLCredential> initializeLoginInfo(); + private: void parse(const LLSD& queryMap); -private: - std::string mFirstName; - std::string mLastName; - //LLUUID mWebLoginKey; }; extern LLLoginHandler gLoginHandler; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 454fd29fdc..71604291e1 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -48,13 +48,16 @@ // newview #include "llviewernetwork.h" #include "llviewercontrol.h" -#include "llurlsimstring.h" +#include "llslurl.h" +#include "llstartup.h" #include "llfloaterreg.h" #include "llnotifications.h" #include "llwindow.h" #if LL_LINUX || LL_SOLARIS #include "lltrans.h" #endif +#include "llsecapi.h" +#include "llstartup.h" static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback"; static const char * const TOS_LISTENER_NAME = "lllogininstance_tos"; @@ -83,14 +86,14 @@ LLLoginInstance::~LLLoginInstance() { } -void LLLoginInstance::connect(const LLSD& credentials) +void LLLoginInstance::connect(LLPointer<LLCredential> credentials) { std::vector<std::string> uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); connect(uris.front(), credentials); } -void LLLoginInstance::connect(const std::string& uri, const LLSD& credentials) +void LLLoginInstance::connect(const std::string& uri, LLPointer<LLCredential> credentials) { mAttemptComplete = false; // Reset attempt complete at this point! constructAuthParams(credentials); @@ -102,7 +105,7 @@ void LLLoginInstance::reconnect() // Sort of like connect, only using the pre-existing // request params. std::vector<std::string> uris; - LLViewerLogin::getInstance()->getLoginURIs(uris); + LLGridManager::getInstance()->getLoginURIs(uris); mLoginModule->connect(uris.front(), mRequestData); } @@ -118,7 +121,7 @@ LLSD LLLoginInstance::getResponse() return mResponseData; } -void LLLoginInstance::constructAuthParams(const LLSD& credentials) +void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credential) { // Set up auth request options. //#define LL_MINIMIAL_REQUESTED_OPTIONS @@ -145,8 +148,11 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) requested_options.append("adult_compliant"); //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); + requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif + requested_options.append("map-server-url"); + requested_options.append("voice-config"); requested_options.append("tutorial_setting"); requested_options.append("login-flags"); requested_options.append("global-textures"); @@ -155,20 +161,18 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.append("god-connect"); } + + // (re)initialize the request params with creds. + LLSD request_params = user_credential->getLoginParams(); char hashed_mac_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ LLMD5 hashed_mac; - hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES ); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + hashed_mac.update( MACAddress, MAC_ADDRESS_BYTES ); hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); - - // prepend "$1$" to the password to indicate its the md5'd version. - std::string dpasswd("$1$"); - dpasswd.append(credentials["passwd"].asString()); - - // (re)initialize the request params with creds. - LLSD request_params(credentials); - request_params["passwd"] = dpasswd; + request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; request_params["agree_to_tos"] = false; // Always false here. Set true in @@ -247,6 +251,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LLSD data(LLSD::emptyMap()); data["message"] = message_response; data["reply_pump"] = TOS_REPLY_PUMP; + if(response.has("error_code")) + { + data["error_code"] = response["error_code"]; + } + if(response.has("certificate")) + { + data["certificate"] = response["certificate"]; + } + LLFloaterReg::showInstance("message_critical", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, @@ -452,20 +465,31 @@ bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& std::string construct_start_string() { std::string start; - if (LLURLSimString::parse()) + LLSLURL start_slurl = LLStartUp::getStartSLURL(); + switch(start_slurl.getType()) { - // a startup URL was specified - std::string unescaped_start = + case LLSLURL::LOCATION: + { + // a startup URL was specified + LLVector3 position = start_slurl.getPosition(); + std::string unescaped_start = STRINGIZE( "uri:" - << LLURLSimString::sInstance.mSimName << "&" - << LLURLSimString::sInstance.mX << "&" - << LLURLSimString::sInstance.mY << "&" - << LLURLSimString::sInstance.mZ); - start = xml_escape_string(unescaped_start); - } - else - { - start = gSavedSettings.getString("LoginLocation"); + << start_slurl.getRegion() << "&" + << position[VX] << "&" + << position[VY] << "&" + << position[VZ]); + start = xml_escape_string(unescaped_start); + break; + } + case LLSLURL::HOME_LOCATION: + { + start = "home"; + break; + } + default: + { + start = "last"; + } } return start; } diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index c8704eddb4..44271bb75e 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -36,6 +36,7 @@ #include "lleventdispatcher.h" #include <boost/scoped_ptr.hpp> #include <boost/function.hpp> +#include "llsecapi.h" class LLLogin; class LLEventStream; class LLNotificationsInterface; @@ -48,8 +49,8 @@ public: LLLoginInstance(); ~LLLoginInstance(); - void connect(const LLSD& credential); // Connect to the current grid choice. - void connect(const std::string& uri, const LLSD& credential); // Connect to the given uri. + void connect(LLPointer<LLCredential> credentials); // Connect to the current grid choice. + void connect(const std::string& uri, LLPointer<LLCredential> credentials); // Connect to the given uri. void reconnect(); // reconnect using the current credentials. void disconnect(); @@ -81,7 +82,7 @@ public: void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; } private: - void constructAuthParams(const LLSD& credentials); + void constructAuthParams(LLPointer<LLCredential> user_credentials); void updateApp(bool mandatory, const std::string& message); bool updateDialogCallback(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2f22512aba..afca9daa67 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -91,12 +91,20 @@ BOOL LLFloaterMove::postBuild() LLDockableFloater::postBuild(); + // Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate() + mForwardButton = getChild<LLJoystickAgentTurn>("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mBackwardButton = getChild<LLJoystickAgentTurn>("backward btn"); mBackwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mSlideLeftButton = getChild<LLJoystickAgentSlide>("move left btn"); + mSlideLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + + mSlideRightButton = getChild<LLJoystickAgentSlide>("move right btn"); + mSlideRightButton->setHeldDownDelay(MOVE_BUTTON_DELAY); + mTurnLeftButton = getChild<LLButton>("turn left btn"); mTurnLeftButton->setHeldDownDelay(MOVE_BUTTON_DELAY); mTurnLeftButton->setHeldDownCallback(boost::bind(&LLFloaterMove::turnLeft, this)); @@ -125,8 +133,6 @@ BOOL LLFloaterMove::postBuild() btn = getChild<LLButton>("mode_fly_btn"); btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this)); - showFlyControls(false); - initModeTooltips(); initModeButtonMap(); @@ -345,33 +351,38 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) { - showFlyControls(MM_FLY == newMode); setModeTooltip(newMode); setModeButtonToggleState(newMode); setModeTitle(newMode); } -void LLFloaterMove::showFlyControls(bool bShow) -{ - mMoveUpButton->setVisible(bShow); - mMoveDownButton->setVisible(bShow); -} - void LLFloaterMove::initModeTooltips() { control_tooltip_map_t walkTipMap; walkTipMap.insert(std::make_pair(mForwardButton, getString("walk_forward_tooltip"))); walkTipMap.insert(std::make_pair(mBackwardButton, getString("walk_back_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideLeftButton, getString("walk_left_tooltip"))); + walkTipMap.insert(std::make_pair(mSlideRightButton, getString("walk_right_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + walkTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_WALK] = walkTipMap; control_tooltip_map_t runTipMap; runTipMap.insert(std::make_pair(mForwardButton, getString("run_forward_tooltip"))); runTipMap.insert(std::make_pair(mBackwardButton, getString("run_back_tooltip"))); + runTipMap.insert(std::make_pair(mSlideLeftButton, getString("run_left_tooltip"))); + runTipMap.insert(std::make_pair(mSlideRightButton, getString("run_right_tooltip"))); + runTipMap.insert(std::make_pair(mMoveUpButton, getString("jump_tooltip"))); + runTipMap.insert(std::make_pair(mMoveDownButton, getString("crouch_tooltip"))); mModeControlTooltipsMap[MM_RUN] = runTipMap; control_tooltip_map_t flyTipMap; flyTipMap.insert(std::make_pair(mForwardButton, getString("fly_forward_tooltip"))); flyTipMap.insert(std::make_pair(mBackwardButton, getString("fly_back_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideLeftButton, getString("fly_left_tooltip"))); + flyTipMap.insert(std::make_pair(mSlideRightButton, getString("fly_right_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveUpButton, getString("fly_up_tooltip"))); + flyTipMap.insert(std::make_pair(mMoveDownButton, getString("fly_down_tooltip"))); mModeControlTooltipsMap[MM_FLY] = flyTipMap; setModeTooltip(MM_WALK); diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index dcca8308d9..fcf643f050 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -88,7 +88,6 @@ private: void onFlyButtonClick(); void initMovementMode(); void setMovementMode(const EMovementMode mode); - void showFlyControls(bool bShow); void initModeTooltips(); void setModeTooltip(const EMovementMode mode); void setModeTitle(const EMovementMode mode); @@ -102,6 +101,8 @@ public: LLJoystickAgentTurn* mForwardButton; LLJoystickAgentTurn* mBackwardButton; + LLJoystickAgentSlide* mSlideLeftButton; + LLJoystickAgentSlide* mSlideRightButton; LLButton* mTurnLeftButton; LLButton* mTurnRightButton; LLButton* mMoveUpButton; diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 95094f6b52..7cb192e026 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -145,6 +145,9 @@ std::string LLMute::getDisplayType() const case GROUP: return LLTrans::getString("MuteGroup"); break; + case EXTERNAL: + return LLTrans::getString("MuteExternal"); + break; } } @@ -303,6 +306,12 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) void LLMuteList::updateAdd(const LLMute& mute) { + // External mutes (e.g. Avaline callers) are local only, don't send them to the server. + if (mute.mType == LLMute::EXTERNAL) + { + return; + } + // Update the database LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_UpdateMuteListEntry); @@ -390,6 +399,12 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) void LLMuteList::updateRemove(const LLMute& mute) { + // External mutes are not sent to the server anyway, no need to remove them. + if (mute.mType == LLMute::EXTERNAL) + { + return; + } + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_RemoveMuteListEntry); msg->nextBlockFast(_PREHASH_AgentData); @@ -573,9 +588,14 @@ BOOL LLMuteList::saveToFile(const std::string& filename) it != mMutes.end(); ++it) { - it->mID.toString(id_string); - const std::string& name = it->mName; - fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags); + // Don't save external mutes as they are not sent to the server and probably won't + //be valid next time anyway. + if (it->mType != LLMute::EXTERNAL) + { + it->mID.toString(id_string); + const std::string& name = it->mName; + fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags); + } } fclose(fp); return TRUE; diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 7cb11e6031..79b556bdbb 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -45,7 +45,8 @@ class LLMute { public: // Legacy mutes are BY_NAME and have null UUID. - enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, COUNT = 4 }; + // EXTERNAL mutes are only processed through an external system (e.g. Voice) and not stored. + enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, EXTERNAL = 4, COUNT = 5 }; // Bits in the mute flags. For backwards compatibility (since any mute list entries that were created before the flags existed // will have a flags field of 0), some of the flags are "inverted". diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 9611c286eb..d605d4430e 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -81,7 +81,7 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, item.enabled = enabled; item.target = INDIVIDUAL; - addNameItemRow(item, pos); + addNameItemRow(item, pos, suffix); } // virtual, public diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e11df06d86..251c60b5bf 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -52,7 +52,6 @@ #include "llsearchcombobox.h" #include "llsidetray.h" #include "llslurl.h" -#include "llurlsimstring.h" #include "llurlregistry.h" #include "llurldispatcher.h" #include "llviewerinventory.h" @@ -375,7 +374,6 @@ void LLNavigationBar::draw() if(mPurgeTPHistoryItems) { LLTeleportHistory::getInstance()->purgeItems(); - onTeleportHistoryChanged(); mPurgeTPHistoryItems = false; } @@ -508,29 +506,34 @@ void LLNavigationBar::onLocationSelection() std::string region_name; LLVector3 local_coords(128, 128, 0); - S32 x = 0, y = 0, z = 0; // Is the typed location a SLURL? - if (LLSLURL::isSLURL(typed_location)) + LLSLURL slurl = LLSLURL(typed_location); + if (slurl.getType() == LLSLURL::LOCATION) { - // Yes. Extract region name and local coordinates from it. - if (LLURLSimString::parse(LLSLURL::stripProtocol(typed_location), ®ion_name, &x, &y, &z)) - local_coords.set(x, y, z); - else - return; + region_name = slurl.getRegion(); + local_coords = slurl.getPosition(); } - // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too - //but we need to know whether typed_location is a simple http url. - else if (LLUrlRegistry::instance().isUrl(typed_location)) + else if(!slurl.isValid()) { + // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too + // but we need to know whether typed_location is a simple http url. + if (LLUrlRegistry::instance().isUrl(typed_location)) + { // display http:// URLs in the media browser, or // anything else is sent to the search floater LLWeb::loadURL(typed_location); return; + } + else + { + // assume that an user has typed the {region name} or possible {region_name, parcel} + region_name = typed_location.substr(0,typed_location.find(',')); + } } else { - // assume that an user has typed the {region name} or possible {region_name, parcel} - region_name = typed_location.substr(0,typed_location.find(',')); + // was an app slurl, home, whatever. Bail + return; } // Resolve the region name to its global coordinates. @@ -562,7 +565,7 @@ void LLNavigationBar::onTeleportFinished(const LLVector3d& global_agent_pos) */ LLAgentUI::buildLocationString(location, LLAgentUI::LOCATION_FORMAT_NO_MATURITY, gAgent.getPosAgentFromGlobal(global_agent_pos)); - std::string tooltip (LLSLURL::buildSLURLfromPosGlobal(gAgent.getRegion()->getName(), global_agent_pos, false)); + std::string tooltip (LLSLURL(gAgent.getRegion()->getName(), global_agent_pos).getSLURLString()); LLLocationHistoryItem item (location, global_agent_pos, tooltip,TYPED_REGION_SLURL);// we can add into history only TYPED location @@ -651,7 +654,7 @@ void LLNavigationBar::onRegionNameResponse( LLVector3d region_pos = from_region_handle(region_handle); LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - llinfos << "Teleporting to: " << LLSLURL::buildSLURLfromPosGlobal(region_name, global_pos, false) << llendl; + llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; gAgent.teleportViaLocation(global_pos); } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 5d72827a7a..f1c13de8bb 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -107,7 +107,9 @@ BOOL LLNearbyChat::postBuild() getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); } - setIsChrome(true); + //fix for EXT-4621 + //chrome="true" prevents floater from stilling capture + setIsChrome(true); //chrome="true" hides floater caption if (mDragHandle) mDragHandle->setTitleVisible(TRUE); @@ -351,3 +353,14 @@ void LLNearbyChat::onFocusLost() LLPanel::onFocusLost(); } +BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) +{ + //fix for EXT-6625 + //highlight NearbyChat history whenever mouseclick happen in NearbyChat + //setting focus to eidtor will force onFocusLost() call that in its turn will change + //background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change. + + if(mChatHistory) + mChatHistory->setFocus(TRUE); + return LLDockableFloater::handleMouseDown(x, y, mask); +} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 6ef2a1fee3..3c116dbe83 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -53,6 +53,8 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + // focus overrides /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 3d7f3233ac..eb53d295b2 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -46,10 +46,6 @@ class LLImageRaw; class LLTextBox; class LLViewerTexture; -const F32 MAP_SCALE_MIN = 64.f; -const F32 MAP_SCALE_MID = 172.f; -const F32 MAP_SCALE_MAX = 512.f; - class LLNetMap : public LLUICtrl { public: diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 3f551f6b32..95b946f307 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -114,8 +114,7 @@ void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( - "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( - "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"), + "ObjectGiveItem"), PAYMENT_RECIVED("PaymentRecived"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -327,8 +326,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log - if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName() - != OBJECT_GIVE_ITEM_UNKNOWN_USER) + if (notification->getName() != OBJECT_GIVE_ITEM) { LLUUID from_id = notification->getPayload()["from_id"]; diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp new file mode 100644 index 0000000000..20b40b4e1d --- /dev/null +++ b/indra/newview/llnotificationstorage.cpp @@ -0,0 +1,227 @@ +/** +* @file llnotificationstorage.cpp +* @brief LLPersistentNotificationStorage class implementation +* +* $LicenseInfo:firstyear=2010&license=viewergpl$ +* +* Copyright (c) 2010, 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" // must be first include +#include "llnotificationstorage.h" + +#include "llxmlnode.h" // for linux compilers + +#include "llchannelmanager.h" +#include "llscreenchannel.h" +#include "llscriptfloater.h" +#include "llsdserialize.h" +#include "llviewermessage.h" + +////////////////////////////////////////////////////////////////////////// + +class LLResponderRegistry +{ +public: + + static void registerResponders(); + + static LLNotificationResponderInterface* createResponder(const std::string& notification_name, const LLSD& params); + +private: + + template<typename RESPONDER_TYPE> + static LLNotificationResponderInterface* create(const LLSD& params) + { + RESPONDER_TYPE* responder = new RESPONDER_TYPE(); + responder->fromLLSD(params); + return responder; + } + + typedef boost::function<LLNotificationResponderInterface* (const LLSD& params)> responder_constructor_t; + + static void add(const std::string& notification_name, const responder_constructor_t& ctr); + +private: + + typedef std::map<std::string, responder_constructor_t> build_map_t; + + static build_map_t sBuildMap; +}; + +////////////////////////////////////////////////////////////////////////// + +LLPersistentNotificationStorage::LLPersistentNotificationStorage() +{ + mFileName = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml" ); +} + +bool LLPersistentNotificationStorage::onPersistentChannelChanged(const LLSD& payload) +{ + // we ignore "load" messages, but rewrite the persistence file on any other + const std::string sigtype = payload["sigtype"].asString(); + if ("load" != sigtype) + { + saveNotifications(); + } + return false; +} + +void LLPersistentNotificationStorage::saveNotifications() +{ + // TODO - think about save optimization. + + llofstream notify_file(mFileName.c_str()); + if (!notify_file.is_open()) + { + llwarns << "Failed to open " << mFileName << llendl; + return; + } + + LLSD output; + LLSD& data = output["data"]; + + LLNotificationChannelPtr history_channel = LLNotifications::instance().getChannel("Persistent"); + LLNotificationSet::iterator it = history_channel->begin(); + + for ( ; history_channel->end() != it; ++it) + { + LLNotificationPtr notification = *it; + + // After a notification was placed in Persist channel, it can become + // responded, expired or canceled - in this case we are should not save it + if(notification->isRespondedTo() || notification->isCancelled() + || notification->isExpired()) + { + continue; + } + + data.append(notification->asLLSD()); + } + + LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); + formatter->format(output, notify_file, LLSDFormatter::OPTIONS_PRETTY); +} + +void LLPersistentNotificationStorage::loadNotifications() +{ + LLResponderRegistry::registerResponders(); + + LLNotifications::instance().getChannel("Persistent")-> + connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1)); + + llifstream notify_file(mFileName.c_str()); + if (!notify_file.is_open()) + { + llwarns << "Failed to open " << mFileName << llendl; + return; + } + + LLSD input; + LLPointer<LLSDParser> parser = new LLSDXMLParser(); + if (parser->parse(notify_file, input, LLSDSerialize::SIZE_UNLIMITED) < 0) + { + llwarns << "Failed to parse open notifications" << llendl; + return; + } + + if (input.isUndefined()) + { + return; + } + + LLSD& data = input["data"]; + if (data.isUndefined()) + { + return; + } + + using namespace LLNotificationsUI; + LLScreenChannel* notification_channel = dynamic_cast<LLScreenChannel*>(LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + + LLNotifications& instance = LLNotifications::instance(); + + for (LLSD::array_const_iterator notification_it = data.beginArray(); + notification_it != data.endArray(); + ++notification_it) + { + LLSD notification_params = *notification_it; + LLNotificationPtr notification(new LLNotification(notification_params)); + + LLNotificationResponderPtr responder(LLResponderRegistry:: + createResponder(notification_params["name"], notification_params["responder"])); + notification->setResponseFunctor(responder); + + instance.add(notification); + + // hide script floaters so they don't confuse the user and don't overlap startup toast + LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false); + + if(notification_channel) + { + // hide saved toasts so they don't confuse the user + notification_channel->hideToast(notification->getID()); + } + } +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLResponderRegistry::build_map_t LLResponderRegistry::sBuildMap; + +void LLResponderRegistry::registerResponders() +{ + sBuildMap.clear(); + + add("ObjectGiveItem", &create<LLOfferInfo>); + add("UserGiveItem", &create<LLOfferInfo>); +} + +LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std::string& notification_name, const LLSD& params) +{ + build_map_t::const_iterator it = sBuildMap.find(notification_name); + if(sBuildMap.end() == it) + { + return NULL; + } + responder_constructor_t ctr = it->second; + return ctr(params); +} + +void LLResponderRegistry::add(const std::string& notification_name, const responder_constructor_t& ctr) +{ + if(sBuildMap.find(notification_name) != sBuildMap.end()) + { + llwarns << "Responder is already registered : " << notification_name << llendl; + llassert(!"Responder already registered"); + } + sBuildMap[notification_name] = ctr; +} + +// EOF diff --git a/indra/newview/llnotificationstorage.h b/indra/newview/llnotificationstorage.h new file mode 100644 index 0000000000..5050781a85 --- /dev/null +++ b/indra/newview/llnotificationstorage.h @@ -0,0 +1,65 @@ +/** +* @file llnotificationstorage.h +* @brief LLNotificationStorage class declaration +* +* $LicenseInfo:firstyear=2010&license=viewergpl$ +* +* Copyright (c) 2010, 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_NOTIFICATIONSTORAGE_H +#define LL_NOTIFICATIONSTORAGE_H + +#include "llnotifications.h" + +// Class that saves not responded(unread) notifications. +// Unread notifications are saved in open_notifications.xml in SL account folder +// +// Notifications that should be saved(if unread) are marked with persist="true" in notifications.xml +// Notifications using functor responders are saved automatically (see llviewermessage.cpp +// lure_callback_reg for example). +// Notifications using object responders(LLOfferInfo) need additional tuning. Responder object should +// be a) serializable(implement LLNotificationResponderInterface), +// b) registered with LLResponderRegistry (found in llnotificationstorage.cpp). +class LLPersistentNotificationStorage : public LLSingleton<LLPersistentNotificationStorage> +{ + LOG_CLASS(LLPersistentNotificationStorage); +public: + + LLPersistentNotificationStorage(); + + void saveNotifications(); + + void loadNotifications(); + +private: + + bool onPersistentChannelChanged(const LLSD& payload); + + std::string mFileName; +}; + +#endif // LL_NOTIFICATIONSTORAGE_H diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index e528f871af..df6f04b6ea 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -45,38 +45,6 @@ using namespace LLNotificationsUI; -class LLOnlineStatusToast : public LLPanelTipToast -{ -public: - - struct Params - { - LLNotificationPtr notification; - LLUUID avatar_id; - std::string message; - - Params() {} - }; - - LLOnlineStatusToast(Params& p) : LLPanelTipToast(p.notification) - { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); - - childSetValue("avatar_icon", p.avatar_id); - childSetValue("message", p.message); - - if (p.notification->getPayload().has("respond_on_mousedown") - && p.notification->getPayload()["respond_on_mousedown"] ) - { - setMouseDownCallback(boost::bind(&LLNotification::respond, p.notification, - p.notification->getResponseTemplate())); - } - - // set line max count to 3 in case of a very long name - snapToMessageHeight(getChild<LLTextBox>("message"), 3); - } -}; - //-------------------------------------------------------------------------- LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id) { @@ -157,28 +125,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) return true; } - LLToastPanel* notify_box = NULL; - // TODO: this should be implemented in LLToastPanel::buidPanelFromNotification - if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) - { - LLOnlineStatusToast::Params p; - p.notification = notification; - p.message = notification->getMessage(); - p.avatar_id = notification->getPayload()["FROM_ID"]; - notify_box = new LLOnlineStatusToast(p); - } - else - { - notify_box = LLToastPanel::buidPanelFromNotification(notification); - } - - // TODO: this if statement should be removed after modification of - // LLToastPanel::buidPanelFromNotification() to allow create generic tip panel - // for all tip notifications except FriendOnline and FriendOffline - if (notify_box == NULL) - { - notify_box = new LLToastNotifyPanel(notification); - } + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); LLToast::Params p; p.notif_id = notification->getID(); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp new file mode 100644 index 0000000000..12d5203429 --- /dev/null +++ b/indra/newview/lloutfitslist.cpp @@ -0,0 +1,428 @@ +/** + * @file lloutfitslist.cpp + * @brief List of agent's outfits for My Appearance side panel. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "lloutfitslist.h" + +// llcommon +#include "llcommonutils.h" + +// llcommon +#include "llcommonutils.h" + +#include "llaccordionctrl.h" +#include "llaccordionctrltab.h" +#include "llappearancemgr.h" +#include "llinventoryfunctions.h" +#include "llinventorymodel.h" +#include "llwearableitemslist.h" + +static LLRegisterPanelClassWrapper<LLOutfitsList> t_outfits_list("outfits_list"); + +LLOutfitsList::LLOutfitsList() + : LLPanel() + , mAccordion(NULL) + , mListCommands(NULL) + , mSelectedList(NULL) +{ + mCategoriesObserver = new LLInventoryCategoriesObserver(); + gInventory.addObserver(mCategoriesObserver); + + gInventory.addObserver(this); +} + +LLOutfitsList::~LLOutfitsList() +{ + if (gInventory.containsObserver(mCategoriesObserver)) + { + gInventory.removeObserver(mCategoriesObserver); + delete mCategoriesObserver; + } + + if (gInventory.containsObserver(this)) + { + gInventory.removeObserver(this); + } +} + +BOOL LLOutfitsList::postBuild() +{ + mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); + + return TRUE; +} + +//virtual +void LLOutfitsList::changed(U32 mask) +{ + if (!gInventory.isInventoryUsable()) + return; + + const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + LLViewerInventoryCategory* category = gInventory.getCategory(outfits); + if (!category) + return; + + // Start observing changes in "My Outfits" category. + mCategoriesObserver->addCategory(outfits, + boost::bind(&LLOutfitsList::refreshList, this, outfits)); + + // Fetch "My Outfits" contents and refresh the list to display + // initially fetched items. If not all items are fetched now + // the observer will refresh the list as soon as the new items + // arrive. + category->fetch(); + refreshList(outfits); + + // This observer is used to start the initial outfits fetch + // when inventory becomes usable. It is no longer needed because + // "My Outfits" category is now observed by + // LLInventoryCategoriesObserver. + gInventory.removeObserver(this); +} + +void LLOutfitsList::refreshList(const LLUUID& category_id) +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + + // Collect all sub-categories of a given category. + LLIsType is_category(LLAssetType::AT_CATEGORY); + gInventory.collectDescendentsIf( + category_id, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + is_category); + + uuid_vec_t vadded; + uuid_vec_t vremoved; + + // Create added and removed items vectors. + computeDifference(cat_array, vadded, vremoved); + + // Handle added tabs. + for (uuid_vec_t::const_iterator iter = vadded.begin(); + iter != vadded.end(); + ++iter) + { + const LLUUID cat_id = (*iter); + LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); + if (!cat) continue; + + std::string name = cat->getName(); + + static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); + LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL); + + tab->setName(name); + tab->setTitle(name); + + // *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated. + tab->setDisplayChildren(false); + mAccordion->addCollapsibleCtrl(tab); + + // Start observing the new outfit category. + LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list"); + if (!mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id))) + { + // Remove accordion tab if category could not be added to observer. + mAccordion->removeCollapsibleCtrl(tab); + continue; + } + + // Map the new tab with outfit category UUID. + mOutfitsMap.insert(LLOutfitsList::outfits_map_value_t(cat_id, tab)); + + // Setting tab focus callback to monitor currently selected outfit. + tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); + + // Setting list commit callback to monitor currently selected wearable item. + list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); + + // Setting list refresh callback to apply filter on list change. + list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onWearableItemsListRefresh, this, _1)); + + // Fetch the new outfit contents. + cat->fetch(); + + // Refresh the list of outfit items after fetch(). + // Further list updates will be triggered by the category observer. + list->updateList(cat_id); + } + + // Handle removed tabs. + for (uuid_vec_t::const_iterator iter=vremoved.begin(); iter != vremoved.end(); iter++) + { + outfits_map_t::iterator outfits_iter = mOutfitsMap.find((*iter)); + if (outfits_iter != mOutfitsMap.end()) + { + // An outfit is removed from the list. Do the following: + // 1. Remove outfit accordion tab from accordion. + mAccordion->removeCollapsibleCtrl(outfits_iter->second); + + const LLUUID& outfit_id = outfits_iter->first; + + // 2. Remove outfit category from observer to stop monitoring its changes. + mCategoriesObserver->removeCategory(outfit_id); + + // 3. Reset selection if selected outfit is being removed. + if (mSelectedOutfitUUID == outfit_id) + { + changeOutfitSelection(NULL, LLUUID()); + } + + // 4. Remove category UUID to accordion tab mapping. + mOutfitsMap.erase(outfits_iter); + } + } + + // Get changed items from inventory model and update outfit tabs + // which might have been renamed. + const LLInventoryModel::changed_items_t& changed_items = gInventory.getChangedIDs(); + for (LLInventoryModel::changed_items_t::const_iterator items_iter = changed_items.begin(); + items_iter != changed_items.end(); + ++items_iter) + { + updateOutfitTab(*items_iter); + } + + mAccordion->arrange(); +} + +void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) +{ + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl); + if (!list) return; + + LLViewerInventoryItem *item = gInventory.getItem(list->getSelectedUUID()); + if (!item) return; + + changeOutfitSelection(list, item->getParentUUID()); +} + +void LLOutfitsList::performAction(std::string action) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(mSelectedOutfitUUID); + if (!cat) return; + + if ("replaceoutfit" == action) + { + LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE ); + } + else if ("addtooutfit" == action) + { + LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE ); + } +} + +void LLOutfitsList::setFilterSubString(const std::string& string) +{ + applyFilter(string); + + mFilterSubString = string; +} + +////////////////////////////////////////////////////////////////////////// +// Private methods +////////////////////////////////////////////////////////////////////////// +LLXMLNodePtr LLOutfitsList::getAccordionTabXMLNode() +{ + LLXMLNodePtr xmlNode = NULL; + bool success = LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode); + if (!success) + { + llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl; + return NULL; + } + + return xmlNode; +} + +void LLOutfitsList::computeDifference( + const LLInventoryModel::cat_array_t& vcats, + uuid_vec_t& vadded, + uuid_vec_t& vremoved) +{ + uuid_vec_t vnew; + // Creating a vector of newly collected sub-categories UUIDs. + for (LLInventoryModel::cat_array_t::const_iterator iter = vcats.begin(); + iter != vcats.end(); + iter++) + { + vnew.push_back((*iter)->getUUID()); + } + + uuid_vec_t vcur; + // Creating a vector of currently displayed sub-categories UUIDs. + for (outfits_map_t::const_iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + iter++) + { + vcur.push_back((*iter).first); + } + + LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved); +} + +void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) +{ + outfits_map_t::iterator outfits_iter = mOutfitsMap.find(category_id); + if (outfits_iter != mOutfitsMap.end()) + { + LLViewerInventoryCategory *cat = gInventory.getCategory(category_id); + if (!cat) return; + + std::string name = cat->getName(); + + // Update tab name with the new category name. + LLAccordionCtrlTab* tab = outfits_iter->second; + if (tab) + { + tab->setName(name); + tab->setTitle(name); + } + } +} + +void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) +{ + // Reset selection in previously selected tab + // if a new one is selected. + if (list && mSelectedList && mSelectedList != list) + { + mSelectedList->resetSelection(); + } + + mSelectedList = list; + mSelectedOutfitUUID = category_id; +} + +void LLOutfitsList::onWearableItemsListRefresh(LLUICtrl* ctrl) +{ + if (!ctrl || mFilterSubString.empty()) + return; + + for (outfits_map_t::iterator + iter = mOutfitsMap.begin(), + iter_end = mOutfitsMap.end(); + iter != iter_end; ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if (tab) continue; + + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (list != ctrl) continue; + + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = mFilterSubString; + LLStringUtil::toUpper(cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(list->size() != 0); + } + else + { + tab->setTitle(tab->getTitle(), cur_filter); + } + } +} + +void LLOutfitsList::applyFilter(const std::string& new_filter_substring) +{ + for (outfits_map_t::iterator + iter = mOutfitsMap.begin(), + iter_end = mOutfitsMap.end(); + iter != iter_end; ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if (!tab) continue; + + bool more_restrictive = mFilterSubString.size() < new_filter_substring.size() && !new_filter_substring.substr(0, mFilterSubString.size()).compare(mFilterSubString); + + // Restore tab visibility in case of less restrictive filter + // to compare it with updated string if it was previously hidden. + if (!more_restrictive) + { + tab->setVisible(TRUE); + } + + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (list) + { + list->setFilterSubString(new_filter_substring); + } + + if(mFilterSubString.empty() && !new_filter_substring.empty()) + { + //store accordion tab state when filter is not empty + tab->notifyChildren(LLSD().with("action","store_state")); + } + + if (!new_filter_substring.empty()) + { + tab->setDisplayChildren(true); + + std::string title = tab->getTitle(); + LLStringUtil::toUpper(title); + + std::string cur_filter = new_filter_substring; + LLStringUtil::toUpper(cur_filter); + + if (std::string::npos == title.find(cur_filter)) + { + // hide tab if its title doesn't pass filter + // and it has no visible items + tab->setVisible(list->size() != 0); + } + else + { + tab->setTitle(tab->getTitle(), cur_filter); + } + } + else + { + // restore tab title when filter is empty + tab->setTitle(tab->getTitle()); + + //restore accordion state after all those accodrion tab manipulations + tab->notifyChildren(LLSD().with("action","restore_state")); + } + } +} + +// EOF diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h new file mode 100644 index 0000000000..bcb393b12a --- /dev/null +++ b/indra/newview/lloutfitslist.h @@ -0,0 +1,123 @@ +/** + * @file lloutfitslist.h + * @brief List of agent's outfits for My Appearance side panel. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLOUTFITSLIST_H +#define LL_LLOUTFITSLIST_H + +#include "llpanel.h" + +// newview +#include "llinventorymodel.h" +#include "llinventoryobserver.h" + +class LLAccordionCtrl; +class LLAccordionCtrlTab; +class LLWearableItemsList; + +/** + * @class LLOutfitsList + * + * A list of agents's outfits from "My Outfits" inventory category + * which displays each outfit in an accordion tab with a flat list + * of items inside it. + * Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits" + * inventory category and refresh the outfits listed in it. + * This class is derived from LLInventoryObserver to know when inventory + * becomes usable and it is safe to request data from inventory model. + */ +class LLOutfitsList : public LLPanel, public LLInventoryObserver +{ +public: + LLOutfitsList(); + virtual ~LLOutfitsList(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void changed(U32 mask); + + void refreshList(const LLUUID& category_id); + + void onSelectionChange(LLUICtrl* ctrl); + + void performAction(std::string action); + + void setFilterSubString(const std::string& string); + +private: + /** + * Reads xml with accordion tab and Flat list from xml file. + * + * @return LLPointer to XMLNode with accordion tab and flat list. + */ + LLXMLNodePtr getAccordionTabXMLNode(); + + /** + * Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference + */ + void computeDifference(const LLInventoryModel::cat_array_t& vcats, uuid_vec_t& vadded, uuid_vec_t& vremoved); + + /** + * Updates tab displaying outfit identified by category_id. + */ + void updateOutfitTab(const LLUUID& category_id); + + /** + * Resets previous selection and stores newly selected list and outfit id. + */ + void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); + + /** + * Called upon list refresh event to update tab visibility depending on + * the results of applying filter to the title and list items of the tab. + */ + void onWearableItemsListRefresh(LLUICtrl* ctrl); + + /** + * Highlights filtered items and hides tabs which haven't passed filter. + */ + void applyFilter(const std::string& new_filter_substring); + + LLInventoryCategoriesObserver* mCategoriesObserver; + + LLAccordionCtrl* mAccordion; + LLPanel* mListCommands; + + LLWearableItemsList* mSelectedList; + LLUUID mSelectedOutfitUUID; + + std::string mFilterSubString; + + typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t; + typedef outfits_map_t::value_type outfits_map_value_t; + outfits_map_t mOutfitsMap; +}; + +#endif //LL_LLOUTFITSLIST_H diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index d6d48a4ead..197a0ef728 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -142,7 +142,7 @@ void LLOutputMonitorCtrl::draw() // Copied from llmediaremotectrl.cpp // *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then - // call directly into gVoiceClient to ask if that agent-id is muted, is + // call directly into LLVoiceClient::getInstance() to ask if that agent-id is muted, is // speaking, and what power. This avoids duplicating data, which can get // out of sync. const F32 LEVEL_0 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL / 3.f; @@ -151,14 +151,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { - setPower(gVoiceClient->getCurrentPower(mSpeakerId)); + setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId)); if(mIsAgentControl) { - setIsTalking(gVoiceClient->getUserPTTState()); + setIsTalking(LLVoiceClient::getInstance()->getUserPTTState()); } else { - setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); + setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId)); } } diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index b7454a5066..3a83da67e2 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -143,7 +143,7 @@ private: LLPointer<LLUIImage> mImageLevel2; LLPointer<LLUIImage> mImageLevel3; - /** whether to deal with gVoiceClient directly */ + /** whether to deal with LLVoiceClient::getInstance() directly */ bool mAutoUpdate; /** uuid of a speaker being monitored */ diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 67e048885f..3f1b23ba14 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -258,7 +258,7 @@ void LLOverlayBar::refresh() { // update "remotes" childSetVisible("media_remote_container", TRUE); - childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); + childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled()); childSetVisible("state_buttons", TRUE); } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index dd632ccefe..0b31ffc9a0 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -164,7 +164,7 @@ BOOL LLPanelAvatarNotes::postBuild() resetControls(); resetData(); - gVoiceClient->addObserver((LLVoiceClientStatusObserver*)this); + LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); return TRUE; } @@ -375,7 +375,7 @@ void LLPanelAvatarNotes::onChange(EStatusType status, const std::string &channel return; } - childSetEnabled("call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelAvatarNotes::setAvatarId(const LLUUID& id) @@ -519,7 +519,7 @@ BOOL LLPanelAvatarProfile::postBuild() pic = getChild<LLTextureCtrl>("real_world_pic"); pic->setFallbackImageName("default_profile_picture.j2c"); - gVoiceClient->addObserver((LLVoiceClientStatusObserver*)this); + LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); resetControls(); resetData(); @@ -814,7 +814,7 @@ void LLPanelAvatarProfile::onChange(EStatusType status, const std::string &chann return; } - childSetEnabled("call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelAvatarProfile::setAvatarId(const LLUUID& id) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index da74295f9e..557fb399be 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -51,6 +51,12 @@ #include "llagentwearables.h" #include "llscrollingpanelparam.h" +#include "llcolorswatch.h" +#include "lltexturectrl.h" +#include "lltextureentry.h" +#include "llviewercontrol.h" // gSavedSettings +#include "llviewertexturelist.h" + // register panel with appropriate XML static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable"); @@ -88,6 +94,8 @@ enum ESubpart { SUBPART_TATTOO }; +using namespace LLVOAvatarDefines; + typedef std::vector<ESubpart> subpart_vec_t; // Locally defined classes @@ -107,25 +115,28 @@ public: public: struct WearableEntry : public LLDictionaryEntry { - WearableEntry(EWearableType type, + WearableEntry(LLWearableType::EType type, const std::string &title, const std::string &desc_title, - U8 num_subparts, ... ); // number of subparts followed by a list of ESubparts + U8 num_color_swatches, // number of 'color_swatches' + U8 num_texture_pickers, // number of 'texture_pickers' + U8 num_subparts, ... ); // number of subparts followed by a list of ETextureIndex and ESubparts - const EWearableType mWearableType; + const LLWearableType::EType mWearableType; const std::string mTitle; const std::string mDescTitle; subpart_vec_t mSubparts; - + texture_vec_t mColorSwatchCtrls; + texture_vec_t mTextureCtrls; }; - struct Wearables : public LLDictionary<EWearableType, WearableEntry> + struct Wearables : public LLDictionary<LLWearableType::EType, WearableEntry> { Wearables(); } mWearables; - const WearableEntry* getWearable(EWearableType type) const { return mWearables.lookup(type); } + const WearableEntry* getWearable(LLWearableType::EType type) const { return mWearables.lookup(type); } //-------------------------------------------------------------------- // Subparts @@ -158,6 +169,35 @@ public: } mSubparts; const SubpartEntry* getSubpart(ESubpart subpart) const { return mSubparts.lookup(subpart); } + + //-------------------------------------------------------------------- + // Picker Control Entries + //-------------------------------------------------------------------- +public: + struct PickerControlEntry : public LLDictionaryEntry + { + PickerControlEntry(ETextureIndex tex_index, + const std::string name, + const LLUUID default_image_id = LLUUID::null, + const bool allow_no_texture = false); + ETextureIndex mTextureIndex; + const std::string mControlName; + const LLUUID mDefaultImageId; + const bool mAllowNoTexture; + }; + + struct ColorSwatchCtrls : public LLDictionary<ETextureIndex, PickerControlEntry> + { + ColorSwatchCtrls(); + } mColorSwatchCtrls; + + struct TextureCtrls : public LLDictionary<ETextureIndex, PickerControlEntry> + { + TextureCtrls(); + } mTextureCtrls; + + const PickerControlEntry* getTexturePicker(ETextureIndex index) const { return mTextureCtrls.lookup(index); } + const PickerControlEntry* getColorSwatch(ETextureIndex index) const { return mColorSwatchCtrls.lookup(index); } }; LLEditWearableDictionary::LLEditWearableDictionary() @@ -172,26 +212,28 @@ LLEditWearableDictionary::~LLEditWearableDictionary() LLEditWearableDictionary::Wearables::Wearables() { - addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); - addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",4, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); - addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",4, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); - addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",1, SUBPART_EYES)); - addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1, SUBPART_SHIRT)); - addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1, SUBPART_PANTS)); - addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1, SUBPART_SHOES)); - addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1, SUBPART_SOCKS)); - addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1, SUBPART_JACKET)); - addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1, SUBPART_GLOVES)); - addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1, SUBPART_UNDERSHIRT)); - addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1, SUBPART_UNDERPANTS)); - addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1, SUBPART_SKIRT)); - addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",1, SUBPART_ALPHA)); - addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1, SUBPART_TATTOO)); -} - -LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type, + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE)); + addEntry(LLWearableType::WT_SKIN, new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL)); + addEntry(LLWearableType::WT_EYES, new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",0,3,1, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO)); +} + +LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type, const std::string &title, const std::string &desc_title, + U8 num_color_swatches, + U8 num_texture_pickers, U8 num_subparts, ... ) : LLDictionaryEntry(title), mWearableType(type), @@ -201,6 +243,18 @@ LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type, va_list argp; va_start(argp, num_subparts); + for (U8 i = 0; i < num_color_swatches; ++i) + { + ETextureIndex index = (ETextureIndex)va_arg(argp,int); + mColorSwatchCtrls.push_back(index); + } + + for (U8 i = 0; i < num_texture_pickers; ++i) + { + ETextureIndex index = (ETextureIndex)va_arg(argp,int); + mTextureCtrls.push_back(index); + } + for (U8 i = 0; i < num_subparts; ++i) { ESubpart part = (ESubpart)va_arg(argp,int); @@ -265,6 +319,268 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part, { } +LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() +{ + addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Color/Tint" )); + addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Color/Tint" )); + addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Color/Tint" )); + addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Color/Tint" )); + addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Color/Tint" )); + addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Color/Tint" )); + addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" )); + addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" )); + addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" )); +} + +LLEditWearableDictionary::TextureCtrls::TextureCtrls() +{ + addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head Tattoos", LLUUID::null, TRUE )); + addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Tattoos", LLUUID::null, TRUE )); + addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Tattoos", LLUUID::null, TRUE )); + addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); + addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); + addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE )); + addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); + addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE )); + addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE )); + addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); + addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); + addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); + addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); + addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); + addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); + addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE )); + addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE )); + addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE )); +} + +LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, + const std::string name, + const LLUUID default_image_id, + const bool allow_no_texture) : + LLDictionaryEntry(name), + mTextureIndex(tex_index), + mControlName(name), + mDefaultImageId(default_image_id), + mAllowNoTexture(allow_no_texture) +{ +} + +// Helper functions. +static const texture_vec_t null_texture_vec; + +// Specializations of this template function return a vector of texture indexes of particular control type +// (i.e. LLColorSwatchCtrl or LLTextureCtrl) which are contained in given WearableEntry. +template <typename T> +const texture_vec_t& +get_pickers_indexes(const LLEditWearableDictionary::WearableEntry *wearable_entry) { return null_texture_vec; } + +// Specializations of this template function return picker control entry for particular control type. +template <typename T> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry (const ETextureIndex index) { return NULL; } + +typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t; + +typedef struct PickerControlEntryNamePredicate +{ + PickerControlEntryNamePredicate(const std::string name) : mName (name) {}; + bool operator()(const LLEditWearableDictionary::PickerControlEntry* entry) const + { + return (entry && entry->mName == mName); + } +private: + const std::string mName; +} PickerControlEntryNamePredicate; + +// A full specialization of get_pickers_indexes for LLColorSwatchCtrl +template <> +const texture_vec_t& +get_pickers_indexes<LLColorSwatchCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry) +{ + if (!wearable_entry) + { + llwarns << "could not get LLColorSwatchCtrl indexes for null wearable entry." << llendl; + return null_texture_vec; + } + return wearable_entry->mColorSwatchCtrls; +} + +// A full specialization of get_pickers_indexes for LLTextureCtrl +template <> +const texture_vec_t& +get_pickers_indexes<LLTextureCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry) +{ + if (!wearable_entry) + { + llwarns << "could not get LLTextureCtrl indexes for null wearable entry." << llendl; + return null_texture_vec; + } + return wearable_entry->mTextureCtrls; +} + +// A full specialization of get_picker_entry for LLColorSwatchCtrl +template <> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry<LLColorSwatchCtrl> (const ETextureIndex index) +{ + return LLEditWearableDictionary::getInstance()->getColorSwatch(index); +} + +// A full specialization of get_picker_entry for LLTextureCtrl +template <> +const LLEditWearableDictionary::PickerControlEntry* +get_picker_entry<LLTextureCtrl> (const ETextureIndex index) +{ + return LLEditWearableDictionary::getInstance()->getTexturePicker(index); +} + +template <typename CtrlType, class Predicate> +const LLEditWearableDictionary::PickerControlEntry* +find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) +{ + const LLEditWearableDictionary::WearableEntry *wearable_entry + = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) + { + llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + return NULL; + } + const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry); + for (texture_vec_t::const_iterator + iter = indexes.begin(), + iter_end = indexes.end(); + iter != iter_end; ++iter) + { + const ETextureIndex te = *iter; + const LLEditWearableDictionary::PickerControlEntry* entry + = get_picker_entry<CtrlType>(te); + if (!entry) + { + llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; + continue; + } + if (pred(entry)) + { + return entry; + } + } + return NULL; +} + +template <typename CtrlType> +void +for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun) +{ + if (!panel) + { + llwarns << "the panel wasn't passed for wearable of type: " << type << llendl; + return; + } + const LLEditWearableDictionary::WearableEntry *wearable_entry + = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) + { + llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + return; + } + const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry); + for (texture_vec_t::const_iterator + iter = indexes.begin(), + iter_end = indexes.end(); + iter != iter_end; ++iter) + { + const ETextureIndex te = *iter; + const LLEditWearableDictionary::PickerControlEntry* entry + = get_picker_entry<CtrlType>(te); + if (!entry) + { + llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; + continue; + } + fun (panel, entry); + } +} + +// The helper functions for pickers management +static void init_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); + if (color_swatch_ctrl) + { + color_swatch_ctrl->setOriginal(self->getWearable()->getClothesColor(entry->mTextureIndex)); + } +} + +static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); + if (texture_ctrl) + { + texture_ctrl->setDefaultImageAssetID(entry->mDefaultImageId); + texture_ctrl->setAllowNoTexture(entry->mAllowNoTexture); + // Don't allow (no copy) or (notransfer) textures to be selected. + texture_ctrl->setImmediateFilterPermMask(PERM_NONE); + texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE); + } +} + +static void update_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); + if (color_swatch_ctrl) + { + color_swatch_ctrl->set(self->getWearable()->getClothesColor(entry->mTextureIndex)); + } +} + +static void update_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); + if (texture_ctrl) + { + LLUUID new_id; + LLLocalTextureObject *lto = self->getWearable()->getLocalTextureObject(entry->mTextureIndex); + if( lto && (lto->getID() != IMG_DEFAULT_AVATAR) ) + { + new_id = lto->getID(); + } + else + { + new_id = LLUUID::null; + } + LLUUID old_id = texture_ctrl->getImageAssetID(); + if (old_id != new_id) + { + // texture has changed, close the floater to avoid DEV-22461 + texture_ctrl->closeDependentFloater(); + } + texture_ctrl->setImageAssetID(new_id); + } +} + +static void set_enabled_color_swatch_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); + if (color_swatch_ctrl) + { + color_swatch_ctrl->setEnabled(enabled); + } +} + +static void set_enabled_texture_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry) +{ + LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName); + if (texture_ctrl) + { + texture_ctrl->setEnabled(enabled); + } +} // LLPanelEditWearable @@ -273,6 +589,8 @@ LLPanelEditWearable::LLPanelEditWearable() , mWearablePtr(NULL) , mWearableItem(NULL) { + mCommitCallbackRegistrar.add("ColorSwatch.Commit", boost::bind(&LLPanelEditWearable::onColorSwatchCommit, this, _1)); + mCommitCallbackRegistrar.add("TexturePicker.Commit", boost::bind(&LLPanelEditWearable::onTexturePickerCommit, this, _1)); } //virtual @@ -317,6 +635,8 @@ BOOL LLPanelEditWearable::postBuild() mPanelAlpha = getChild<LLPanel>("edit_alpha_panel"); mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel"); + mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height"); + mWearablePtr = NULL; return TRUE; @@ -341,6 +661,12 @@ BOOL LLPanelEditWearable::isDirty() const void LLPanelEditWearable::draw() { updateVerbs(); + if (getWearable()) + { + LLWearableType::EType type = getWearable()->getType(); + updatePanelPickerControls(type); + updateTypeSpecificControls(type); + } LLPanel::draw(); } @@ -361,6 +687,102 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata) panel->revertChanges(); } +void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) +{ + const LLTextureCtrl* texture_ctrl = dynamic_cast<const LLTextureCtrl*>(ctrl); + if (!texture_ctrl) + { + llwarns << "got commit signal from not LLTextureCtrl." << llendl; + return; + } + + if (getWearable()) + { + LLWearableType::EType type = getWearable()->getType(); + const PickerControlEntryNamePredicate name_pred(texture_ctrl->getName()); + const LLEditWearableDictionary::PickerControlEntry* entry + = find_picker_ctrl_entry_if<LLTextureCtrl, PickerControlEntryNamePredicate>(type, name_pred); + if (entry) + { + // Set the new version + LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_ctrl->getImageAssetID()); + if( image->getID().isNull() ) + { + image = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR); + } + if (getWearable()) + { + U32 index = gAgentWearables.getWearableIndex(getWearable()); + gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); + LLVisualParamHint::requestHintUpdates(); + gAgentAvatarp->wearableUpdated(type, FALSE); + } + } + else + { + llwarns << "could not get texture picker dictionary entry for wearable of type: " << type << llendl; + } + } +} + +void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) +{ + if (getWearable()) + { + LLWearableType::EType type = getWearable()->getType(); + const PickerControlEntryNamePredicate name_pred(ctrl->getName()); + const LLEditWearableDictionary::PickerControlEntry* entry + = find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred); + if (entry) + { + const LLColor4& old_color = getWearable()->getClothesColor(entry->mTextureIndex); + const LLColor4& new_color = LLColor4(ctrl->getValue()); + if( old_color != new_color ) + { + getWearable()->setClothesColor(entry->mTextureIndex, new_color, TRUE); + LLVisualParamHint::requestHintUpdates(); + gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE); + } + } + else + { + llwarns << "could not get color swatch dictionary entry for wearable of type: " << type << llendl; + } + } +} + +void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) +{ + LLPanel* panel = getPanel(type); + if (!panel) + return; + + bool is_modifiable = false; + bool is_complete = false; + bool is_copyable = false; + + if(mWearableItem) + { + const LLPermissions& perm = mWearableItem->getPermissions(); + is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID()); + is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()); + is_complete = mWearableItem->isFinished(); + } + + if (is_modifiable && is_complete) + { + // Update picker controls + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(update_color_swatch_ctrl, this, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (panel, type, boost::bind(update_texture_ctrl, this, _1, _2)); + } + + if (!is_modifiable || !is_complete || !is_copyable) + { + // Disable controls + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(set_enabled_color_swatch_ctrl, false, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (panel, type, boost::bind(set_enabled_texture_ctrl, false, _1, _2)); + } +} void LLPanelEditWearable::saveChanges() { @@ -405,7 +827,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) mWearableItem = gInventory.getItem(mWearablePtr->getItemID()); llassert(mWearableItem); - EWearableType type = wearable->getType(); + LLWearableType::EType type = wearable->getType(); LLPanel *targetPanel = NULL; std::string title; std::string description_title; @@ -428,6 +850,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) mDescTitle->setText(description_title); } + // Update picker controls state + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); } void LLPanelEditWearable::initializePanel() @@ -438,11 +863,14 @@ void LLPanelEditWearable::initializePanel() return; } - EWearableType type = mWearablePtr->getType(); + LLWearableType::EType type = mWearablePtr->getType(); // set name mTextEditor->setText(mWearablePtr->getName()); + // toggle wearable type-specific controls + toggleTypeSpecificControls(type); + // clear and rebuild visual param list const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) @@ -493,9 +921,36 @@ void LLPanelEditWearable::initializePanel() updateScrollingPanelUI(); } + + // initialize texture and color picker controls + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + updateVerbs(); } +void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type) +{ + // Toggle controls specific to shape editing panel. + { + bool is_shape = (type == LLWearableType::WT_SHAPE); + childSetVisible("sex_radio", is_shape); + childSetVisible("female_icon", is_shape); + childSetVisible("male_icon", is_shape); + } +} + +void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) +{ + // Update controls specific to shape editing panel. + if (type == LLWearableType::WT_SHAPE) + { + // Update avatar height + std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]); + mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str); + } +} + void LLPanelEditWearable::updateScrollingPanelUI() { // do nothing if we don't have a valid wearable we're editing @@ -504,7 +959,7 @@ void LLPanelEditWearable::updateScrollingPanelUI() return; } - EWearableType type = mWearablePtr->getType(); + LLWearableType::EType type = mWearablePtr->getType(); LLPanel *panel = getPanel(type); if(panel && (mWearablePtr->getItemID().notNull())) @@ -534,67 +989,67 @@ void LLPanelEditWearable::updateScrollingPanelUI() } } -LLPanel* LLPanelEditWearable::getPanel(EWearableType type) +LLPanel* LLPanelEditWearable::getPanel(LLWearableType::EType type) { switch (type) { - case WT_SHAPE: + case LLWearableType::WT_SHAPE: return mPanelShape; break; - case WT_SKIN: + case LLWearableType::WT_SKIN: return mPanelSkin; break; - case WT_HAIR: + case LLWearableType::WT_HAIR: return mPanelHair; break; - case WT_EYES: + case LLWearableType::WT_EYES: return mPanelEyes; break; - case WT_SHIRT: + case LLWearableType::WT_SHIRT: return mPanelShirt; break; - case WT_PANTS: + case LLWearableType::WT_PANTS: return mPanelPants; break; - case WT_SHOES: + case LLWearableType::WT_SHOES: return mPanelShoes; break; - case WT_SOCKS: + case LLWearableType::WT_SOCKS: return mPanelSocks; break; - case WT_JACKET: + case LLWearableType::WT_JACKET: return mPanelJacket; break; - case WT_GLOVES: + case LLWearableType::WT_GLOVES: return mPanelGloves; break; - case WT_UNDERSHIRT: + case LLWearableType::WT_UNDERSHIRT: return mPanelUndershirt; break; - case WT_UNDERPANTS: + case LLWearableType::WT_UNDERPANTS: return mPanelUnderpants; break; - case WT_SKIRT: + case LLWearableType::WT_SKIRT: return mPanelSkirt; break; - case WT_ALPHA: + case LLWearableType::WT_ALPHA: return mPanelAlpha; break; - case WT_TATTOO: + case LLWearableType::WT_TATTOO: return mPanelTattoo; break; default: diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 8b63685177..a5a332019d 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -36,7 +36,7 @@ #include "llpanel.h" #include "llscrollingpanellist.h" #include "llmodaldialog.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" class LLWearable; class LLTextEditor; @@ -71,12 +71,18 @@ private: void showWearable(LLWearable* wearable, BOOL show); void initializePanel(); void updateScrollingPanelUI(); - LLPanel* getPanel(EWearableType type); + LLPanel* getPanel(LLWearableType::EType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab); // update bottom bar buttons ("Save", "Revert", etc) void updateVerbs(); + void onColorSwatchCommit(const LLUICtrl*); + void onTexturePickerCommit(const LLUICtrl*); + void updatePanelPickerControls(LLWearableType::EType type); + void toggleTypeSpecificControls(LLWearableType::EType type); + void updateTypeSpecificControls(LLWearableType::EType type); + // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; @@ -87,6 +93,7 @@ private: LLTextBox *mPanelTitle; LLTextBox *mDescTitle; + LLTextBox *mTxtAvatarHeight; // This text editor reference will change each time we edit a new wearable - @@ -112,7 +119,6 @@ private: LLPanel *mPanelSkirt; LLPanel *mPanelAlpha; LLPanel *mPanelTattoo; - }; #endif diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index c00b6a4147..d997b83cbb 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -92,8 +92,7 @@ LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), mSkipRefresh(FALSE), - mButtonJoin(NULL), - mShowingNotifyDialog(false) + mButtonJoin(NULL) { // Set up the factory callbacks. // Roles sub tabs @@ -201,7 +200,7 @@ BOOL LLPanelGroup::postBuild() mJoinText = panel_general->getChild<LLUICtrl>("join_cost_text"); } - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); return TRUE; } @@ -322,7 +321,7 @@ void LLPanelGroup::onChange(EStatusType status, const std::string &channelURI, b return; } - childSetEnabled("btn_call", LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()); + childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } void LLPanelGroup::notifyObservers() @@ -629,69 +628,4 @@ void LLPanelGroup::showNotice(const std::string& subject, } -bool LLPanelGroup::canClose() -{ - if(getVisible() == false) - return true; - - bool need_save = false; - std::string mesg; - for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) - if(need_save|=(*it)->needsApply(mesg)) - break; - if(!need_save) - return false; - // If no message was provided, give a generic one. - if (mesg.empty()) - { - mesg = mDefaultNeedsApplyMesg; - } - // Create a notify box, telling the user about the unapplied tab. - LLSD args; - args["NEEDS_APPLY_MESSAGE"] = mesg; - args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; - - LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); - - mShowingNotifyDialog = true; - - return false; -} - -bool LLPanelGroup::notifyChildren(const LLSD& info) -{ - if(info.has("request") && mID.isNull() ) - { - std::string str_action = info["request"]; - - if (str_action == "quit" ) - { - canClose(); - return true; - } - if(str_action == "wait_quit") - return mShowingNotifyDialog; - } - return false; -} -bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mShowingNotifyDialog = false; - switch (option) - { - case 0: // "Apply Changes" - apply(); - break; - case 1: // "Ignore Changes" - break; - case 2: // "Cancel" - default: - // Do nothing. The user is canceling the action. - // If we were quitting, we didn't really mean it. - LLAppViewer::instance()->abortQuit(); - break; - } - return false; -} diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 136868a60d..13a03b0713 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -37,7 +37,7 @@ #include "lltimer.h" #include "llvoiceclient.h" -struct LLOfferInfo; +class LLOfferInfo; const S32 UPDATE_MEMBERS_PER_FRAME = 500; @@ -95,9 +95,6 @@ public: LLOfferInfo* inventory_offer); - bool notifyChildren (const LLSD& info); - bool handleNotifyCallback(const LLSD&, const LLSD&); - protected: virtual void update(LLGroupChange gc); @@ -117,9 +114,6 @@ protected: protected: bool apply(LLPanelGroupTab* tab); - bool canClose(); - - bool mShowingNotifyDialog; LLTimer mRefreshTimer; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 0a83ba8212..ddd41a1791 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -846,6 +846,17 @@ void LLPanelGroupGeneral::reset() mInsignia->setEnabled(true); + LLPointer<LLUIImage> imagep = LLUI::getUIImage(mInsignia->getDefaultImageName()); + if(imagep) + { + LLViewerFetchedTexture* pTexture = dynamic_cast<LLViewerFetchedTexture*>(imagep->getImage().get()); + if(pTexture) + { + LLUUID id = pTexture->getID(); + mInsignia->setImageAssetID(id); + } + } + { std::string empty_str = ""; mEditCharter->setText(empty_str); diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 9ac3a07041..65fe7165c2 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -236,6 +236,7 @@ public: std::string mCantViewParcelsText; std::string mCantViewAccountsText; + std::string mEmptyParcelsText; }; //******************************************* @@ -452,6 +453,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) // This power was removed to make group roles simpler //if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return; if (!gAgent.isInGroup(mPanel.mGroupID)) return; + mGroupParcelsp->setCommentText(mEmptyParcelsText); std::string name; std::string desc; @@ -696,6 +698,7 @@ BOOL LLPanelGroupLandMoney::postBuild() mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text"); mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text"); + mImplementationp->mEmptyParcelsText = getString("epmty_view_group_land_text"); if ( mImplementationp->mMapButtonp ) { diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 8da19d1574..362d8581f3 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -335,9 +335,10 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item) item_is_multi = TRUE; }; - std::string icon_name = get_item_icon_name(inv_item->getType(), + std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), + inv_item->getIsLinkType(), item_is_multi ); mCreateInventoryIcon->setValue(icon_name); @@ -517,6 +518,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->setEnabled(TRUE); + //save sort state and set unsorted state to prevent unnecessary + //sorting while adding notices + bool save_sort = mNoticesList->isSorted(); + mNoticesList->setNeedsSort(false); + for (;i<count;++i) { msg->getUUID("Data","NoticeID",id,i); @@ -527,6 +533,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->setEnabled(FALSE); return; } + + //with some network delays we can receive notice list more then once... + //so add only unique notices + S32 pos = mNoticesList->getItemIndex(id); + + if(pos!=-1)//if items with this ID already in the list - skip it + continue; msg->getString("Data","Subject",subj,i); msg->getString("Data","FromName",name,i); @@ -540,9 +553,9 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) row["columns"][0]["column"] = "icon"; if (has_attachment) { - std::string icon_name = get_item_icon_name( + std::string icon_name = LLInventoryIcon::getIconName( (LLAssetType::EType)asset_type, - LLInventoryType::IT_NONE,FALSE, FALSE); + LLInventoryType::IT_NONE); row["columns"][0]["type"] = "icon"; row["columns"][0]["value"] = icon_name; } @@ -562,6 +575,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->addElement(row, ADD_BOTTOM); } + mNoticesList->setNeedsSort(save_sort); mNoticesList->updateSort(); } @@ -607,9 +621,8 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, { mInventoryOffer = inventory_offer; - std::string icon_name = get_item_icon_name(mInventoryOffer->mType, - LLInventoryType::IT_TEXTURE, - 0, FALSE); + std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); mViewInventoryIcon->setValue(icon_name); mViewInventoryIcon->setVisible(TRUE); @@ -656,6 +669,9 @@ void LLPanelGroupNotices::setGroupID(const LLUUID& id) if(mViewMessage) mViewMessage->clear(); + + if(mViewInventoryName) + mViewInventoryName->clear(); activate(); } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 0c24e6ad22..a77ba0c69c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -145,8 +145,6 @@ BOOL LLPanelGroupRoles::postBuild() llwarns << "Invalid subtab panel: " << panel->getName() << llendl; return FALSE; } - // Add click callbacks to all the tabs. - mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); // Hand the subtab a pointer to this LLPanelGroupRoles, so that it can // look around for the widgets it is interested in. @@ -155,6 +153,8 @@ BOOL LLPanelGroupRoles::postBuild() //subtabp->addObserver(this); } + // Add click callbacks to all the tabs. + mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this)); // Set the current tab to whatever is currently being shown. mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index c34f0633b9..709bb83fe4 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -81,7 +81,8 @@ void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::E void LLPanelChatControlPanel::updateCallButton() { - bool voice_enabled = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + // hide/show call button + bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); @@ -124,7 +125,7 @@ BOOL LLPanelChatControlPanel::postBuild() childSetAction("end_call_btn", boost::bind(&LLPanelChatControlPanel::onEndCallButtonClicked, this)); childSetAction("voice_ctrls_btn", boost::bind(&LLPanelChatControlPanel::onOpenVoiceControlsClicked, this)); - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); return TRUE; } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 67d40a39b1..4bf4f9eac1 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -309,6 +309,25 @@ void LLLandmarksPanel::onTeleport() } // virtual +bool LLLandmarksPanel::isSingleItemSelected() +{ + bool result = false; + + if (mCurrentSelectedList != NULL) + { + LLPlacesFolderView* root_view = + static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()); + + if (root_view->getSelectedCount() == 1) + { + result = isLandmarkSelected(); + } + } + + return result; +} + +// virtual void LLLandmarksPanel::updateVerbs() { if (!isTabVisible()) @@ -316,8 +335,8 @@ void LLLandmarksPanel::updateVerbs() bool landmark_selected = isLandmarkSelected(); mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); - mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); + mShowOnMapBtn->setEnabled(true); // TODO: mantipov: Uncomment when mShareBtn is supported // Share button should be enabled when neither a folder nor a landmark is selected @@ -583,6 +602,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list if (!inventory_list->getFilter()) return; + inventory_list->getFilter()->setEmptyLookupMessage("PlacesNoMatchingItems"); inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK); inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2)); @@ -973,10 +993,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if("create_pick" == command_name) { - std::set<LLUUID> selection; - if ( mCurrentSelectedList && mCurrentSelectedList->getRootFolder()->getSelectionList(selection) ) + if (mCurrentSelectedList) { - return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + std::set<LLUUID> selection = mCurrentSelectedList->getRootFolder()->getSelectionList(); + if (!selection.empty()) + { + return ( 1 == selection.size() && !LLAgentPicksInfo::getInstance()->isPickLimitReached() ); + } } return false; } diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 2d1eb0f091..8f8d9c2708 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -60,6 +60,7 @@ public: /*virtual*/ void onShowProfile(); /*virtual*/ void onTeleport(); /*virtual*/ void updateVerbs(); + /*virtual*/ bool isSingleItemSelected(); void onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action); void onSelectorButtonClicked(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ee4dcc44fe..508a58e74f 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -51,11 +51,12 @@ #include "llfocusmgr.h" #include "lllineeditor.h" #include "llnotificationsutil.h" +#include "llsecapi.h" #include "llstartup.h" #include "lltextbox.h" #include "llui.h" #include "lluiconstants.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llversioninfo.h" #include "llviewerhelp.h" #include "llviewertexturelist.h" @@ -77,6 +78,7 @@ #pragma warning(disable: 4355) // 'this' used in initializer list #endif // LL_WINDOWS +#include "llsdserialize.h" #define USE_VIEWER_AUTH 0 const S32 BLACK_BORDER_HEIGHT = 160; @@ -104,7 +106,6 @@ public: LLLoginRefreshHandler gLoginRefreshHandler; - // helper class that trys to download a URL from a web site and calls a method // on parent class indicating if the web server is working or not class LLIamHereLogin : public LLHTTPClient::Responder @@ -153,10 +154,6 @@ namespace { boost::intrusive_ptr< LLIamHereLogin > gResponsePtr = 0; }; -void set_start_location(LLUICtrl* ctrl, void* data) -{ - LLURLSimString::setString(ctrl->getValue().asString()); -} //--------------------------------------------------------------------------- // Public methods @@ -187,6 +184,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, delete LLPanelLogin::sInstance; } + mPasswordModified = FALSE; LLPanelLogin::sInstance = this; // add to front so we are the bottom-most child @@ -213,10 +211,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } #if !USE_VIEWER_AUTH - childSetPrevalidate("first_name_edit", LLTextValidate::validateASCIIPrintableNoSpace); - childSetPrevalidate("last_name_edit", LLTextValidate::validateASCIIPrintableNoSpace); - - childSetCommitCallback("password_edit", mungePassword, this); + childSetPrevalidate("username_edit", LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this); // change z sort of clickable text to be behind buttons @@ -226,29 +221,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLLineEditor* edit = getChild<LLLineEditor>("password_edit"); if (edit) edit->setDrawAsterixes(TRUE); - LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); - - std::string sim_string = LLURLSimString::sInstance.mSimString; - if(sim_string.empty()) - { - LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); - sim_string = LLURLSimString::sInstance.mSimString; - } - - if (!sim_string.empty()) + if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) { - // Replace "<Type region name>" with this region name - combo->remove(2); - combo->add( sim_string ); - combo->setTextEntry(sim_string); - combo->setCurrentByIndex( 2 ); + LLSLURL slurl(gSavedSettings.getString("LoginLocation")); + LLStartUp::setStartSLURL(slurl); } - - combo->setCommitCallback( &set_start_location, NULL ); + updateLocationCombo(false); LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer, NULL); server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1)); + updateServerCombo(); childSetAction("connect_btn", onClickConnect, this); @@ -304,17 +287,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); - std::string login_page = gSavedSettings.getString("LoginPage"); - if (login_page.empty()) - { - login_page = getString( "real_url" ); - } - LLHTTPClient::head( login_page, gResponsePtr ); -#if !USE_VIEWER_AUTH - // Initialize visibility (and don't force visibility - use prefs) - refreshLocation( false ); -#endif + LLHTTPClient::head( LLGridManager::getInstance()->getLoginPage(), gResponsePtr ); + + updateLocationCombo(false); } @@ -378,21 +354,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) } } -void LLPanelLogin::mungePassword(LLUICtrl* caller, void* user_data) -{ - LLPanelLogin* self = (LLPanelLogin*)user_data; - LLLineEditor* editor = (LLLineEditor*)caller; - std::string password = editor->getText(); - - // Re-md5 if we've changed at all - if (password != self->mIncomingPassword) - { - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - self->mMungedPassword = munged_password; - } -} LLPanelLogin::~LLPanelLogin() { @@ -455,12 +416,6 @@ void LLPanelLogin::draw() // virtual BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) { - if (( KEY_RETURN == key ) && (MASK_ALT == mask)) - { - gViewerWindow->toggleFullscreen(FALSE); - return TRUE; - } - if ( KEY_F1 == key ) { LLViewerHelp* vhelp = LLViewerHelp::getInstance(); @@ -499,14 +454,14 @@ void LLPanelLogin::giveFocus() if( sInstance ) { // Grab focus and move cursor to first blank input field - std::string first = sInstance->childGetText("first_name_edit"); + std::string username = sInstance->childGetText("username_edit"); std::string pass = sInstance->childGetText("password_edit"); - BOOL have_first = !first.empty(); + BOOL have_username = !username.empty(); BOOL have_pass = !pass.empty(); LLLineEditor* edit = NULL; - if (have_first && !have_pass) + if (have_username && !have_pass) { // User saved his name but not his password. Move // focus to password field. @@ -515,7 +470,7 @@ void LLPanelLogin::giveFocus() else { // User doesn't have a name, so start there. - edit = sInstance->getChild<LLLineEditor>("first_name_edit"); + edit = sInstance->getChild<LLLineEditor>("username_edit"); } if (edit) @@ -537,8 +492,8 @@ void LLPanelLogin::showLoginWidgets() // *TODO: Append all the usual login parameters, like first_login=Y etc. std::string splash_screen_url = sInstance->getString("real_url"); web_browser->navigateTo( splash_screen_url, "text/html" ); - LLUICtrl* first_name_edit = sInstance->getChild<LLUICtrl>("first_name_edit"); - first_name_edit->setFocus(TRUE); + LLUICtrl* username_edit = sInstance->getChild<LLUICtrl>("username_edit"); + username_edit->setFocus(TRUE); } // static @@ -560,77 +515,127 @@ void LLPanelLogin::show(const LLRect &rect, } // static -void LLPanelLogin::setFields(const std::string& firstname, - const std::string& lastname, - const std::string& password) +void LLPanelLogin::setFields(LLPointer<LLCredential> credential, + BOOL remember) { if (!sInstance) { llwarns << "Attempted fillFields with no login view shown" << llendl; return; } + LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL; - sInstance->childSetText("first_name_edit", firstname); - sInstance->childSetText("last_name_edit", lastname); - - // Max "actual" password length is 16 characters. - // Hex digests are always 32 characters. - if (password.length() == 32) + LLSD identifier = credential->getIdentifier(); + if((std::string)identifier["type"] == "agent") + { + sInstance->childSetText("username_edit", (std::string)identifier["first_name"] + " " + + (std::string)identifier["last_name"]); + } + else if((std::string)identifier["type"] == "account") + { + sInstance->childSetText("username_edit", (std::string)identifier["account_name"]); + } + else { + sInstance->childSetText("username_edit", std::string()); + } + // if the password exists in the credential, set the password field with + // a filler to get some stars + LLSD authenticator = credential->getAuthenticator(); + LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL; + if(authenticator.isMap() && + authenticator.has("secret") && + (authenticator["secret"].asString().size() > 0)) + { + // This is a MD5 hex digest of a password. // We don't actually use the password input field, // fill it with MAX_PASSWORD characters so we get a // nice row of asterixes. const std::string filler("123456789!123456"); - sInstance->childSetText("password_edit", filler); - sInstance->mIncomingPassword = filler; - sInstance->mMungedPassword = password; + sInstance->childSetText("password_edit", std::string("123456789!123456")); } else { - // this is a normal text password - sInstance->childSetText("password_edit", password); - sInstance->mIncomingPassword = password; - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - sInstance->mMungedPassword = munged_password; + sInstance->childSetText("password_edit", std::string()); } + sInstance->childSetValue("remember_check", remember); } // static -void LLPanelLogin::addServer(const std::string& server, S32 domain_name) +void LLPanelLogin::getFields(LLPointer<LLCredential>& credential, + BOOL& remember) { if (!sInstance) { - llwarns << "Attempted addServer with no login view shown" << llendl; + llwarns << "Attempted getFields with no login view shown" << llendl; return; } + + // load the credential so we can pass back the stored password or hash if the user did + // not modify the password field. + + credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); - combo->add(server, LLSD(domain_name) ); - combo->setCurrentByIndex(0); -} - -// static -void LLPanelLogin::getFields(std::string *firstname, - std::string *lastname, - std::string *password) -{ - if (!sInstance) + LLSD identifier = LLSD::emptyMap(); + LLSD authenticator = LLSD::emptyMap(); + + if(credential.notNull()) { - llwarns << "Attempted getFields with no login view shown" << llendl; - return; + authenticator = credential->getAuthenticator(); } - *firstname = sInstance->childGetText("first_name_edit"); - LLStringUtil::trim(*firstname); - - *lastname = sInstance->childGetText("last_name_edit"); - LLStringUtil::trim(*lastname); + std::string username = sInstance->childGetText("username_edit"); + LLStringUtil::trim(username); + std::string password = sInstance->childGetText("password_edit"); - *password = sInstance->mMungedPassword; + LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL; + // determine if the username is a first/last form or not. + size_t separator_index = username.find_first_of(' '); + if (separator_index == username.npos) + { + LL_INFOS2("Credentials", "Authentication") << "account: " << username << LL_ENDL; + // single username, so this is a 'clear' identifier + identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT; + identifier["account_name"] = username; + + if (LLPanelLogin::sInstance->mPasswordModified) + { + authenticator = LLSD::emptyMap(); + // password is plaintext + authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR; + authenticator["secret"] = password; + } + } + else + { + std::string first = username.substr(0, separator_index); + std::string last = username.substr(separator_index, username.npos); + LLStringUtil::trim(last); + + if (last.find_first_of(' ') == last.npos) + { + LL_INFOS2("Credentials", "Authentication") << "agent: " << username << LL_ENDL; + // traditional firstname / lastname + identifier["type"] = CRED_IDENTIFIER_TYPE_AGENT; + identifier["first_name"] = first; + identifier["last_name"] = last; + + if (LLPanelLogin::sInstance->mPasswordModified) + { + authenticator = LLSD::emptyMap(); + authenticator["type"] = CRED_AUTHENTICATOR_TYPE_HASH; + authenticator["algorithm"] = "md5"; + LLMD5 pass((const U8 *)password.c_str()); + char md5pass[33]; /* Flawfinder: ignore */ + pass.hex_digest(md5pass); + authenticator["secret"] = md5pass; + } + } + } + credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); + remember = sInstance->childGetValue("remember_check"); } // static @@ -650,64 +655,112 @@ BOOL LLPanelLogin::isGridComboDirty() } // static -void LLPanelLogin::getLocation(std::string &location) +BOOL LLPanelLogin::areCredentialFieldsDirty() { if (!sInstance) { - llwarns << "Attempted getLocation with no login view shown" << llendl; - return; + llwarns << "Attempted getServer with no login view shown" << llendl; } - - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - location = combo->getValue().asString(); + else + { + std::string username = sInstance->childGetText("username_edit"); + LLStringUtil::trim(username); + std::string password = sInstance->childGetText("password_edit"); + LLLineEditor* ctrl = sInstance->getChild<LLLineEditor>("username_edit"); + if(ctrl && ctrl->isDirty()) + { + return true; + } + ctrl = sInstance->getChild<LLLineEditor>("password_edit"); + if(ctrl && ctrl->isDirty()) + { + return true; + } + } + return false; } + // static -void LLPanelLogin::refreshLocation( bool force_visible ) +void LLPanelLogin::updateLocationCombo( bool force_visible ) { - if (!sInstance) return; - -#if USE_VIEWER_AUTH - loadLoginPage(); -#else + if (!sInstance) + { + return; + } + + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + + switch(LLStartUp::getStartSLURL().getType()) + { + case LLSLURL::LOCATION: + { + + combo->setCurrentByIndex( 2 ); + combo->setTextEntry(LLStartUp::getStartSLURL().getLocationString()); + break; + } + case LLSLURL::HOME_LOCATION: + combo->setCurrentByIndex(1); + break; + default: + combo->setCurrentByIndex(0); + break; + } + BOOL show_start = TRUE; - + if ( ! force_visible ) - { - // Don't show on first run after install - // Otherwise ShowStartLocation defaults to true. show_start = gSavedSettings.getBOOL("ShowStartLocation"); - } - - // Update the value of the location combo. - updateLocationUI(); sInstance->childSetVisible("start_location_combo", show_start); sInstance->childSetVisible("start_location_text", show_start); - + BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); + sInstance->childSetVisible("server_combo_text", show_server); sInstance->childSetVisible("server_combo", show_server); - -#endif } // static -void LLPanelLogin::updateLocationUI() +void LLPanelLogin::updateStartSLURL() { if (!sInstance) return; - std::string sim_string = LLURLSimString::sInstance.mSimString; - if (!sim_string.empty()) + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + S32 index = combo->getCurrentIndex(); + + switch (index) { - // Replace "<Type region name>" with this region name - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - combo->remove(2); - combo->add( sim_string ); - combo->setTextEntry(sim_string); - combo->setCurrentByIndex( 2 ); + case 0: + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); + break; + } + case 1: + { + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + break; + } + default: + { + LLSLURL slurl = LLSLURL(combo->getValue().asString()); + if(slurl.getType() == LLSLURL::LOCATION) + { + // we've changed the grid, so update the grid selection + LLStartUp::setStartSLURL(slurl); + } + break; + } } } + +void LLPanelLogin::setLocation(const LLSLURL& slurl) +{ + LLStartUp::setStartSLURL(slurl); + updateServer(); +} + // static void LLPanelLogin::closePanel() { @@ -741,15 +794,13 @@ void LLPanelLogin::loadLoginPage() std::ostringstream oStr; - std::string login_page = gSavedSettings.getString("LoginPage"); - if (login_page.empty()) - { - login_page = sInstance->getString( "real_url" ); - } + std::string login_page = LLGridManager::getInstance()->getLoginPage(); + oStr << login_page; // Use the right delimeter depending on how LLURI parses the URL LLURI login_page_uri = LLURI(login_page); + std::string first_query_delimiter = "&"; if (login_page_uri.queryMap().size() == 0) { @@ -781,11 +832,10 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_version); // Grid - char* curl_grid = curl_escape(LLViewerLogin::getInstance()->getGridLabel().c_str(), 0); + char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridLoginID().c_str(), 0); oStr << "&grid=" << curl_grid; curl_free(curl_grid); - - gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid()); + gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); @@ -810,30 +860,20 @@ void LLPanelLogin::loadLoginPage() location = gSavedSettings.getString("LoginLocation"); } - std::string firstname, lastname; + std::string username; if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) { LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); - firstname = cmd_line_login[0].asString(); - lastname = cmd_line_login[1].asString(); + username = cmd_line_login[0].asString() + " " + cmd_line_login[1]; password = cmd_line_login[2].asString(); } - if (firstname.empty()) - { - firstname = gSavedSettings.getString("FirstName"); - } - - if (lastname.empty()) - { - lastname = gSavedSettings.getString("LastName"); - } char* curl_region = curl_escape(region.c_str(), 0); - oStr <<"firstname=" << firstname << - "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region; + oStr <<"username=" << username << + "&location=" << location << "®ion=" << curl_region; curl_free(curl_region); @@ -866,7 +906,7 @@ void LLPanelLogin::loadLoginPage() #endif LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - + // navigate to the "real" page if (gSavedSettings.getBOOL("RegInClient")) { @@ -915,39 +955,66 @@ void LLPanelLogin::onClickConnect(void *) // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); - std::string first = sInstance->childGetText("first_name_edit"); - std::string last = sInstance->childGetText("last_name_edit"); - LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); - std::string combo_text = combo->getSimple(); - - bool has_first_and_last = !(first.empty() || last.empty()); - bool has_location = false; - - if(combo_text=="<Type region name>" || combo_text =="") + LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); + LLSD combo_val = combo->getSelectedValue(); + if (combo_val.isUndefined()) { - // *NOTE: Mani - Location field is not always committed by this point! - // This may be duplicate work, but better than not doing the work! - LLURLSimString::sInstance.setString(""); + combo_val = combo->getValue(); } - else + if(combo_val.isUndefined()) { - // *NOTE: Mani - Location field is not always committed by this point! - LLURLSimString::sInstance.setString(combo_text); - has_location = true; + LLNotificationsUtil::add("StartRegionEmpty"); + return; + } + try + { + LLGridManager::getInstance()->setGridChoice(combo_val.asString()); } - - if(!has_first_and_last) + catch (LLInvalidGridName ex) { - LLNotificationsUtil::add("MustHaveAccountToLogIn"); + LLSD args; + args["GRID"] = combo_val.asString(); + LLNotificationsUtil::add("InvalidGrid", args); + return; } - else if(!has_location) + updateStartSLURL(); + std::string username = sInstance->childGetText("username_edit"); + + + if(username.empty()) { - LLNotificationsUtil::add("StartRegionEmpty"); + // user must type in something into the username field + LLNotificationsUtil::add("MustHaveAccountToLogIn"); } else { - // has both first and last name typed - sInstance->mCallback(0, sInstance->mCallbackData); + LLPointer<LLCredential> cred; + BOOL remember; + getFields(cred, remember); + std::string identifier_type; + cred->identifierType(identifier_type); + LLSD allowed_credential_types; + LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types); + + // check the typed in credential type against the credential types expected by the server. + for(LLSD::array_iterator i = allowed_credential_types.beginArray(); + i != allowed_credential_types.endArray(); + i++) + { + + if(i->asString() == identifier_type) + { + // yay correct credential type + sInstance->mCallback(0, sInstance->mCallbackData); + return; + } + } + + // Right now, maingrid is the only thing that is picky about + // credential format, as it doesn't yet allow account (single username) + // format creds. - Rox. James, we wanna fix the message when we change + // this. + LLNotificationsUtil::add("InvalidCredentialFormat"); } } } @@ -1005,61 +1072,97 @@ void LLPanelLogin::onClickHelp(void*) // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { + LLPanelLogin *This = (LLPanelLogin *) user_data; + This->mPasswordModified = TRUE; if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) { - LLNotificationsUtil::add("CapsKeyOn"); +// *TODO: use another way to notify user about enabled caps lock, see EXT-6858 sCapslockDidNotification = TRUE; } } -// static -void LLPanelLogin::onSelectServer(LLUICtrl*, void*) -{ - // *NOTE: The paramters for this method are ignored. - // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) - // calls this method. - - // The user twiddled with the grid choice ui. - // apply the selection to the grid setting. - std::string grid_label; - S32 grid_index; - - LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); - LLSD combo_val = combo->getValue(); - if (LLSD::TypeInteger == combo_val.type()) +void LLPanelLogin::updateServer() +{ + try { - grid_index = combo->getValue().asInteger(); - if ((S32)GRID_INFO_OTHER == grid_index) + updateServerCombo(); + // if they've selected another grid, we should load the credentials + // for that grid and set them to the UI. + if(sInstance && !sInstance->areCredentialFieldsDirty()) { - // This happens if the user specifies a custom grid - // via command line. - grid_label = combo->getSimple(); + LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); + bool remember = sInstance->childGetValue("remember_check"); + sInstance->setFields(credential, remember); } + // grid changed so show new splash screen (possibly) + loadLoginPage(); + updateLocationCombo(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION); } - else + catch (LLInvalidGridName ex) { - // no valid selection, return other - grid_index = (S32)GRID_INFO_OTHER; - grid_label = combo_val.asString(); + // do nothing } +} - // This new seelction will override preset uris - // from the command line. - LLViewerLogin* vl = LLViewerLogin::getInstance(); - vl->resetURIs(); - if(grid_index != GRID_INFO_OTHER) +void LLPanelLogin::updateServerCombo() +{ + if (!sInstance) { - vl->setGridChoice((EGridInfo)grid_index); + return; } - else + // We add all of the possible values, sorted, and then add a bar and the current value at the top + LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); + server_choice_combo->removeall(); + + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(!gSavedSettings.getBOOL("ShowBetaGrids")); + + for (std::map<std::string, std::string>::iterator grid_choice = known_grids.begin(); + grid_choice != known_grids.end(); + grid_choice++) { - vl->setGridChoice(grid_label); + if (!grid_choice->first.empty()) + { + server_choice_combo->add(grid_choice->second, grid_choice->first, ADD_SORTED); + } } + + server_choice_combo->addSeparator(ADD_TOP); + + server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), + LLGridManager::getInstance()->getGrid(), ADD_TOP); + + server_choice_combo->selectFirstItem(); +} - // grid changed so show new splash screen (possibly) - loadLoginPage(); +// static +void LLPanelLogin::onSelectServer(LLUICtrl*, void*) +{ + // *NOTE: The paramters for this method are ignored. + // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) + // calls this method. + LL_INFOS("AppInit") << "onSelectServer" << LL_ENDL; + // The user twiddled with the grid choice ui. + // apply the selection to the grid setting. + LLPointer<LLCredential> credential; + + LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); + LLSD combo_val = combo->getSelectedValue(); + if (combo_val.isUndefined()) + { + combo_val = combo->getValue(); + } + + combo = sInstance->getChild<LLComboBox>("start_location_combo"); + combo->setCurrentByIndex(1); + LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation"))); + LLGridManager::getInstance()->setGridChoice(combo_val.asString()); + // This new selection will override preset uris + // from the command line. + updateServer(); + updateLocationCombo(false); + updateLoginPanelLinks(); } void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) @@ -1072,3 +1175,14 @@ void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe) onSelectServer(combo, NULL); } } + +void LLPanelLogin::updateLoginPanelLinks() +{ + LLSD grid_data = LLGridManager::getInstance()->getGridInfo(); + bool system_grid = grid_data.has(GRID_IS_SYSTEM_GRID_VALUE); + + // need to call through sInstance, as it's called from onSelectServer, which + // is static. + sInstance->childSetVisible("create_new_account_text", system_grid); + sInstance->childSetVisible("forgot_password_text", system_grid); +} diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 1fdc3a9361..aa6884ea97 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -41,6 +41,8 @@ class LLLineEditor; class LLUIImage; class LLPanelLoginListener; +class LLSLURL; +class LLCredential; class LLPanelLogin: public LLPanel, @@ -65,20 +67,15 @@ public: void (*callback)(S32 option, void* user_data), void* callback_data); - // Remember password checkbox is set via gSavedSettings "RememberPassword" - static void setFields(const std::string& firstname, const std::string& lastname, - const std::string& password); + static void setFields(LLPointer<LLCredential> credential, BOOL remember); - static void addServer(const std::string& server, S32 domain_name); - static void refreshLocation( bool force_visible ); - static void updateLocationUI(); - - static void getFields(std::string *firstname, std::string *lastname, - std::string *password); + static void getFields(LLPointer<LLCredential>& credential, BOOL& remember); static BOOL isGridComboDirty(); - static void getLocation(std::string &location); - + static BOOL areCredentialFieldsDirty(); + static void setLocation(const LLSLURL& slurl); + + static void updateLocationCombo(bool force_visible); // simply update the combo box static void closePanel(); void setSiteIsAlive( bool alive ); @@ -86,10 +83,10 @@ public: static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); - static void mungePassword(LLUICtrl* caller, void* user_data); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); + static void updateServer(); // update the combo box, change the login page to the new server, clear the combo private: friend class LLPanelLoginListener; @@ -103,6 +100,10 @@ private: static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onServerComboLostFocus(LLFocusableElement*); + static void updateServerCombo(); + static void updateStartSLURL(); + + static void updateLoginPanelLinks(); private: LLPointer<LLUIImage> mLogoImage; @@ -111,8 +112,7 @@ private: void (*mCallback)(S32 option, void *userdata); void* mCallbackData; - std::string mIncomingPassword; - std::string mMungedPassword; + BOOL mPasswordModified; static LLPanelLogin* sInstance; static BOOL sCapslockDidNotification; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 0ba373c51b..327196d9ba 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -167,7 +167,7 @@ BOOL LLPanelMainInventory::postBuild() // Now load the stored settings from disk, if available. std::ostringstream filterSaveName; filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME); - llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName << llendl; + llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << llendl; llifstream file(filterSaveName.str()); LLSD savedFilterState; if (file.is_open()) @@ -492,6 +492,10 @@ void LLPanelMainInventory::onFilterSelected() { return; } + + BOOL recent_active = ("Recent Items" == mActivePanel->getName()); + childSetVisible("add_btn_panel", !recent_active); + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); @@ -1095,8 +1099,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (root) { can_delete = TRUE; - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 35acf8edcc..3f620869e0 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -63,7 +63,6 @@ BOOL LLPanelMe::postBuild() LLPanelProfile::postBuild(); getTabContainer()[PANEL_PROFILE]->childSetAction("edit_profile_btn", boost::bind(&LLPanelMe::onEditProfileClicked, this), this); - getTabContainer()[PANEL_PROFILE]->childSetAction("edit_appearance_btn", boost::bind(&LLPanelMe::onEditAppearanceClicked, this), this); return TRUE; } @@ -141,14 +140,6 @@ void LLPanelMe::onEditProfileClicked() togglePanel(mEditPanel, getAvatarId()); // open } -void LLPanelMe::onEditAppearanceClicked() -{ - if (gAgentWearables.areWearablesLoaded()) - { - gAgentCamera.changeCameraToCustomizeAvatar(); - } -} - void LLPanelMe::onSaveChangesClicked() { LLAvatarData data = LLAvatarData(); diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h index 1325192bbf..f2b38de3d6 100644 --- a/indra/newview/llpanelme.h +++ b/indra/newview/llpanelme.h @@ -63,7 +63,6 @@ private: void buildEditPanel(); void onEditProfileClicked(); - void onEditAppearanceClicked(); void onSaveChangesClicked(); void onCancelClicked(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 3a82cf6f8b..de16f9d343 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -83,16 +83,17 @@ protected: mutable std::string mDisplayName; LLPanelObjectInventory* mPanel; U32 mFlags; + LLAssetType::EType mAssetType; + LLInventoryType::EType mInventoryType; LLInventoryItem* findItem() const; public: - LLTaskInvFVBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags=0); - virtual ~LLTaskInvFVBridge( void ) {} + LLTaskInvFVBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags=0); + virtual ~LLTaskInvFVBridge() {} virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } @@ -149,9 +150,16 @@ LLTaskInvFVBridge::LLTaskInvFVBridge( mUUID(uuid), mName(name), mPanel(panel), - mFlags(flags) + mFlags(flags), + mAssetType(LLAssetType::AT_NONE), + mInventoryType(LLInventoryType::IT_NONE) { - + const LLInventoryItem *item = findItem(); + if (item) + { + mAssetType = item->getType(); + mInventoryType = item->getInventoryType(); + } } LLInventoryItem* LLTaskInvFVBridge::findItem() const @@ -345,13 +353,9 @@ time_t LLTaskInvFVBridge::getCreationDate() const LLUIImagePtr LLTaskInvFVBridge::getIcon() const { - BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) - { - item_is_multi = TRUE; - } + const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, 0, item_is_multi ); } void LLTaskInvFVBridge::openItem() @@ -371,8 +375,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - LLInventoryItem* item; - item = (LLInventoryItem*)(object->getInventoryObject(mUUID)); + LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID)); if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE, GOD_LIKE)) { @@ -867,33 +870,14 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, class LLTaskTextureBridge : public LLTaskInvFVBridge { public: - LLTaskTextureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLInventoryType::EType it); + LLTaskTextureBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); -protected: - LLInventoryType::EType mInventoryType; }; -LLTaskTextureBridge::LLTaskTextureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLInventoryType::EType it) : - LLTaskInvFVBridge(panel, uuid, name), - mInventoryType(it) -{ -} - -LLUIImagePtr LLTaskTextureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_TEXTURE, mInventoryType, 0, FALSE); -} - void LLTaskTextureBridge::openItem() { llinfos << "LLTaskTextureBridge::openItem()" << llendl; @@ -912,31 +896,17 @@ void LLTaskTextureBridge::openItem() class LLTaskSoundBridge : public LLTaskInvFVBridge { public: - LLTaskSoundBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskSoundBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void* data); }; -LLTaskSoundBridge::LLTaskSoundBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskSoundBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE); -} - void LLTaskSoundBridge::openItem() { openSoundPreview((void*)this); @@ -1038,28 +1008,12 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) class LLTaskLandmarkBridge : public LLTaskInvFVBridge { public: - LLTaskLandmarkBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); - - virtual LLUIImagePtr getIcon() const; + LLTaskLandmarkBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} }; -LLTaskLandmarkBridge::LLTaskLandmarkBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskLandmarkBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE); -} - - ///---------------------------------------------------------------------------- /// Class LLTaskCallingCardBridge ///---------------------------------------------------------------------------- @@ -1067,29 +1021,15 @@ LLUIImagePtr LLTaskLandmarkBridge::getIcon() const class LLTaskCallingCardBridge : public LLTaskInvFVBridge { public: - LLTaskCallingCardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskCallingCardBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual BOOL isItemRenameable() const; virtual BOOL renameItem(const std::string& new_name); }; -LLTaskCallingCardBridge::LLTaskCallingCardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskCallingCardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, 0, FALSE); -} - BOOL LLTaskCallingCardBridge::isItemRenameable() const { return FALSE; @@ -1108,36 +1048,21 @@ BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name) class LLTaskScriptBridge : public LLTaskInvFVBridge { public: - LLTaskScriptBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskScriptBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; //static BOOL enableIfCopyable( void* userdata ); }; -LLTaskScriptBridge::LLTaskScriptBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskScriptBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE); -} - - class LLTaskLSLBridge : public LLTaskScriptBridge { public: - LLTaskLSLBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskLSLBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskScriptBridge(panel, uuid, name) {} virtual void openItem(); virtual BOOL removeItem(); @@ -1146,14 +1071,6 @@ public: //static void copyToInventory(void* userdata); }; -LLTaskLSLBridge::LLTaskLSLBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskScriptBridge(panel, uuid, name) -{ -} - void LLTaskLSLBridge::openItem() { llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl; @@ -1189,35 +1106,13 @@ BOOL LLTaskLSLBridge::removeItem() class LLTaskObjectBridge : public LLTaskInvFVBridge { public: - LLTaskObjectBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags = 0); - - virtual LLUIImagePtr getIcon() const; + LLTaskObjectBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags = 0) : + LLTaskInvFVBridge(panel, uuid, name, flags) {} }; -LLTaskObjectBridge::LLTaskObjectBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - U32 flags) : - LLTaskInvFVBridge(panel, uuid, name, flags) -{ -} - -LLUIImagePtr LLTaskObjectBridge::getIcon() const -{ - BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) - { - item_is_multi = TRUE; - } - - return get_item_icon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi); -} - ///---------------------------------------------------------------------------- /// Class LLTaskNotecardBridge ///---------------------------------------------------------------------------- @@ -1225,29 +1120,15 @@ LLUIImagePtr LLTaskObjectBridge::getIcon() const class LLTaskNotecardBridge : public LLTaskInvFVBridge { public: - LLTaskNotecardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskNotecardBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskNotecardBridge::LLTaskNotecardBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskNotecardBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE); -} - void LLTaskNotecardBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1278,29 +1159,15 @@ BOOL LLTaskNotecardBridge::removeItem() class LLTaskGestureBridge : public LLTaskInvFVBridge { public: - LLTaskGestureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskGestureBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskGestureBridge::LLTaskGestureBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskGestureBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE); -} - void LLTaskGestureBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1325,29 +1192,15 @@ BOOL LLTaskGestureBridge::removeItem() class LLTaskAnimationBridge : public LLTaskInvFVBridge { public: - LLTaskAnimationBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); + LLTaskAnimationBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name) : + LLTaskInvFVBridge(panel, uuid, name) {} - virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual BOOL removeItem(); }; -LLTaskAnimationBridge::LLTaskAnimationBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskAnimationBridge::getIcon() const -{ - return get_item_icon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE); -} - void LLTaskAnimationBridge::openItem() { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -1376,33 +1229,18 @@ BOOL LLTaskAnimationBridge::removeItem() class LLTaskWearableBridge : public LLTaskInvFVBridge { public: - LLTaskWearableBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLAssetType::EType asset_type, - U32 flags); + LLTaskWearableBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags) : + LLTaskInvFVBridge(panel, uuid, name, flags) {} virtual LLUIImagePtr getIcon() const; - -protected: - LLAssetType::EType mAssetType; }; -LLTaskWearableBridge::LLTaskWearableBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name, - LLAssetType::EType asset_type, - U32 flags) : - LLTaskInvFVBridge(panel, uuid, name, flags), - mAssetType( asset_type ) -{ -} - LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return get_item_icon(mAssetType, LLInventoryType::IT_WEARABLE, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE ); } @@ -1414,16 +1252,15 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* LLInventoryObject* object) { LLTaskInvFVBridge* new_bridge = NULL; + const LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(object); LLAssetType::EType type = object->getType(); - LLInventoryItem* item = NULL; + switch(type) { case LLAssetType::AT_TEXTURE: - item = (LLInventoryItem*)object; new_bridge = new LLTaskTextureBridge(panel, object->getUUID(), - object->getName(), - item->getInventoryType()); + object->getName()); break; case LLAssetType::AT_SOUND: new_bridge = new LLTaskSoundBridge(panel, @@ -1449,13 +1286,11 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* break; case LLAssetType::AT_OBJECT: { - item = dynamic_cast<LLInventoryItem*>(object); - U32 flags = ( NULL == item ? 0 : item->getFlags() ); - - new_bridge = new LLTaskObjectBridge(panel, - object->getUUID(), - object->getName(), - flags); + U32 flags = ( NULL == item ? 0 : item->getFlags() ); + new_bridge = new LLTaskObjectBridge(panel, + object->getUUID(), + object->getName(), + flags); } break; case LLAssetType::AT_NOTECARD: @@ -1475,11 +1310,9 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* break; case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: - item = (LLInventoryItem*)object; new_bridge = new LLTaskWearableBridge(panel, object->getUUID(), object->getName(), - type, item->getFlags()); break; case LLAssetType::AT_CATEGORY: @@ -1492,8 +1325,6 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* object->getUUID(), object->getName()); break; - - break; default: llinfos << "Unhandled inventory type (llassetstorage.h): " << (S32)type << llendl; @@ -1658,7 +1489,7 @@ void LLPanelObjectInventory::updateInventory() BOOL inventory_has_focus = FALSE; if (mHaveInventory) { - mFolders->getSelectionList(selected_items); + selected_items = mFolders->getSelectionList(); inventory_has_focus = gFocusMgr.childHasKeyboardFocus(mFolders); } diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp new file mode 100644 index 0000000000..6ba015b11c --- /dev/null +++ b/indra/newview/llpanelonlinestatus.cpp @@ -0,0 +1,60 @@ +/** + * @file llpanelonlinestatus.cpp + * @brief Represents a class of online status tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llnotifications.h" +#include "llpanelonlinestatus.h" + +LLPanelOnlineStatus::LLPanelOnlineStatus( + const LLNotificationPtr& notification) : + LLPanelTipToast(notification) +{ + + LLUICtrlFactory::getInstance()->buildPanel(this, + "panel_online_status_toast.xml"); + + + childSetValue("avatar_icon", notification->getPayload()["FROM_ID"]); + childSetValue("message", notification->getMessage()); + + if (notification->getPayload().has("respond_on_mousedown") + && notification->getPayload()["respond_on_mousedown"]) + { + setMouseDownCallback(boost::bind(&LLNotification::respond, + notification, notification->getResponseTemplate())); + } + + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox> ("message"), 3); + +} diff --git a/indra/newview/llpanelonlinestatus.h b/indra/newview/llpanelonlinestatus.h new file mode 100644 index 0000000000..b47050c3a2 --- /dev/null +++ b/indra/newview/llpanelonlinestatus.h @@ -0,0 +1,53 @@ +/** + * @file llpanelonlinestatus.h + * @brief Represents a class of online status tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llpaneltiptoast.h" + +#ifndef LL_PANELONLINESTATUS_H +#define LL_PANELONLINESTATUS_H + +/** + * Represents online tip toast panel. + */ +class LLPanelOnlineStatus : public LLPanelTipToast +{ + // disallow instantiation of this class +private: + // grant privileges to instantiate this class to LLToastPanel + friend class LLToastPanel; + + LLPanelOnlineStatus(const LLNotificationPtr& notification); + virtual ~LLPanelOnlineStatus() {} +}; + +#endif /* LL_PANELONLINESTATUS_H */ diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ba6473839a..c04be85174 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -38,7 +38,10 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llcofwearables.h" +#include "llfilteredwearablelist.h" #include "llinventory.h" +#include "llinventoryitemslist.h" #include "llviewercontrol.h" #include "llui.h" #include "llfloater.h" @@ -71,11 +74,19 @@ const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE); const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT); const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; -class LLInventoryLookObserver : public LLInventoryObserver +static const std::string SAVE_BTN("save_btn"); +static const std::string REVERT_BTN("revert_btn"); + +class LLCOFObserver : public LLInventoryObserver { public: - LLInventoryLookObserver(LLPanelOutfitEdit *panel) : mPanel(panel) {} - virtual ~LLInventoryLookObserver() + LLCOFObserver(LLPanelOutfitEdit *panel) : mPanel(panel), + mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) + { + gInventory.addObserver(this); + } + + virtual ~LLCOFObserver() { if (gInventory.containsObserver(this)) { @@ -85,47 +96,92 @@ public: virtual void changed(U32 mask) { - if (mask & (LLInventoryObserver::ADD | LLInventoryObserver::REMOVE)) + if (!gInventory.isInventoryUsable()) return; + + bool panel_updated = checkCOF(); + + if (!panel_updated) { - mPanel->updateLookInfo(); + checkBaseOutfit(); } } + protected: - LLPanelOutfitEdit *mPanel; -}; -class LLLookFetchObserver : public LLInventoryFetchDescendentsObserver -{ -public: - LLLookFetchObserver(LLPanelOutfitEdit *panel) : - mPanel(panel) - {} - LLLookFetchObserver() {} - virtual void done() + /** Get a version of an inventory category specified by its UUID */ + static S32 getCategoryVersion(const LLUUID& cat_id) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN; + + return cat->getVersion(); + } + + bool checkCOF() + { + LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); + if (cof.isNull()) return false; + + S32 cof_version = getCategoryVersion(cof); + + if (cof_version == mCOFLastVersion) return false; + + mCOFLastVersion = cof_version; + + mPanel->update(); + + return true; + } + + void checkBaseOutfit() { - mPanel->lookFetched(); - if(gInventory.containsObserver(this)) + LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + + if (baseoutfit_id == mBaseOutfitId) { - gInventory.removeObserver(this); + if (baseoutfit_id.isNull()) return; + + const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); + + if (baseoutfit_ver == mBaseOutfitLastVersion) return; + } + else + { + mBaseOutfitId = baseoutfit_id; + if (baseoutfit_id.isNull()) return; + + mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); } + + mPanel->updateVerbs(); } -private: + + + + LLPanelOutfitEdit *mPanel; + + //last version number of a COF category + S32 mCOFLastVersion; + + LLUUID mBaseOutfitId; + + S32 mBaseOutfitLastVersion; }; LLPanelOutfitEdit::LLPanelOutfitEdit() -: LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL), -mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL), -mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) +: LLPanel(), + mSearchFilter(NULL), + mCOFWearables(NULL), + mInventoryItemsPanel(NULL), + mCOFObserver(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - mFetchLook = new LLLookFetchObserver(this); - mLookObserver = new LLInventoryLookObserver(this); - gInventory.addObserver(mLookObserver); + mCOFObserver = new LLCOFObserver(this); mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES); for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++) @@ -139,17 +195,8 @@ mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) LLPanelOutfitEdit::~LLPanelOutfitEdit() { delete mSavedFolderState; - if (gInventory.containsObserver(mFetchLook)) - { - gInventory.removeObserver(mFetchLook); - } - delete mFetchLook; - - if (gInventory.containsObserver(mLookObserver)) - { - gInventory.removeObserver(mLookObserver); - } - delete mLookObserver; + + delete mCOFObserver; } BOOL LLPanelOutfitEdit::postBuild() @@ -161,13 +208,25 @@ BOOL LLPanelOutfitEdit::postBuild() mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name"); + mStatus = getChild<LLTextBox>("status"); + + mFolderViewBtn = getChild<LLButton>("folder_view_btn"); + mListViewBtn = getChild<LLButton>("list_view_btn"); - childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL); childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); + childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL); + childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL); + + mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); + mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); + + mCOFWearables->getCOFCallbacks().mEditWearable = boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this); + mCOFWearables->getCOFCallbacks().mDeleteWearable = boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this); + mCOFWearables->getCOFCallbacks().mMoveWearableCloser = boost::bind(&LLPanelOutfitEdit::moveWearable, this, true); + mCOFWearables->getCOFCallbacks().mMoveWearableFurther = boost::bind(&LLPanelOutfitEdit::moveWearable, this, false); + + mCOFWearables->childSetAction("add_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this)); - mLookContents = getChild<LLScrollListCtrl>("look_items_list"); - mLookContents->sortByColumn("look_item_sort", TRUE); - mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); @@ -187,41 +246,16 @@ BOOL LLPanelOutfitEdit::postBuild() mSearchFilter = getChild<LLFilterEditor>("look_item_filter"); mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2)); - /* Removing add to look inline button (not part of mvp for viewer 2) - LLButton::Params add_params; - add_params.name("add_to_look"); - add_params.click_callback.function(boost::bind(&LLPanelOutfitEdit::onAddToLookClicked, this)); - add_params.label("+"); - - mAddToLookBtn = LLUICtrlFactory::create<LLButton>(add_params); - mAddToLookBtn->setEnabled(FALSE); - mAddToLookBtn->setVisible(FALSE); */ - childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); - childSetEnabled("add_to_outfit_btn", false); - - mUpBtn = getChild<LLButton>("up_btn"); - mUpBtn->setEnabled(TRUE); - mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this)); - //*TODO rename mLookContents to mOutfitContents - mLookContents = getChild<LLScrollListCtrl>("look_items_list"); - mLookContents->sortByColumn("look_item_sort", TRUE); - mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); - - mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn"); - mRemoveFromOutfitBtn->setEnabled(FALSE); - mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this)); - mEditWearableBtn = getChild<LLButton>("edit_wearable_btn"); mEditWearableBtn->setEnabled(FALSE); mEditWearableBtn->setVisible(FALSE); mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this)); - childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); + childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); - childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); - childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); + childSetAction(SAVE_BTN, boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this)); LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; @@ -229,17 +263,56 @@ BOOL LLPanelOutfitEdit::postBuild() save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel"); + mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list"); + mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, ALL_ITEMS_MASK); + return TRUE; } -void LLPanelOutfitEdit::showAddWearablesPanel() +void LLPanelOutfitEdit::moveWearable(bool closer_to_body) +{ + LLUUID item_id = mCOFWearables->getSelectedUUID(); + if (item_id.isNull()) return; + + LLViewerInventoryItem* wearable_to_move = gInventory.getItem(item_id); + LLAppearanceMgr::getInstance()->moveWearable(wearable_to_move, closer_to_body); +} + +void LLPanelOutfitEdit::toggleAddWearablesPanel() { - childSetVisible("add_wearables_panel", childGetValue("add_btn")); + childSetVisible("add_wearables_panel", !childIsVisible("add_wearables_panel")); } void LLPanelOutfitEdit::showWearablesFilter() { - childSetVisible("filter_combobox_panel", childGetValue("filter_button")); + bool filter_visible = childGetValue("filter_button"); + + childSetVisible("filter_panel", filter_visible); + + if(!filter_visible) + { + mSearchFilter->clear(); + onSearchEdit(LLStringUtil::null); + } +} + +void LLPanelOutfitEdit::showFilteredWearablesPanel() +{ + if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel)) + { + mFolderViewBtn->setToggleState(FALSE); + } + mListViewBtn->setToggleState(TRUE); +} + +void LLPanelOutfitEdit::showFilteredFolderWearablesPanel() +{ + if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel)) + { + mListViewBtn->setToggleState(FALSE); + } + mFolderViewBtn->setToggleState(TRUE); } void LLPanelOutfitEdit::saveOutfit(bool as_new) @@ -256,6 +329,8 @@ void LLPanelOutfitEdit::saveOutfit(bool as_new) { panel_outfits_inventory->onSave(); } + + //*TODO how to get to know when base outfit is updated or new outfit is created? } void LLPanelOutfitEdit::showSaveMenu() @@ -275,6 +350,7 @@ void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) { U32 curr_filter_type = type_filter->getCurrentIndex(); mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask); + mWearableListManager->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask); } mSavedFolderState->setApply(TRUE); @@ -301,7 +377,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) if (mSearchString == "") { mInventoryItemsPanel->setFilterSubString(LLStringUtil::null); - + mWearableItemsList->setFilterSubString(LLStringUtil::null); // re-open folders that were initially open mSavedFolderState->setApply(TRUE); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -327,6 +403,8 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) // set new filter string mInventoryItemsPanel->setFilterSubString(mSearchString); + mWearableItemsList->setFilterSubString(mSearchString); + } void LLPanelOutfitEdit::onAddToOutfitClicked(void) @@ -337,60 +415,21 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void) LLFolderViewEventListener* listenerp = curr_item->getListener(); if (!listenerp) return; - if (LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID())) - { - updateLookInfo(); - } + LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID()); } void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) { - LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID(); + LLUUID id_to_remove = mCOFWearables->getSelectedUUID(); LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove); - - updateLookInfo(); - - mRemoveFromOutfitBtn->setEnabled(FALSE); -} - - -void LLPanelOutfitEdit::onUpClicked(void) -{ - LLUUID inv_id = mLookContents->getSelectionInterface()->getCurrentID(); - if (inv_id.isNull()) - { - //nothing selected, do nothing - return; - } - - LLViewerInventoryItem *link_item = gInventory.getItem(inv_id); - if (!link_item) - { - llwarns << "could not find inventory item based on currently worn link." << llendl; - return; - } - - - LLUUID asset_id = link_item->getAssetUUID(); - if (asset_id.isNull()) - { - llwarns << "inventory link has null Asset ID. could not get object reference" << llendl; - } - - static const std::string empty = ""; - LLWearableList::instance().getAsset(asset_id, - empty, // don't care about wearable name - link_item->getActualType(), - LLSidepanelAppearance::editWearable, - (void*)getParentUICtrl()); } void LLPanelOutfitEdit::onEditWearableClicked(void) { - LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID(); + LLUUID id_to_edit = mCOFWearables->getSelectedUUID(); LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit); if (item_to_edit) @@ -438,10 +477,7 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: case LLAssetType::AT_OBJECT: - childSetEnabled("add_to_outfit_btn", true); - break; default: - childSetEnabled("add_to_outfit_btn", false); break; } @@ -463,95 +499,27 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView void LLPanelOutfitEdit::onOutfitItemSelectionChange(void) { - LLScrollListItem* item = mLookContents->getLastSelectedItem(); - if (!item) - return; - - LLRect item_rect; - mLookContents->localRectToOtherView(item->getRect(), &item_rect, getChild<LLUICtrl>("outfit_wearables_panel")); - - // TODO button(and item list) should be removed (when new widget is ready) - LLRect btn_rect = mEditWearableBtn->getRect(); - btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom); - - mEditWearableBtn->setShape(btn_rect); - - mEditWearableBtn->setEnabled(TRUE); - if (!mEditWearableBtn->getVisible()) - { - mEditWearableBtn->setVisible(TRUE); - } + LLUUID item_id = mCOFWearables->getSelectedUUID(); + //*TODO show Edit Wearable Button - const LLUUID& id_item_to_remove = item->getUUID(); - LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove); + LLViewerInventoryItem* item_to_remove = gInventory.getItem(item_id); if (!item_to_remove) return; switch (item_to_remove->getType()) { case LLAssetType::AT_CLOTHING: case LLAssetType::AT_OBJECT: - mRemoveFromOutfitBtn->setEnabled(TRUE); - break; default: - mRemoveFromOutfitBtn->setEnabled(FALSE); break; } } -void LLPanelOutfitEdit::changed(U32 mask) +void LLPanelOutfitEdit::update() { -} + mCOFWearables->refresh(); -void LLPanelOutfitEdit::lookFetched(void) -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - - // collectDescendentsIf takes non-const reference: - LLFindCOFValidItems is_cof_valid; - gInventory.collectDescendentsIf(mCurrentOutfitID, - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH, - is_cof_valid); - for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); - iter != item_array.end(); - iter++) - { - const LLViewerInventoryItem *item = (*iter); - - LLSD row; - row["id"] = item->getUUID(); - LLSD& columns = row["columns"]; - columns[0]["column"] = "look_item"; - columns[0]["type"] = "text"; - columns[0]["value"] = item->getName(); - columns[1]["column"] = "look_item_sort"; - columns[1]["type"] = "text"; // TODO: multi-wearable sort "type" should go here. - columns[1]["value"] = "BAR"; // TODO: Multi-wearable sort index should go here - - mLookContents->addElement(row); - } -} - -void LLPanelOutfitEdit::updateLookInfo() -{ - if (getVisible()) - { - mLookContents->clearRows(); - - mFetchLook->setFetchID(mCurrentOutfitID); - mFetchLook->startFetch(); - if (mFetchLook->isFinished()) - { - mFetchLook->done(); - } - else - { - gInventory.addObserver(mFetchLook); - } - } + updateVerbs(); } void LLPanelOutfitEdit::displayCurrentOutfit() @@ -561,8 +529,6 @@ void LLPanelOutfitEdit::displayCurrentOutfit() setVisible(TRUE); } - mCurrentOutfitID = LLAppearanceMgr::getInstance()->getCOF(); - std::string current_outfit_name; if (LLAppearanceMgr::getInstance()->getBaseOutfitName(current_outfit_name)) { @@ -573,7 +539,36 @@ void LLPanelOutfitEdit::displayCurrentOutfit() mCurrentOutfitName->setText(getString("No Outfit")); } - updateLookInfo(); + update(); } +//private +void LLPanelOutfitEdit::updateVerbs() +{ + //*TODO implement better handling of COF dirtiness + LLAppearanceMgr::getInstance()->updateIsDirty(); + + bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); + bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull(); + + childSetEnabled(SAVE_BTN, outfit_is_dirty); + childSetEnabled(REVERT_BTN, outfit_is_dirty && has_baseoutfit); + + mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty); + + mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); + +} + +bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) +{ + if(switch_from_panel && switch_to_panel && !switch_to_panel->getVisible()) + { + switch_from_panel->setVisible(FALSE); + switch_to_panel->setVisible(TRUE); + return true; + } + return false; +} +// EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 69e8016534..cb8283fca3 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -42,19 +42,21 @@ #include "llremoteparcelrequest.h" #include "llinventory.h" +#include "llinventoryitemslist.h" #include "llinventorymodel.h" class LLButton; +class LLCOFWearables; class LLTextBox; class LLInventoryCategory; -class LLInventoryLookObserver; +class LLCOFObserver; class LLInventoryPanel; class LLSaveFolderState; class LLFolderViewItem; class LLScrollListCtrl; class LLToggleableMenu; -class LLLookFetchObserver; class LLFilterEditor; +class LLFilteredWearableListManager; class LLPanelOutfitEdit : public LLPanel { @@ -80,14 +82,13 @@ public: /*virtual*/ ~LLPanelOutfitEdit(); /*virtual*/ BOOL postBuild(); - /*virtual*/ void changed(U32 mask); - /*virtual*/ void setParcelID(const LLUUID& parcel_id); - // Sends a request for data about the given parcel, which will - // only update the location if there is none already available. + void moveWearable(bool closer_to_body); - void showAddWearablesPanel(); + void toggleAddWearablesPanel(); void showWearablesFilter(); + void showFilteredWearablesPanel(); + void showFilteredFolderWearablesPanel(); void saveOutfit(bool as_new = false); void showSaveMenu(); @@ -98,34 +99,44 @@ public: void onOutfitItemSelectionChange(void); void onRemoveFromOutfitClicked(void); void onEditWearableClicked(void); - void onUpClicked(void); void displayCurrentOutfit(); - void lookFetched(void); - - void updateLookInfo(void); + void update(); + + void updateVerbs(); + /** + * @brief Helper function. Shows one panel instead of another. + * If panels already switched does nothing and returns false. + * @param switch_from_panel panel to hide + * @param switch_to_panel panel to show + * @retun returns true if switching happened, false if not. + */ + bool switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel); private: - //*TODO got rid of mCurrentOutfitID - LLUUID mCurrentOutfitID; + LLTextBox* mCurrentOutfitName; - LLScrollListCtrl* mLookContents; + LLTextBox* mStatus; LLInventoryPanel* mInventoryItemsPanel; LLFilterEditor* mSearchFilter; LLSaveFolderState* mSavedFolderState; std::string mSearchString; - LLButton* mAddToOutfitBtn; - LLButton* mRemoveFromOutfitBtn; - LLButton* mUpBtn; LLButton* mEditWearableBtn; + LLButton* mFolderViewBtn; + LLButton* mListViewBtn; LLToggleableMenu* mSaveMenu; - - LLLookFetchObserver* mFetchLook; - LLInventoryLookObserver* mLookObserver; + + LLFilteredWearableListManager* mWearableListManager; + LLInventoryItemsList* mWearableItemsList; + LLPanel* mWearableItemsPanel; + + LLCOFObserver* mCOFObserver; std::vector<LLLookItemType> mLookItemTypes; + + LLCOFWearables* mCOFWearables; }; #endif // LL_LLPANELOUTFITEDIT_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index b78268da7b..660615df5a 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -49,6 +49,7 @@ #include "lllineeditor.h" #include "llmodaldialog.h" #include "llnotificationsutil.h" +#include "lloutfitslist.h" #include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltabcontainer.h" @@ -67,15 +68,16 @@ static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; static const std::string COF_TAB_NAME = "cof_tab"; static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); -bool LLPanelOutfitsInventory::sShowDebugEditor = false; LLPanelOutfitsInventory::LLPanelOutfitsInventory() : - mActivePanel(NULL), + mMyOutfitsPanel(NULL), + mCurrentOutfitPanel(NULL), mParent(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); + gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -86,10 +88,18 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() // virtual BOOL LLPanelOutfitsInventory::postBuild() { - sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor"); initTabPanels(); initListCommandsHandlers(); + // Fetch your outfits folder so that the links are in memory. + // ( This is only necessary if we want to show a warning if a user deletes an item that has a + // a link in an outfit, see "ConfirmItemDeleteHasLinks". ) + const LLUUID &outfits_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTFIT, false); + if (outfits_cat.notNull()) + { + LLInventoryModelBackgroundFetch::instance().start(outfits_cat); + } + return TRUE; } @@ -131,7 +141,6 @@ void LLPanelOutfitsInventory::updateVerbs() if (mListCommands) { - mListCommands->childSetVisible("edit_current_outfit_btn",sShowDebugEditor); updateListCommands(); } } @@ -145,9 +154,17 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { mFilterSubString = string; + + // TODO: add handling "My Outfits" tab. + if (!isCOFPanelActive()) + { + mMyOutfitsPanel->setFilterSubString(string); + return; + } + if (string == "") { - mActivePanel->setFilterSubString(LLStringUtil::null); + getActivePanel()->setFilterSubString(LLStringUtil::null); // re-open folders that were initially open mSavedFolderState->setApply(TRUE); @@ -159,7 +176,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) LLInventoryModelBackgroundFetch::instance().start(); - if (mActivePanel->getFilterSubString().empty() && string.empty()) + if (getActivePanel()->getFilterSubString().empty() && string.empty()) { // current filter and new filter empty, do nothing return; @@ -173,24 +190,43 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) } // set new filter string - mActivePanel->setFilterSubString(string); + getActivePanel()->setFilterSubString(string); } void LLPanelOutfitsInventory::onWearButtonClick() { - LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); - if (listenerp) + // TODO: Remove if/else, add common interface + // for "My Outfits" and "Wearing" tabs. + if (!isCOFPanelActive()) { - listenerp->performAction(NULL, "replaceoutfit"); + mMyOutfitsPanel->performAction("replaceoutfit"); + setWearablesLoading(true); + } + else + { + LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); + if (listenerp) + { + listenerp->performAction(NULL, "replaceoutfit"); + } } } void LLPanelOutfitsInventory::onAdd() { - LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); - if (listenerp) + // TODO: Remove if/else, add common interface + // for "My Outfits" and "Wearing" tabs. + if (!isCOFPanelActive()) { - listenerp->performAction(NULL, "addtooutfit"); + mMyOutfitsPanel->performAction("addtooutfit"); + } + else + { + LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); + if (listenerp) + { + listenerp->performAction(NULL, "addtooutfit"); + } } } @@ -216,7 +252,7 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& LLStringUtil::trim(outfit_name); if( !outfit_name.empty() ) { - LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); + LLUUID outfit_folder = LLAppearanceMgr::getInstance()->makeNewOutfitLinks(outfit_name); LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); @@ -267,6 +303,11 @@ void LLPanelOutfitsInventory::onSave() void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) { updateVerbs(); + + // TODO: add handling "My Outfits" tab. + if (!isCOFPanelActive()) + return; + if (getRootFolder()->needsAutoRename() && items.size()) { getRootFolder()->startRenamingSelectedItem(); @@ -274,16 +315,12 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte } } -void LLPanelOutfitsInventory::showEditOutfitPanel() -{ - LLSD key; - key["type"] = "edit_outfit"; - - LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); -} - LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() { + // TODO: add handling "My Outfits" tab. + if (!isCOFPanelActive()) + return NULL; + LLFolderViewItem* current_item = getRootFolder()->getCurSelectedItem(); if (!current_item) return NULL; @@ -311,7 +348,7 @@ bool LLPanelOutfitsInventory::getIsCorrectType(const LLFolderViewEventListener * LLFolderView *LLPanelOutfitsInventory::getRootFolder() { - return mActivePanel->getRootFolder(); + return getActivePanel()->getRootFolder(); } //static @@ -332,8 +369,6 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); - mListCommands->childSetAction("edit_current_outfit_btn", boost::bind(&LLPanelOutfitsInventory::showEditOutfitPanel, this)); - LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this , _4 // BOOL drop @@ -393,7 +428,11 @@ void LLPanelOutfitsInventory::onTrashButtonClick() void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata) { std::string command_name = userdata.asString(); - getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); + // TODO: add handling "My Outfits" tab. + if (isCOFPanelActive()) + { + getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); + } updateListCommands(); updateVerbs(); } @@ -447,21 +486,25 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) if (command_name == "delete" || command_name == "remove") { BOOL can_delete = FALSE; - LLFolderView* root = getActivePanel()->getRootFolder(); - if (root) + + // TODO: add handling "My Outfits" tab. + if (isCOFPanelActive()) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); - can_delete = (selection_set.size() > 0); - for (std::set<LLUUID>::iterator iter = selection_set.begin(); - iter != selection_set.end(); - ++iter) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { - const LLUUID &item_id = (*iter); - LLFolderViewItem *item = root->getItemByID(item_id); - can_delete &= item->getListener()->isItemRemovable(); + std::set<LLUUID> selection_set = root->getSelectionList(); + can_delete = (selection_set.size() > 0); + for (std::set<LLUUID>::iterator iter = selection_set.begin(); + iter != selection_set.end(); + ++iter) + { + const LLUUID &item_id = (*iter); + LLFolderViewItem *item = root->getItemByID(item_id); + can_delete &= item->getListener()->isItemRemovable(); + } + return can_delete; } - return can_delete; } return FALSE; } @@ -471,8 +514,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView* root = getActivePanel()->getRootFolder(); if (root) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); + std::set<LLUUID> selection_set = root->getSelectionList(); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -517,12 +559,16 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) bool LLPanelOutfitsInventory::hasItemsSelected() { bool has_items_selected = false; - LLFolderView* root = getActivePanel()->getRootFolder(); - if (root) + + // TODO: add handling "My Outfits" tab. + if (isCOFPanelActive()) { - std::set<LLUUID> selection_set; - root->getSelectionList(selection_set); - has_items_selected = (selection_set.size() > 0); + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) + { + std::set<LLUUID> selection_set = root->getSelectionList(); + has_items_selected = (selection_set.size() > 0); + } } return has_items_selected; } @@ -549,74 +595,74 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy void LLPanelOutfitsInventory::initTabPanels() { - LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>(COF_TAB_NAME); - cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels.push_back(cof_panel); + mCurrentOutfitPanel = getChild<LLInventoryPanel>(COF_TAB_NAME); + mCurrentOutfitPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + mCurrentOutfitPanel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, mCurrentOutfitPanel, _1, _2)); - LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>(OUTFITS_TAB_NAME); - myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); - myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels.push_back(myoutfits_panel); - - for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); - iter != mTabPanels.end(); - ++iter) - { - LLInventoryPanel *panel = (*iter); - panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); - } + mMyOutfitsPanel = getChild<LLOutfitsList>(OUTFITS_TAB_NAME); mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); - mActivePanel = (LLInventoryPanel*)mAppearanceTabs->getCurrentPanel(); } void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) { if (user_action && items.size() > 0) { - for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); - iter != mTabPanels.end(); - ++iter) + // TODO: add handling "My Outfits" tab. + if (isCOFPanelActive()) { - LLInventoryPanel *panel = (*iter); - if (panel == tab_panel) - { - mActivePanel = panel; - } - else - { - panel->getRootFolder()->clearSelection(); - } + onSelectionChange(items, user_action); + } + else + { + mCurrentOutfitPanel->getRootFolder()->clearSelection(); } } - onSelectionChange(items, user_action); } void LLPanelOutfitsInventory::onTabChange() { - mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); - if (!mActivePanel) + // TODO: add handling "My Outfits" tab. + if (isCOFPanelActive()) { - return; + mCurrentOutfitPanel->setFilterSubString(mFilterSubString); } - mActivePanel->setFilterSubString(mFilterSubString); + else + { + mMyOutfitsPanel->setFilterSubString(mFilterSubString); + } + updateVerbs(); } BOOL LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) const { - for(tabpanels_vec_t::const_iterator it = mTabPanels.begin(); - it != mTabPanels.end(); - ++it) + // TODO: add handling "My Outfits" tab. + if (mCurrentOutfitPanel == panel) { - if (*it == panel) - return TRUE; + return TRUE; } return FALSE; } BOOL LLPanelOutfitsInventory::isCOFPanelActive() const { - return (getActivePanel()->getName() == COF_TAB_NAME); + return (childGetVisibleTab("appearance_tabs")->getName() == COF_TAB_NAME); +} + +void LLPanelOutfitsInventory::setWearablesLoading(bool val) +{ + mListCommands->childSetEnabled("wear_btn", !val); + + llassert(mParent); + if (mParent) + { + mParent->setWearablesLoading(val); + } +} + +void LLPanelOutfitsInventory::onWearablesLoaded() +{ + setWearablesLoading(false); } diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 5d0d27ee4f..6b4d1dbd84 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -40,6 +40,7 @@ class LLFolderView; class LLFolderViewItem; class LLFolderViewEventListener; class LLInventoryPanel; +class LLOutfitsList; class LLSaveFolderState; class LLButton; class LLMenuGL; @@ -64,7 +65,6 @@ public: bool onSaveCommit(const LLSD& notification, const LLSD& response); void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); - void showEditOutfitPanel(); // If a compatible listener type is selected, then return a pointer to that. // Otherwise, return NULL. @@ -88,20 +88,21 @@ private: public: ////////////////////////////////////////////////////////////////////////////////// // tab panels - LLInventoryPanel* getActivePanel() { return mActivePanel; } - const LLInventoryPanel* getActivePanel() const { return mActivePanel; } + // TODO: change getActivePanel() to return the active tab instead of returning + // a pointer to "Wearing" inventory panel. + LLInventoryPanel* getActivePanel() { return mCurrentOutfitPanel; } + BOOL isTabPanel(LLInventoryPanel *panel) const; - + BOOL isCOFPanelActive() const; + protected: void initTabPanels(); void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); void onTabChange(); - BOOL isCOFPanelActive() const; private: - LLInventoryPanel* mActivePanel; - typedef std::vector<LLInventoryPanel *> tabpanels_vec_t; - tabpanels_vec_t mTabPanels; + LLOutfitsList* mMyOutfitsPanel; + LLInventoryPanel* mCurrentOutfitPanel; // tab panels // //////////////////////////////////////////////////////////////////////////////// @@ -122,6 +123,8 @@ protected: void onCustomAction(const LLSD& command_name); bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); bool hasItemsSelected(); + void setWearablesLoading(bool val); + void onWearablesLoaded(); private: LLPanel* mListCommands; LLMenuGL* mMenuGearDefault; @@ -129,8 +132,6 @@ private: // List Commands // //////////////////////////////////////////////////////////////////////////////// /// -public: - static bool sShowDebugEditor; }; #endif //LL_LLPANELOUTFITSINVENTORY_H diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 5802d53cd1..0a4af00f78 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -443,6 +443,7 @@ public: LLPanelPeople::LLPanelPeople() : LLPanel(), mFilterSubString(LLStringUtil::null), + mFilterSubStringOrig(LLStringUtil::null), mFilterEditor(NULL), mTabContainer(NULL), mOnlineFriendList(NULL), @@ -512,15 +513,19 @@ BOOL LLPanelPeople::postBuild() mNearbyList = getChild<LLPanel>(NEARBY_TAB_NAME)->getChild<LLAvatarList>("avatar_list"); mNearbyList->setNoItemsCommentText(getString("no_one_near")); + mNearbyList->setNoItemsMsg(getString("no_one_near")); + mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near")); mNearbyList->setShowIcons("NearbyListShowIcons"); mRecentList = getChild<LLPanel>(RECENT_TAB_NAME)->getChild<LLAvatarList>("avatar_list"); - mRecentList->setNoItemsCommentText(getString("no_people")); + mRecentList->setNoItemsCommentText(getString("no_recent_people")); + mRecentList->setNoItemsMsg(getString("no_recent_people")); + mRecentList->setNoFilteredItemsMsg(getString("no_filtered_recent_people")); mRecentList->setShowIcons("RecentListShowIcons"); mGroupList = getChild<LLGroupList>("group_list"); - mGroupList->setNoGroupsMsg(getString("no_groups_msg")); - mGroupList->setNoFilteredGroupsMsg(getString("no_filtered_groups_msg")); + mGroupList->setNoItemsMsg(getString("no_groups_msg")); + mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg")); mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); @@ -619,7 +624,7 @@ BOOL LLPanelPeople::postBuild() if(recent_view_sort) mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - gVoiceClient->addObserver(this); + LLVoiceClient::getInstance()->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state updateButtons(); @@ -641,6 +646,25 @@ void LLPanelPeople::onChange(EStatusType status, const std::string &channelURI, updateButtons(); } +void LLPanelPeople::updateFriendListHelpText() +{ + // show special help text for just created account to help finding friends. EXT-4836 + static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_help_text"); + + // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) + // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. + bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches(); + no_friends_text->setVisible(!any_friend_exists); + if (no_friends_text->getVisible()) + { + //update help text for empty lists + std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg"; + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(mFilterSubStringOrig); + no_friends_text->setText(getString(message_name, args)); + } +} + void LLPanelPeople::updateFriendList() { if (!mOnlineFriendList || !mAllFriendList) @@ -680,14 +704,6 @@ void LLPanelPeople::updateFriendList() online_friendsp.push_back(buddy_id); } - // show special help text for just created account to help found friends. EXT-4836 - static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg"); - - // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) - // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. - bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0); - no_friends_text->setVisible(!any_friend_exists); - /* * Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items. * But avatarlist can be updated only if it is visible @see LLAvatarList::draw(); @@ -809,7 +825,7 @@ void LLPanelPeople::updateButtons() } } - bool enable_calls = gVoiceClient->voiceWorking() && gVoiceClient->voiceEnabled(); + bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); @@ -968,10 +984,11 @@ bool LLPanelPeople::isRealGroup() void LLPanelPeople::onFilterEdit(const std::string& search_string) { - std::string search_upper = search_string; + mFilterSubStringOrig = search_string; + LLStringUtil::trimHead(mFilterSubStringOrig); // Searches are case-insensitive + std::string search_upper = mFilterSubStringOrig; LLStringUtil::toUpper(search_upper); - LLStringUtil::trimHead(search_upper); if (mFilterSubString == search_upper) return; @@ -986,11 +1003,11 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) // Apply new filter. - mNearbyList->setNameFilter(mFilterSubString); - mOnlineFriendList->setNameFilter(mFilterSubString); - mAllFriendList->setNameFilter(mFilterSubString); - mRecentList->setNameFilter(mFilterSubString); - mGroupList->setNameFilter(mFilterSubString); + mNearbyList->setNameFilter(mFilterSubStringOrig); + mOnlineFriendList->setNameFilter(mFilterSubStringOrig); + mAllFriendList->setNameFilter(mFilterSubStringOrig); + mRecentList->setNameFilter(mFilterSubStringOrig); + mGroupList->setNameFilter(mFilterSubStringOrig); setAccordionCollapsedByUser("tab_online", false); setAccordionCollapsedByUser("tab_all", false); @@ -1432,6 +1449,9 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded() // Rearrange accordions LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); accordion->arrange(); + + // keep help text in a synchronization with accordions visibility. + updateFriendListHelpText(); } } diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 891381e2de..17c45a034b 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -73,6 +73,7 @@ private: } ESortOrder; // methods indirectly called by the updaters + void updateFriendListHelpText(); void updateFriendList(); void updateNearbyList(); void updateRecentList(); @@ -168,6 +169,7 @@ private: Updater* mRecentListUpdater; std::string mFilterSubString; + std::string mFilterSubStringOrig; }; #endif //LL_LLPANELPEOPLE_H diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 17784c31e3..028440562d 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -528,8 +528,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi std::string string = search_string; // Searches are case-insensitive - LLStringUtil::toUpper(string); - LLStringUtil::trimHead(string); + // but we don't convert the typed string to upper-case so that it can be fed to the web search as-is. mActivePanel->onSearchEdit(string); } @@ -616,8 +615,21 @@ void LLPanelPlaces::onShowOnMapButtonClicked() } else { - if (mActivePanel) + if (mActivePanel && mActivePanel->isSingleItemSelected()) + { mActivePanel->onShowOnMap(); + } + else + { + LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); + LLVector3d global_pos = gAgent.getPositionGlobal(); + + if (!global_pos.isExactlyZero() && worldmap_instance) + { + worldmap_instance->trackLocation(global_pos); + LLFloaterReg::showInstance("world_map", "center"); + } + } } } @@ -1071,10 +1083,8 @@ void LLPanelPlaces::updateVerbs() mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); - mPlaceInfoBtn->setVisible(mPlaceInfoType != LANDMARK_INFO_TYPE && mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE - && !is_create_landmark_visible && !isLandmarkEditModeOn); + mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn); - mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); if (is_place_info_visible) diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 42cf3b03a3..0f3c51fb4f 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -71,10 +71,7 @@ void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos, std::string sl_url; if ( gotSimName ) { - F32 region_x = (F32)fmod( landmark_global_pos.mdV[VX], (F64)REGION_WIDTH_METERS ); - F32 region_y = (F32)fmod( landmark_global_pos.mdV[VY], (F64)REGION_WIDTH_METERS ); - - sl_url = LLSLURL::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)landmark_global_pos.mdV[VZ])); + sl_url = LLSLURL(sim_name, landmark_global_pos).getSLURLString(); } else { diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index f4e93a7658..4a155afd71 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -47,6 +47,7 @@ public: virtual void onShowOnMap() = 0; virtual void onShowProfile() = 0; virtual void onTeleport() = 0; + virtual bool isSingleItemSelected() = 0; bool isTabVisible(); // Check if parent TabContainer is visible. diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c0b2244038..4dd03e04a9 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -38,7 +38,7 @@ #include "llsidetray.h" #include "llworldmap.h" #include "llteleporthistorystorage.h" -#include "lltextutil.h" +#include "lluitextutil.h" #include "llaccordionctrl.h" #include "llaccordionctrltab.h" @@ -477,6 +477,12 @@ void LLTeleportHistoryPanel::onSearchEdit(const std::string& string) } // virtual +bool LLTeleportHistoryPanel::isSingleItemSelected() +{ + return mLastSelectedFlatlList && mLastSelectedFlatlList->getSelectedItem(); +} + +// virtual void LLTeleportHistoryPanel::onShowOnMap() { if (!mLastSelectedFlatlList) @@ -557,7 +563,6 @@ void LLTeleportHistoryPanel::updateVerbs() if (!mLastSelectedFlatlList) { mTeleportBtn->setEnabled(false); - mShowOnMapBtn->setEnabled(false); mShowProfile->setEnabled(false); return; } @@ -565,8 +570,8 @@ void LLTeleportHistoryPanel::updateVerbs() LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem()); mTeleportBtn->setEnabled(NULL != itemp); - mShowOnMapBtn->setEnabled(NULL != itemp); mShowProfile->setEnabled(NULL != itemp); + mShowOnMapBtn->setEnabled(true); } void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date) diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index a456ca506f..1f2be63dc2 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -77,6 +77,7 @@ public: /*virtual*/ void onTeleport(); ///*virtual*/ void onCopySLURL(); /*virtual*/ void updateVerbs(); + /*virtual*/ bool isSingleItemSelected(); private: @@ -123,4 +124,6 @@ private: LLHandle<LLView> mGearMenuHandle; }; + + #endif //LL_LLPANELTELEPORTHISTORY_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index c3748ca81d..daf116d255 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -37,6 +37,8 @@ #include "llavataractions.h" #include "llagent.h" +#include "llimview.h" +#include "llnotificationsutil.h" #include "llparticipantlist.h" #include "llspeakers.h" #include "llviewercontrol.h" @@ -95,7 +97,7 @@ public: void onChange() { uuid_set_t participant_uuids; - LLVoiceClient::getInstance()->getParticipantsUUIDSet(participant_uuids); + LLVoiceClient::getInstance()->getParticipantList(participant_uuids); // check whether Avaline caller exists among voice participants @@ -558,9 +560,8 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) } else { - LLVoiceClient::participantState *participant = LLVoiceClient::getInstance()->findParticipantByID(avatar_id); - - mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), participant ? participant->mAccountName : LLTrans::getString("AvatarNameWaiting")); + std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id); + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? display_name : LLTrans::getString("AvatarNameWaiting")); mAvalineUpdater->watchAvalineCaller(avatar_id); } adjustParticipant(avatar_id); @@ -674,12 +675,10 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const if (is_muted) { LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteSelected", false); - LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteOthers", false); } else { LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); - LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } } @@ -719,10 +718,26 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, { return; } + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)); + if (NULL == item) return; - name = speakerp->mDisplayName; + name = item->getAvatarName(); - LLMute mute(speaker_id, name, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + LLMute::EType mute_type; + switch (speakerp->mType) + { + case LLSpeaker::SPEAKER_AGENT: + mute_type = LLMute::AGENT; + break; + case LLSpeaker::SPEAKER_OBJECT: + mute_type = LLMute::OBJECT; + break; + case LLSpeaker::SPEAKER_EXTERNAL: + default: + mute_type = LLMute::EXTERNAL; + break; + } + LLMute mute(speaker_id, name, mute_type); if (!is_muted) { @@ -768,16 +783,17 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat if (!gAgent.getRegion()) return; bool moderate_selected = userdata.asString() == "selected"; - const LLUUID& selected_avatar_id = mUUIDs.front(); - bool is_muted = isMuted(selected_avatar_id); if (moderate_selected) { + const LLUUID& selected_avatar_id = mUUIDs.front(); + bool is_muted = isMuted(selected_avatar_id); moderateVoiceParticipant(selected_avatar_id, is_muted); } else { - moderateVoiceOtherParticipants(selected_avatar_id, is_muted); + bool unmute_all = userdata.asString() == "unmute_all"; + moderateVoiceOtherParticipants(LLUUID::null, unmute_all); } } @@ -795,10 +811,43 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); if (mgr) { + if (!unmute) + { + LLSD payload; + payload["session_id"] = mgr->getSessionID(); + payload["excluded_avatar_id"] = excluded_avatar_id; + LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback); + return; + } + mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); } } +// static +void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 1) + { + return; + } + + const LLSD& payload = notification["payload"]; + const LLUUID& session_id = payload["session_id"]; + const LLUUID& excluded_avatar_id = payload["excluded_avatar_id"]; + + LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> ( + LLIMModel::getInstance()->getSpeakerManager(session_id)); + if (speaker_manager) + { + speaker_manager->moderateVoiceOtherParticipants(excluded_avatar_id, false); + } + + return; +} + + bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); @@ -839,7 +888,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_call") { bool not_agent = mUUIDs.front() != gAgentID; - bool can_call = not_agent && LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking(); + bool can_call = not_agent && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); return can_call; } diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index bbef8baaac..abaf503868 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -216,6 +216,8 @@ class LLParticipantList * @see moderateVoiceParticipant() */ void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); + + static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); }; /** diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 75702dc8e5..fb7ac0d86b 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -35,6 +35,7 @@ #include "llpreviewnotecard.h" #include "llinventory.h" +#include "llinventoryfunctions.h" // for change_item_parent() #include "llagent.h" #include "llassetuploadresponders.h" @@ -92,11 +93,17 @@ BOOL LLPreviewNotecard::postBuild() childSetAction("Save", onClickSave, this); childSetVisible("lock", FALSE); + childSetAction("Delete", onClickDelete, this); + childSetEnabled("Delete", false); + const LLInventoryItem* item = getItem(); childSetCommitCallback("desc", LLPreview::onText, this); if (item) + { childSetText("desc", item->getDescription()); + childSetEnabled("Delete", true); + } childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe); return LLPreview::postBuild(); @@ -374,6 +381,17 @@ void LLPreviewNotecard::onClickSave(void* user_data) } } + +// static +void LLPreviewNotecard::onClickDelete(void* user_data) +{ + LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data; + if(preview) + { + preview->deleteNotecard(); + } +} + struct LLSaveNotecardInfo { LLPreviewNotecard* mSelf; @@ -466,6 +484,18 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) return true; } +void LLPreviewNotecard::deleteNotecard() +{ + LLViewerInventoryItem* item = gInventory.getItem(mItemUUID); + if (item != NULL) + { + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + change_item_parent(&gInventory, item, trash_id, FALSE); + } + + closeFloater(); +} + // static void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index e0363eef54..98de99aa33 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -83,6 +83,8 @@ protected: virtual void loadAsset(); bool saveIfNeeded(LLInventoryItem* copyitem = NULL); + void deleteNotecard(); + static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, @@ -90,6 +92,8 @@ protected: static void onClickSave(void* data); + static void onClickDelete(void* data); + static void onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index af440a3689..de1da248c1 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -706,6 +706,31 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id) } } +void LLScreenChannel::closeHiddenToasts(const Matcher& matcher) +{ + // since we can't guarantee that close toast operation doesn't change mToastList + // we collect matched toasts that should be closed into separate list + std::list<ToastElem> toasts; + for (std::vector<ToastElem>::iterator it = mToastList.begin(); it + != mToastList.end(); it++) + { + LLToast * toast = it->toast; + // add to list valid toast that match to provided matcher criteria + if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL + && !toast->getVisible() && matcher.matches(toast->getNotification())) + { + toasts.push_back(*it); + } + } + + // close collected toasts + for (std::list<ToastElem>::iterator it = toasts.begin(); it + != toasts.end(); it++) + { + it->toast->closeFloater(); + } +} + //-------------------------------------------------------------------------- void LLScreenChannel::removeToastsFromChannel() { diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 88053d87d9..46c5fed7b6 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -173,6 +173,12 @@ public: void hideToastsFromScreen(); // hide toast by notification id void hideToast(const LLUUID& notification_id); + + /** + * Closes hidden matched toasts from channel. + */ + void closeHiddenToasts(const Matcher& matcher); + // removes all toasts from a channel void removeToastsFromChannel(); // show all toasts in a channel diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index f35cb3516a..b68fc3b002 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -482,7 +482,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id) text = notification->getSubstitutions()["OBJECTNAME"].asString(); break; case LLScriptFloaterManager::OBJ_GIVE_INVENTORY: - text = notification->getSubstitutions()["NAME"].asString(); + text = notification->getSubstitutions()["OBJECTFROMNAME"].asString(); break; default: text = LLTrans::getString("object"); @@ -539,4 +539,14 @@ bool LLScriptFloaterManager::getFloaterPosition(const LLUUID& object_id, Floater return false; } +void LLScriptFloaterManager::setFloaterVisible(const LLUUID& notification_id, bool visible) +{ + LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>( + "script_floater", notification_id); + if(floater) + { + floater->setVisible(visible); + } +} + // EOF diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index ec3ec4b540..dc0cfc2400 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -99,6 +99,8 @@ public: bool getFloaterPosition(const LLUUID& object_id, FloaterPositionInfo& fpi); + void setFloaterVisible(const LLUUID& notification_id, bool visible); + protected: typedef std::map<std::string, EObjectType> object_type_map; diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp new file mode 100644 index 0000000000..89b799f297 --- /dev/null +++ b/indra/newview/llsecapi.cpp @@ -0,0 +1,194 @@ +/** + * @file llsecapi.cpp + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 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://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" +#include "llsecapi.h" +#include "llsechandler_basic.h" +#include <openssl/evp.h> +#include <openssl/err.h> +#include <map> +#include "llhttpclient.h" + + + +std::map<std::string, LLPointer<LLSecAPIHandler> > gHandlerMap; +LLPointer<LLSecAPIHandler> gSecAPIHandler; + +void initializeSecHandler() +{ + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); + + gHandlerMap[BASIC_SECHANDLER] = new LLSecAPIBasicHandler(); + + + // Currently, we only have the Basic handler, so we can point the main sechandler + // pointer to the basic handler. Later, we'll create a wrapper handler that + // selects the appropriate sechandler as needed, for instance choosing the + // mac keyring handler, with fallback to the basic sechandler + gSecAPIHandler = gHandlerMap[BASIC_SECHANDLER]; + + // initialize all SecAPIHandlers + LLProtectedDataException ex = LLProtectedDataException(""); + std::map<std::string, LLPointer<LLSecAPIHandler> >::const_iterator itr; + for(itr = gHandlerMap.begin(); itr != gHandlerMap.end(); ++itr) + { + LLPointer<LLSecAPIHandler> handler = (*itr).second; + try + { + handler->init(); + } + catch (LLProtectedDataException e) + { + ex = e; + } + } + if (ex.getMessage().length() > 0 ) // an exception was thrown. + { + throw ex; + } + +} +// start using a given security api handler. If the string is empty +// the default is used +LLPointer<LLSecAPIHandler> getSecHandler(const std::string& handler_type) +{ + if (gHandlerMap.find(handler_type) != gHandlerMap.end()) + { + return gHandlerMap[handler_type]; + } + else + { + return LLPointer<LLSecAPIHandler>(NULL); + } +} +// register a handler +void registerSecHandler(const std::string& handler_type, + LLPointer<LLSecAPIHandler>& handler) +{ + gHandlerMap[handler_type] = handler; +} + +std::ostream& operator <<(std::ostream& s, const LLCredential& cred) +{ + return s << (std::string)cred; +} + + +// secapiSSLCertVerifyCallback +// basic callback called when a cert verification is requested. +// calls SECAPI to validate the context +// not initialized in the above initialization function, due to unit tests +// see llappviewer + +int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param) +{ + LLURLRequest *req = (LLURLRequest *)param; + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(""); + LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx); + LLSD validation_params = LLSD::emptyMap(); + LLURI uri(req->getURL()); + validation_params[CERT_HOSTNAME] = uri.hostName(); + try + { + chain->validate(VALIDATION_POLICY_SSL, store, validation_params); + } + catch (LLCertValidationTrustException& cert_exception) + { + LL_WARNS("AppInit") << "Cert not trusted: " << cert_exception.getMessage() << LL_ENDL; + return 0; + } + catch (LLCertException& cert_exception) + { + LL_WARNS("AppInit") << "cert error " << cert_exception.getMessage() << LL_ENDL; + return 0; + } + catch (...) + { + LL_WARNS("AppInit") << "cert error " << LL_ENDL; + return 0; + } + return 1; +} + +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + try + { + if (mIdentifier["type"].asString() == "agent") + { + // legacy credential + result["passwd"] = "$1$" + mAuthenticator["secret"].asString(); + result["first"] = mIdentifier["first_name"]; + result["last"] = mIdentifier["last_name"]; + + } + else if (mIdentifier["type"].asString() == "account") + { + result["username"] = mIdentifier["account_name"]; + result["passwd"] = mAuthenticator["secret"]; + + } + } + catch (...) + { + // we could have corrupt data, so simply return a null login param if so + LL_WARNS("AppInit") << "Invalid credential" << LL_ENDL; + } + return result; +} + +void LLCredential::identifierType(std::string &idType) +{ + if(mIdentifier.has("type")) + { + idType = mIdentifier["type"].asString(); + } + else { + idType = std::string(); + + } +} + +void LLCredential::authenticatorType(std::string &idType) +{ + if(mAuthenticator.has("type")) + { + idType = mAuthenticator["type"].asString(); + } + else { + idType = std::string(); + + } +} diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h new file mode 100644 index 0000000000..59a1e1eff0 --- /dev/null +++ b/indra/newview/llsecapi.h @@ -0,0 +1,499 @@ +/** + * @file llsecapi.h + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 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://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLSECAPI_H +#define LLSECAPI_H +#include <vector> +#include <openssl/x509.h> +#include <ostream> + +#ifdef LL_WINDOWS +#pragma warning(disable:4250) +#endif // LL_WINDOWS + +// All error handling is via exceptions. + + +#define CERT_SUBJECT_NAME "subject_name" +#define CERT_ISSUER_NAME "issuer_name" +#define CERT_NAME_CN "commonName" + +#define CERT_SUBJECT_NAME_STRING "subject_name_string" +#define CERT_ISSUER_NAME_STRING "issuer_name_string" + +#define CERT_SERIAL_NUMBER "serial_number" + +#define CERT_VALID_FROM "valid_from" +#define CERT_VALID_TO "valid_to" +#define CERT_SHA1_DIGEST "sha1_digest" +#define CERT_MD5_DIGEST "md5_digest" +#define CERT_HOSTNAME "hostname" +#define CERT_BASIC_CONSTRAINTS "basicConstraints" +#define CERT_BASIC_CONSTRAINTS_CA "CA" +#define CERT_BASIC_CONSTRAINTS_PATHLEN "pathLen" + +#define CERT_KEY_USAGE "keyUsage" +#define CERT_KU_DIGITAL_SIGNATURE "digitalSignature" +#define CERT_KU_NON_REPUDIATION "nonRepudiation" +#define CERT_KU_KEY_ENCIPHERMENT "keyEncipherment" +#define CERT_KU_DATA_ENCIPHERMENT "dataEncipherment" +#define CERT_KU_KEY_AGREEMENT "keyAgreement" +#define CERT_KU_CERT_SIGN "certSigning" +#define CERT_KU_CRL_SIGN "crlSigning" +#define CERT_KU_ENCIPHER_ONLY "encipherOnly" +#define CERT_KU_DECIPHER_ONLY "decipherOnly" + +#define BASIC_SECHANDLER "BASIC_SECHANDLER" +#define CERT_VALIDATION_DATE "validation_date" + +#define CERT_EXTENDED_KEY_USAGE "extendedKeyUsage" +#define CERT_EKU_SERVER_AUTH SN_server_auth + +#define CERT_SUBJECT_KEY_IDENTFIER "subjectKeyIdentifier" +#define CERT_AUTHORITY_KEY_IDENTIFIER "authorityKeyIdentifier" +#define CERT_AUTHORITY_KEY_IDENTIFIER_ID "authorityKeyIdentifierId" +#define CERT_AUTHORITY_KEY_IDENTIFIER_NAME "authorityKeyIdentifierName" +#define CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL "authorityKeyIdentifierSerial" + +// validate the current time lies within +// the validation period of the cert +#define VALIDATION_POLICY_TIME 1 + +// validate that the CA, or some cert in the chain +// lies within the certificate store +#define VALIDATION_POLICY_TRUSTED 2 + +// validate that the subject name of +// the cert contains the passed in hostname +// or validates against the hostname +#define VALIDATION_POLICY_HOSTNAME 4 + + +// validate that the cert contains the SSL EKU +#define VALIDATION_POLICY_SSL_KU 8 + +// validate that the cert contains the SSL EKU +#define VALIDATION_POLICY_CA_KU 16 + +#define VALIDATION_POLICY_CA_BASIC_CONSTRAINTS 32 + +// validate that the cert is correct for SSL +#define VALIDATION_POLICY_SSL (VALIDATION_POLICY_TIME | \ + VALIDATION_POLICY_HOSTNAME | \ + VALIDATION_POLICY_TRUSTED | \ + VALIDATION_POLICY_SSL_KU | \ + VALIDATION_POLICY_CA_BASIC_CONSTRAINTS | \ + VALIDATION_POLICY_CA_KU) + + + + + + +class LLProtectedDataException +{ +public: + LLProtectedDataException(const char *msg) + { + LL_WARNS("SECAPI") << "Protected Data Error: " << (std::string)msg << LL_ENDL; + mMsg = (std::string)msg; + } + std::string getMessage() { return mMsg; } +protected: + std::string mMsg; +}; + +// class LLCertificate +// parent class providing an interface for certifiate. +// LLCertificates are considered unmodifiable +// Certificates are pulled out of stores, or created via +// factory calls +class LLCertificate : public LLRefCount +{ + LOG_CLASS(LLCertificate); +public: + LLCertificate() {} + + virtual ~LLCertificate() {} + + // return a PEM encoded certificate. The encoding + // includes the -----BEGIN CERTIFICATE----- and end certificate elements + virtual std::string getPem() const=0; + + // return a DER encoded certificate + virtual std::vector<U8> getBinary() const=0; + + // return an LLSD object containing information about the certificate + // such as its name, signature, expiry time, serial number + virtual LLSD getLLSD() const=0; + + // return an openSSL X509 struct for the certificate + virtual X509* getOpenSSLX509() const=0; + +}; + +// class LLCertificateVector +// base class for a list of certificates. + + +class LLCertificateVector : public LLRefCount +{ + +public: + + LLCertificateVector() {}; + virtual ~LLCertificateVector() {}; + + // base iterator implementation class, providing + // the functionality needed for the iterator class. + class iterator_impl : public LLRefCount + { + public: + iterator_impl() {}; + virtual ~iterator_impl() {}; + virtual void seek(bool incr)=0; + virtual LLPointer<iterator_impl> clone() const=0; + virtual bool equals(const LLPointer<iterator_impl>& _iter) const=0; + virtual LLPointer<LLCertificate> get()=0; + }; + + // iterator class + class iterator + { + public: + iterator(LLPointer<iterator_impl> impl) : mImpl(impl) {} + iterator() : mImpl(NULL) {} + iterator(const iterator& _iter) {mImpl = _iter.mImpl->clone(); } + ~iterator() {} + iterator& operator++() { if(mImpl.notNull()) mImpl->seek(true); return *this;} + iterator& operator--() { if(mImpl.notNull()) mImpl->seek(false); return *this;} + + iterator operator++(int) { iterator result = *this; if(mImpl.notNull()) mImpl->seek(true); return result;} + iterator operator--(int) { iterator result = *this; if(mImpl.notNull()) mImpl->seek(false); return result;} + LLPointer<LLCertificate> operator*() { return mImpl->get(); } + + LLPointer<iterator_impl> mImpl; + protected: + friend bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs); + bool equals(const iterator& _iter) const { return mImpl->equals(_iter.mImpl); } + }; + + // numeric indexer + virtual LLPointer<LLCertificate> operator[](int)=0; + + // Iteration + virtual iterator begin()=0; + + virtual iterator end()=0; + + // find a cert given params + virtual iterator find(const LLSD& params) =0; + + // return the number of certs in the store + virtual int size() const = 0; + + // append the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void add(LLPointer<LLCertificate> cert)=0; + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void insert(iterator location, LLPointer<LLCertificate> cert)=0; + + // remove a certificate from the store + virtual LLPointer<LLCertificate> erase(iterator cert)=0; +}; + + +// class LLCertificateStore +// represents a store of certificates, typically a store of root CA +// certificates. The store can be persisted, and can be used to validate +// a cert chain +// +class LLCertificateStore : virtual public LLCertificateVector +{ + +public: + + LLCertificateStore() {} + virtual ~LLCertificateStore() {} + + // persist the store + virtual void save()=0; + + // return the store id + virtual std::string storeId() const=0; +}; + +// class LLCertificateChain +// Class representing a chain of certificates in order, with the +// first element being the child cert. +class LLCertificateChain : virtual public LLCertificateVector +{ + +public: + LLCertificateChain() {} + + virtual ~LLCertificateChain() {} + + // validate a certificate chain given the params. + // Will throw exceptions on error + + virtual void validate(int validation_policy, + LLPointer<LLCertificateStore> ca_store, + const LLSD& validation_params) =0; +}; + + + + +inline +bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs) +{ + return _lhs.equals(_rhs); +} +inline +bool operator!=(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs) +{ + return !(_lhs == _rhs); +} + + +#define CRED_IDENTIFIER_TYPE_ACCOUNT "account" +#define CRED_IDENTIFIER_TYPE_AGENT "agent" +#define CRED_AUTHENTICATOR_TYPE_CLEAR "clear" +#define CRED_AUTHENTICATOR_TYPE_HASH "hash" +// +// LLCredential - interface for credentials providing the following functionality: +// * persistance of credential information based on grid (for saving username/password) +// * serialization to an OGP identifier/authenticator pair +// +class LLCredential : public LLRefCount +{ +public: + + LLCredential() {} + + LLCredential(const std::string& grid) + { + mGrid = grid; + mIdentifier = LLSD::emptyMap(); + mAuthenticator = LLSD::emptyMap(); + } + + virtual ~LLCredential() {} + + virtual void setCredentialData(const LLSD& identifier, const LLSD& authenticator) + { + mIdentifier = identifier; + mAuthenticator = authenticator; + } + virtual LLSD getIdentifier() { return mIdentifier; } + virtual void identifierType(std::string& idType); + virtual LLSD getAuthenticator() { return mAuthenticator; } + virtual void authenticatorType(std::string& authType); + virtual LLSD getLoginParams(); + virtual std::string getGrid() { return mGrid; } + + + virtual void clearAuthenticator() { mAuthenticator = LLSD(); } + virtual std::string userID() const { return std::string("unknown");} + virtual std::string asString() const { return std::string("unknown");} + operator std::string() const { return asString(); } +protected: + LLSD mIdentifier; + LLSD mAuthenticator; + std::string mGrid; +}; + +std::ostream& operator <<(std::ostream& s, const LLCredential& cred); + + +// All error handling is via exceptions. + +class LLCertException +{ +public: + LLCertException(LLPointer<LLCertificate> cert, const char* msg) + { + + mCert = cert; + + LL_WARNS("SECAPI") << "Certificate Error: " << (std::string)msg << LL_ENDL; + mMsg = (std::string)msg; + } + LLPointer<LLCertificate> getCert() { return mCert; } + std::string getMessage() { return mMsg; } +protected: + LLPointer<LLCertificate> mCert; + std::string mMsg; +}; + +class LLInvalidCertificate : public LLCertException +{ +public: + LLInvalidCertificate(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalid") + { + } +protected: +}; + +class LLCertValidationTrustException : public LLCertException +{ +public: + LLCertValidationTrustException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertUntrusted") + { + } +protected: +}; + +class LLCertValidationHostnameException : public LLCertException +{ +public: + LLCertValidationHostnameException(std::string hostname, + LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidHostname") + { + mHostname = hostname; + } + + std::string getHostname() { return mHostname; } +protected: + std::string mHostname; +}; + +class LLCertValidationExpirationException : public LLCertException +{ +public: + LLCertValidationExpirationException(LLPointer<LLCertificate> cert, + LLDate current_time) : LLCertException(cert, "CertExpired") + { + mTime = current_time; + } + LLDate GetTime() { return mTime; } +protected: + LLDate mTime; +}; + +class LLCertKeyUsageValidationException : public LLCertException +{ +public: + LLCertKeyUsageValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertKeyUsage") + { + } +protected: +}; + +class LLCertBasicConstraintsValidationException : public LLCertException +{ +public: + LLCertBasicConstraintsValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertBasicConstraints") + { + } +protected: +}; + +class LLCertValidationInvalidSignatureException : public LLCertException +{ +public: + LLCertValidationInvalidSignatureException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidSignature") + { + } +protected: +}; + +// LLSecAPIHandler Class +// Interface handler class for the various security storage handlers. +class LLSecAPIHandler : public LLRefCount +{ +public: + + + LLSecAPIHandler() {} + virtual ~LLSecAPIHandler() {} + + // initialize the SecAPIHandler + virtual void init() {}; + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert)=0; + + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert)=0; + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain)=0; + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id)=0; + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data)=0; + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id)=0; + + // delete a protected data item from the store + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id)=0; + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator)=0; + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid)=0; + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator)=0; + + virtual void deleteCredential(LLPointer<LLCredential> cred)=0; + +}; + +void initializeSecHandler(); + +// retrieve a security api depending on the api type +LLPointer<LLSecAPIHandler> getSecHandler(const std::string& handler_type); + +void registerSecHandler(const std::string& handler_type, + LLPointer<LLSecAPIHandler>& handler); + +extern LLPointer<LLSecAPIHandler> gSecAPIHandler; + + +int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param); + + +#endif // LL_SECAPI_H diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp new file mode 100644 index 0000000000..df55ccf142 --- /dev/null +++ b/indra/newview/llsechandler_basic.cpp @@ -0,0 +1,1612 @@ +/** + * @file llsechandler_basic.cpp + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-2000, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * +LLS * 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 "llsecapi.h" +#include "llsechandler_basic.h" +#include "llsdserialize.h" +#include "llviewernetwork.h" +#include "llxorcipher.h" +#include "llfile.h" +#include "lldir.h" +#include "llviewercontrol.h" +#include <vector> +#include <ios> +#include <openssl/ossl_typ.h> +#include <openssl/x509.h> +#include <openssl/x509v3.h> +#include <openssl/pem.h> +#include <openssl/asn1.h> +#include <openssl/rand.h> +#include <openssl/err.h> +#include <iostream> +#include <iomanip> +#include <time.h> + + + +// 128 bits of salt data... +#define STORE_SALT_SIZE 16 +#define BUFFER_READ_SIZE 256 +std::string cert_string_from_asn1_string(ASN1_STRING* value); +std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value); + +LLSD _basic_constraints_ext(X509* cert); +LLSD _key_usage_ext(X509* cert); +LLSD _ext_key_usage_ext(X509* cert); +LLSD _subject_key_identifier_ext(X509 *cert); +LLSD _authority_key_identifier_ext(X509* cert); + +LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert) +{ + + // BIO_new_mem_buf returns a read only bio, but takes a void* which isn't const + // so we need to cast it. + BIO * pem_bio = BIO_new_mem_buf((void*)pem_cert.c_str(), pem_cert.length()); + if(pem_bio == NULL) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + throw LLInvalidCertificate(this); + } + mCert = NULL; + PEM_read_bio_X509(pem_bio, &mCert, 0, NULL); + BIO_free(pem_bio); + if (!mCert) + { + throw LLInvalidCertificate(this); + } + _initLLSD(); +} + + +LLBasicCertificate::LLBasicCertificate(X509* pCert) +{ + if (!pCert || !pCert->cert_info) + { + throw LLInvalidCertificate(this); + } + mCert = X509_dup(pCert); + _initLLSD(); +} + +LLBasicCertificate::~LLBasicCertificate() +{ + if(mCert) + { + X509_free(mCert); + } +} + +// +// retrieve the pem using the openssl functionality +std::string LLBasicCertificate::getPem() const +{ + char * pem_bio_chars = NULL; + // a BIO is the equivalent of a 'std::stream', and + // can be a file, mem stream, whatever. Grab a memory based + // BIO for the result + BIO *pem_bio = BIO_new(BIO_s_mem()); + if (!pem_bio) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + return std::string(); + } + PEM_write_bio_X509(pem_bio, mCert); + int length = BIO_get_mem_data(pem_bio, &pem_bio_chars); + std::string result = std::string(pem_bio_chars, length); + BIO_free(pem_bio); + return result; +} + +// get the DER encoding for the cert +// DER is a binary encoding format for certs... +std::vector<U8> LLBasicCertificate::getBinary() const +{ + U8 * der_bio_data = NULL; + // get a memory bio + BIO *der_bio = BIO_new(BIO_s_mem()); + if (!der_bio) + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + return std::vector<U8>(); + } + i2d_X509_bio(der_bio, mCert); + int length = BIO_get_mem_data(der_bio, &der_bio_data); + std::vector<U8> result(length); + // vectors are guranteed to be a contiguous chunk of memory. + memcpy(&result[0], der_bio_data, length); + BIO_free(der_bio); + return result; +} + + +LLSD LLBasicCertificate::getLLSD() const +{ + return mLLSDInfo; +} + +// Initialize the LLSD info for the certificate +LLSD& LLBasicCertificate::_initLLSD() +{ + + // call the various helpers to build the LLSD + mLLSDInfo[CERT_SUBJECT_NAME] = cert_name_from_X509_NAME(X509_get_subject_name(mCert)); + mLLSDInfo[CERT_ISSUER_NAME] = cert_name_from_X509_NAME(X509_get_issuer_name(mCert)); + mLLSDInfo[CERT_SUBJECT_NAME_STRING] = cert_string_name_from_X509_NAME(X509_get_subject_name(mCert)); + mLLSDInfo[CERT_ISSUER_NAME_STRING] = cert_string_name_from_X509_NAME(X509_get_issuer_name(mCert)); + ASN1_INTEGER *sn = X509_get_serialNumber(mCert); + if (sn != NULL) + { + mLLSDInfo[CERT_SERIAL_NUMBER] = cert_string_from_asn1_integer(sn); + } + + mLLSDInfo[CERT_VALID_TO] = cert_date_from_asn1_time(X509_get_notAfter(mCert)); + mLLSDInfo[CERT_VALID_FROM] = cert_date_from_asn1_time(X509_get_notBefore(mCert)); + mLLSDInfo[CERT_SHA1_DIGEST] = cert_get_digest("sha1", mCert); + mLLSDInfo[CERT_MD5_DIGEST] = cert_get_digest("md5", mCert); + // add the known extensions + mLLSDInfo[CERT_BASIC_CONSTRAINTS] = _basic_constraints_ext(mCert); + mLLSDInfo[CERT_KEY_USAGE] = _key_usage_ext(mCert); + mLLSDInfo[CERT_EXTENDED_KEY_USAGE] = _ext_key_usage_ext(mCert); + mLLSDInfo[CERT_SUBJECT_KEY_IDENTFIER] = _subject_key_identifier_ext(mCert); + mLLSDInfo[CERT_AUTHORITY_KEY_IDENTIFIER] = _authority_key_identifier_ext(mCert); + return mLLSDInfo; +} + +// Retrieve the basic constraints info +LLSD _basic_constraints_ext(X509* cert) +{ + LLSD result; + BASIC_CONSTRAINTS *bs = (BASIC_CONSTRAINTS *)X509_get_ext_d2i(cert, NID_basic_constraints, NULL, NULL); + if(bs) + { + result = LLSD::emptyMap(); + // Determines whether the cert can be used as a CA + result[CERT_BASIC_CONSTRAINTS_CA] = (bool)bs->ca; + + if(bs->pathlen) + { + // the pathlen determines how deep a certificate chain can be from + // this CA + if((bs->pathlen->type == V_ASN1_NEG_INTEGER) + || !bs->ca) + { + result[CERT_BASIC_CONSTRAINTS_PATHLEN] = 0; + } + else + { + result[CERT_BASIC_CONSTRAINTS_PATHLEN] = (int)ASN1_INTEGER_get(bs->pathlen); + } + } + + } + return result; +} + +// retrieve the key usage, which specifies how the cert can be used. +// +LLSD _key_usage_ext(X509* cert) +{ + LLSD result; + ASN1_STRING *usage_str = (ASN1_STRING *)X509_get_ext_d2i(cert, NID_key_usage, NULL, NULL); + if(usage_str) + { + result = LLSD::emptyArray(); + long usage = 0; + if(usage_str->length > 0) + { + usage = usage_str->data[0]; + if(usage_str->length > 1) + { + usage |= usage_str->data[1] << 8; + } + } + ASN1_STRING_free(usage_str); + if(usage) + { + if(usage & KU_DIGITAL_SIGNATURE) result.append(LLSD((std::string)CERT_KU_DIGITAL_SIGNATURE)); + if(usage & KU_NON_REPUDIATION) result.append(LLSD((std::string)CERT_KU_NON_REPUDIATION)); + if(usage & KU_KEY_ENCIPHERMENT) result.append(LLSD((std::string)CERT_KU_KEY_ENCIPHERMENT)); + if(usage & KU_DATA_ENCIPHERMENT) result.append(LLSD((std::string)CERT_KU_DATA_ENCIPHERMENT)); + if(usage & KU_KEY_AGREEMENT) result.append(LLSD((std::string)CERT_KU_KEY_AGREEMENT)); + if(usage & KU_KEY_CERT_SIGN) result.append(LLSD((std::string)CERT_KU_CERT_SIGN)); + if(usage & KU_CRL_SIGN) result.append(LLSD((std::string)CERT_KU_CRL_SIGN)); + if(usage & KU_ENCIPHER_ONLY) result.append(LLSD((std::string)CERT_KU_ENCIPHER_ONLY)); + if(usage & KU_DECIPHER_ONLY) result.append(LLSD((std::string)CERT_KU_DECIPHER_ONLY)); + } + } + return result; +} + +// retrieve the extended key usage for the cert +LLSD _ext_key_usage_ext(X509* cert) +{ + LLSD result; + EXTENDED_KEY_USAGE *eku = (EXTENDED_KEY_USAGE *)X509_get_ext_d2i(cert, NID_ext_key_usage, NULL, NULL); + if(eku) + { + result = LLSD::emptyArray(); + while(sk_ASN1_OBJECT_num(eku)) + { + ASN1_OBJECT *usage = sk_ASN1_OBJECT_pop(eku); + if(usage) + { + int nid = OBJ_obj2nid(usage); + if (nid) + { + std::string sn = OBJ_nid2sn(nid); + result.append(sn); + } + ASN1_OBJECT_free(usage); + } + } + } + return result; +} + +// retrieve the subject key identifier of the cert +LLSD _subject_key_identifier_ext(X509 *cert) +{ + LLSD result; + ASN1_OCTET_STRING *skeyid = (ASN1_OCTET_STRING *)X509_get_ext_d2i(cert, NID_subject_key_identifier, NULL, NULL); + if(skeyid) + { + result = cert_string_from_octet_string(skeyid); + } + return result; +} + +// retrieve the authority key identifier of the cert +LLSD _authority_key_identifier_ext(X509* cert) +{ + LLSD result; + AUTHORITY_KEYID *akeyid = (AUTHORITY_KEYID *)X509_get_ext_d2i(cert, NID_authority_key_identifier, NULL, NULL); + if(akeyid) + { + result = LLSD::emptyMap(); + if(akeyid->keyid) + { + result[CERT_AUTHORITY_KEY_IDENTIFIER_ID] = cert_string_from_octet_string(akeyid->keyid); + } + if(akeyid->serial) + { + result[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL] = cert_string_from_asn1_integer(akeyid->serial); + } + } + + // we ignore the issuer name in the authority key identifier, we check the issue name via + // the the issuer name entry in the cert. + + + return result; +} + +// retrieve an openssl x509 object, +// which must be freed by X509_free +X509* LLBasicCertificate::getOpenSSLX509() const +{ + return X509_dup(mCert); +} + +// generate a single string containing the subject or issuer +// name of the cert. +std::string cert_string_name_from_X509_NAME(X509_NAME* name) +{ + char * name_bio_chars = NULL; + // get a memory bio + BIO *name_bio = BIO_new(BIO_s_mem()); + // stream the name into the bio. The name will be in the 'short name' format + X509_NAME_print_ex(name_bio, name, 0, XN_FLAG_RFC2253); + int length = BIO_get_mem_data(name_bio, &name_bio_chars); + std::string result = std::string(name_bio_chars, length); + BIO_free(name_bio); + return result; +} + +// generate an LLSD from a certificate name (issuer or subject name). +// the name will be strings indexed by the 'long form' +LLSD cert_name_from_X509_NAME(X509_NAME* name) +{ + LLSD result = LLSD::emptyMap(); + int name_entries = X509_NAME_entry_count(name); + for (int entry_index=0; entry_index < name_entries; entry_index++) + { + char buffer[32]; + X509_NAME_ENTRY *entry = X509_NAME_get_entry(name, entry_index); + + std::string name_value = std::string((const char*)M_ASN1_STRING_data(X509_NAME_ENTRY_get_data(entry)), + M_ASN1_STRING_length(X509_NAME_ENTRY_get_data(entry))); + + ASN1_OBJECT* name_obj = X509_NAME_ENTRY_get_object(entry); + OBJ_obj2txt(buffer, sizeof(buffer), name_obj, 0); + std::string obj_buffer_str = std::string(buffer); + result[obj_buffer_str] = name_value; + } + + return result; +} + +// Generate a string from an ASN1 integer. ASN1 Integers are +// bignums, so they can be 'infinitely' long, therefore we +// cannot simply use a conversion to U64 or something. +// We retrieve as a readable string for UI + +std::string cert_string_from_asn1_integer(ASN1_INTEGER* value) +{ + std::string result; + BIGNUM *bn = ASN1_INTEGER_to_BN(value, NULL); + if(bn) + { + char * ascii_bn = BN_bn2hex(bn); + + if(ascii_bn) + { + result = ascii_bn; + OPENSSL_free(ascii_bn); + } + BN_free(bn); + } + return result; +} + +// Generate a string from an OCTET string. +// we retrieve as a + +std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value) +{ + + std::stringstream result; + result << std::hex << std::setprecision(2); + for (int i=0; i < value->length; i++) + { + if (i != 0) + { + result << ":"; + } + result << std::setfill('0') << std::setw(2) << (int)value->data[i]; + } + return result.str(); +} + +// Generate a string from an ASN1 integer. ASN1 Integers are +// bignums, so they can be 'infinitely' long, therefore we +// cannot simply use a conversion to U64 or something. +// We retrieve as a readable string for UI + +std::string cert_string_from_asn1_string(ASN1_STRING* value) +{ + char * string_bio_chars = NULL; + std::string result; + // get a memory bio + BIO *string_bio = BIO_new(BIO_s_mem()); + if(!string_bio) + { + // stream the name into the bio. The name will be in the 'short name' format + ASN1_STRING_print_ex(string_bio, value, ASN1_STRFLGS_RFC2253); + int length = BIO_get_mem_data(string_bio, &string_bio_chars); + result = std::string(string_bio_chars, length); + BIO_free(string_bio); + } + else + { + LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL; + } + + return result; +} + +// retrieve a date structure from an ASN1 time, for +// validity checking. +LLDate cert_date_from_asn1_time(ASN1_TIME* asn1_time) +{ + + struct tm timestruct = {0}; + int i = asn1_time->length; + + if (i < 10) + { + return LLDate(); + } + // convert the date from the ASN1 time (which is a string in ZULU time), to + // a timeval. + timestruct.tm_year = (asn1_time->data[0]-'0') * 10 + (asn1_time->data[1]-'0'); + + /* Deal with Year 2000 */ + if (timestruct.tm_year < 70) + timestruct.tm_year += 100; + + timestruct.tm_mon = (asn1_time->data[2]-'0') * 10 + (asn1_time->data[3]-'0') - 1; + timestruct.tm_mday = (asn1_time->data[4]-'0') * 10 + (asn1_time->data[5]-'0'); + timestruct.tm_hour = (asn1_time->data[6]-'0') * 10 + (asn1_time->data[7]-'0'); + timestruct.tm_min = (asn1_time->data[8]-'0') * 10 + (asn1_time->data[9]-'0'); + timestruct.tm_sec = (asn1_time->data[10]-'0') * 10 + (asn1_time->data[11]-'0'); + +#if LL_WINDOWS + return LLDate((F64)_mkgmtime(×truct)); +#else // LL_WINDOWS + return LLDate((F64)timegm(×truct)); +#endif // LL_WINDOWS +} + + +// Generate a string containing a digest. The digest time is 'ssh1' or +// 'md5', and the resulting string is of the form "aa:12:5c:' and so on +std::string cert_get_digest(const std::string& digest_type, X509 *cert) +{ + unsigned char digest_data[BUFFER_READ_SIZE]; + unsigned int len = sizeof(digest_data); + std::stringstream result; + const EVP_MD* digest = NULL; + // we could use EVP_get_digestbyname, but that requires initializer code which + // would require us to complicate things by plumbing it into the system. + if (digest_type == "md5") + { + digest = EVP_md5(); + } + else if (digest_type == "sha1") + { + digest = EVP_sha1(); + } + else + { + return std::string(); + } + + X509_digest(cert, digest, digest_data, &len); + result << std::hex << std::setprecision(2); + for (unsigned int i=0; i < len; i++) + { + if (i != 0) + { + result << ":"; + } + result << std::setfill('0') << std::setw(2) << (int)digest_data[i]; + } + return result.str(); +} + + +// class LLBasicCertificateVector +// This class represents a list of certificates, implemented by a vector of certificate pointers. +// it contains implementations of the virtual functions for iterators, search, add, remove, etc. +// + +// Find a certificate in the list. +// It will find a cert that has minimally the params listed, with the values being the same +LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& params) +{ + BOOL found = FALSE; + // loop through the entire vector comparing the values in the certs + // against those passed in via the params. + // params should be a map. Only the items specified in the map will be + // checked, but they must match exactly, even if they're maps or arrays. + + for(iterator cert = begin(); + cert != end(); + cert++) + { + + found= TRUE; + LLSD cert_info = (*cert)->getLLSD(); + for (LLSD::map_const_iterator param = params.beginMap(); + param != params.endMap(); + param++) + { + + if (!cert_info.has((std::string)param->first) || + (!valueCompareLLSD(cert_info[(std::string)param->first], param->second))) + { + found = FALSE; + break; + } + } + if (found) + { + return (cert); + } + } + return end(); +} + +// Insert a certificate into the store. If the certificate already +// exists in the store, nothing is done. +void LLBasicCertificateVector::insert(iterator _iter, + LLPointer<LLCertificate> cert) +{ + LLSD cert_info = cert->getLLSD(); + if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST)) + { + LLSD existing_cert_info = LLSD::emptyMap(); + existing_cert_info[CERT_MD5_DIGEST] = cert_info[CERT_MD5_DIGEST]; + if(find(existing_cert_info) == end()) + { + BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get()); + mCerts.insert(basic_iter->mIter, cert); + } + } +} + +// remove a certificate from the store +LLPointer<LLCertificate> LLBasicCertificateVector::erase(iterator _iter) +{ + + if (_iter != end()) + { + BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get()); + LLPointer<LLCertificate> result = (*_iter); + mCerts.erase(basic_iter->mIter); + return result; + } + return NULL; +} + + +// +// LLBasicCertificateStore +// This class represents a store of CA certificates. The basic implementation +// uses a pem file such as the legacy CA.pem stored in the existing +// SL implementation. +LLBasicCertificateStore::LLBasicCertificateStore(const std::string& filename) +{ + mFilename = filename; + load_from_file(filename); +} + +void LLBasicCertificateStore::load_from_file(const std::string& filename) +{ + // scan the PEM file extracting each certificate + BIO* file_bio = BIO_new(BIO_s_file()); + if(file_bio) + { + if (BIO_read_filename(file_bio, filename.c_str()) > 0) + { + X509 *cert_x509 = NULL; + while((PEM_read_bio_X509(file_bio, &cert_x509, 0, NULL)) && + (cert_x509 != NULL)) + { + try + { + add(new LLBasicCertificate(cert_x509)); + } + catch (...) + { + LL_WARNS("SECAPI") << "Failure creating certificate from the certificate store file." << LL_ENDL; + } + X509_free(cert_x509); + cert_x509 = NULL; + } + BIO_free(file_bio); + } + } + else + { + LL_WARNS("SECAPI") << "Could not allocate a file BIO" << LL_ENDL; + } +} + + +LLBasicCertificateStore::~LLBasicCertificateStore() +{ +} + + +// persist the store +void LLBasicCertificateStore::save() +{ + llofstream file_store(mFilename, llofstream::binary); + if(!file_store.fail()) + { + for(iterator cert = begin(); + cert != end(); + cert++) + { + std::string pem = (*cert)->getPem(); + if(!pem.empty()) + { + file_store << (*cert)->getPem() << std::endl; + } + } + file_store.close(); + } + else + { + LL_WARNS("SECAPI") << "Could not open certificate store " << mFilename << "for save" << LL_ENDL; + } +} + +// return the store id +std::string LLBasicCertificateStore::storeId() const +{ + // this is the basic handler which uses the CA.pem store, + // so we ignore this. + return std::string(""); +} + + +// +// LLBasicCertificateChain +// This class represents a chain of certs, each cert being signed by the next cert +// in the chain. Certs must be properly signed by the parent +LLBasicCertificateChain::LLBasicCertificateChain(const X509_STORE_CTX* store) +{ + + // we're passed in a context, which contains a cert, and a blob of untrusted + // certificates which compose the chain. + if((store == NULL) || (store->cert == NULL)) + { + LL_WARNS("SECAPI") << "An invalid store context was passed in when trying to create a certificate chain" << LL_ENDL; + return; + } + // grab the child cert + LLPointer<LLCertificate> current = new LLBasicCertificate(store->cert); + + add(current); + if(store->untrusted != NULL) + { + // if there are other certs in the chain, we build up a vector + // of untrusted certs so we can search for the parents of each + // consecutive cert. + LLBasicCertificateVector untrusted_certs; + for(int i = 0; i < sk_X509_num(store->untrusted); i++) + { + LLPointer<LLCertificate> cert = new LLBasicCertificate(sk_X509_value(store->untrusted, i)); + untrusted_certs.add(cert); + + } + while(untrusted_certs.size() > 0) + { + LLSD find_data = LLSD::emptyMap(); + LLSD cert_data = current->getLLSD(); + // we simply build the chain via subject/issuer name as the + // client should not have passed in multiple CA's with the same + // subject name. If they did, it'll come out in the wash during + // validation. + find_data[CERT_SUBJECT_NAME_STRING] = cert_data[CERT_ISSUER_NAME_STRING]; + LLBasicCertificateVector::iterator issuer = untrusted_certs.find(find_data); + if (issuer != untrusted_certs.end()) + { + current = untrusted_certs.erase(issuer); + add(current); + } + else + { + break; + } + } + } +} + + +// subdomain wildcard specifiers can be divided into 3 parts +// the part before the first *, the part after the first * but before +// the second *, and the part after the second *. +// It then iterates over the second for each place in the string +// that it matches. ie if the subdomain was testfoofoobar, and +// the wildcard was test*foo*bar, it would match test, then +// recursively match foofoobar and foobar + +bool _cert_subdomain_wildcard_match(const std::string& subdomain, + const std::string& wildcard) +{ + // split wildcard into the portion before the *, and the portion after + + int wildcard_pos = wildcard.find_first_of('*'); + // check the case where there is no wildcard. + if(wildcard_pos == wildcard.npos) + { + return (subdomain == wildcard); + } + + // we need to match the first part of the subdomain string up to the wildcard + // position + if(subdomain.substr(0, wildcard_pos) != wildcard.substr(0, wildcard_pos)) + { + // the first portions of the strings didn't match + return FALSE; + } + + // as the portion of the wildcard string before the * matched, we need to check the + // portion afterwards. Grab that portion. + std::string new_wildcard_string = wildcard.substr( wildcard_pos+1, wildcard.npos); + if(new_wildcard_string.empty()) + { + // we had nothing after the *, so it's an automatic match + return TRUE; + } + + // grab the portion of the remaining wildcard string before the next '*'. We need to find this + // within the remaining subdomain string. and then recursively check. + std::string new_wildcard_match_string = new_wildcard_string.substr(0, new_wildcard_string.find_first_of('*')); + + // grab the portion of the subdomain after the part that matched the initial wildcard portion + std::string new_subdomain = subdomain.substr(wildcard_pos, subdomain.npos); + + // iterate through the current subdomain, finding instances of the match string. + int sub_pos = new_subdomain.find_first_of(new_wildcard_match_string); + while(sub_pos != std::string::npos) + { + new_subdomain = new_subdomain.substr(sub_pos, std::string::npos); + if(_cert_subdomain_wildcard_match(new_subdomain, new_wildcard_string)) + { + return TRUE; + } + sub_pos = new_subdomain.find_first_of(new_wildcard_match_string, 1); + + + } + // didn't find any instances of the match string that worked in the subdomain, so fail. + return FALSE; +} + + +// RFC2459 does not address wildcards as part of it's name matching +// specification, and there is no RFC specifying wildcard matching, +// RFC2818 does a few statements about wildcard matching, but is very +// general. Generally, wildcard matching is per implementation, although +// it's pretty similar. +// in our case, we use the '*' wildcard character only, within each +// subdomain. The hostname and the CN specification should have the +// same number of subdomains. +// We then iterate that algorithm over each subdomain. +bool _cert_hostname_wildcard_match(const std::string& hostname, const std::string& common_name) +{ + std::string new_hostname = hostname; + std::string new_cn = common_name; + + // find the last '.' in the hostname and the match name. + int subdomain_pos = new_hostname.find_last_of('.'); + int subcn_pos = new_cn.find_last_of('.'); + + // if the last char is a '.', strip it + if(subdomain_pos == (new_hostname.length()-1)) + { + new_hostname = new_hostname.substr(0, subdomain_pos); + subdomain_pos = new_hostname.find_last_of('.'); + } + if(subcn_pos == (new_cn.length()-1)) + { + new_cn = new_cn.substr(0, subcn_pos); + subcn_pos = new_cn.find_last_of('.'); + } + + // Check to see if there are any further '.' in the string. + while((subcn_pos != std::string::npos) && (subdomain_pos != std::string::npos)) + { + // snip out last subdomain in both the match string and the hostname + // The last bit for 'my.current.host.com' would be 'com' + std::string cn_part = new_cn.substr(subcn_pos+1, std::string::npos); + std::string hostname_part = new_hostname.substr(subdomain_pos+1, std::string::npos); + + if(!_cert_subdomain_wildcard_match(new_hostname.substr(subdomain_pos+1, std::string::npos), + cn_part)) + { + return FALSE; + } + new_hostname = new_hostname.substr(0, subdomain_pos); + new_cn = new_cn.substr(0, subcn_pos); + subdomain_pos = new_hostname.find_last_of('.'); + subcn_pos = new_cn.find_last_of('.'); + } + // check to see if the most significant portion of the common name is '*'. If so, we can + // simply return success as child domains are also matched. + if(new_cn == "*") + { + // if it's just a '*' we support all child domains as well, so '*. + return TRUE; + } + + return _cert_subdomain_wildcard_match(new_hostname, new_cn); + +} + +// validate that the LLSD array in llsd_set contains the llsd_value +bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value) +{ + for(LLSD::array_const_iterator set_value = llsd_set.beginArray(); + set_value != llsd_set.endArray(); + set_value++) + { + if(valueCompareLLSD((*set_value), llsd_value)) + { + return TRUE; + } + } + return FALSE; +} + +void _validateCert(int validation_policy, + const LLPointer<LLCertificate> cert, + const LLSD& validation_params, + int depth) +{ + + LLSD current_cert_info = cert->getLLSD(); + // check basic properties exist in the cert + if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info.has(CERT_SUBJECT_NAME_STRING)) + { + throw LLCertException(cert, "Cert doesn't have a Subject Name"); + } + + if(!current_cert_info.has(CERT_ISSUER_NAME_STRING)) + { + throw LLCertException(cert, "Cert doesn't have an Issuer Name"); + } + + // check basic properties exist in the cert + if(!current_cert_info.has(CERT_VALID_FROM) || !current_cert_info.has(CERT_VALID_TO)) + { + throw LLCertException(cert, "Cert doesn't have an expiration period"); + } + if (!current_cert_info.has(CERT_SHA1_DIGEST)) + { + throw LLCertException(cert, "No SHA1 digest"); + } + + if (validation_policy & VALIDATION_POLICY_TIME) + { + + LLDate validation_date(time(NULL)); + if(validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if((validation_date < current_cert_info[CERT_VALID_FROM].asDate()) || + (validation_date > current_cert_info[CERT_VALID_TO].asDate())) + { + throw LLCertValidationExpirationException(cert, validation_date); + } + } + if (validation_policy & VALIDATION_POLICY_SSL_KU) + { + if (current_cert_info.has(CERT_KEY_USAGE) && current_cert_info[CERT_KEY_USAGE].isArray() && + (!(_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + LLSD((std::string)CERT_KU_DIGITAL_SIGNATURE))) || + !(_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + LLSD((std::string)CERT_KU_KEY_ENCIPHERMENT))))) + { + throw LLCertKeyUsageValidationException(cert); + } + // only validate EKU if the cert has it + if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() && + (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], + LLSD((std::string)CERT_EKU_SERVER_AUTH)))) + { + throw LLCertKeyUsageValidationException(cert); + } + } + if (validation_policy & VALIDATION_POLICY_CA_KU) + { + if (current_cert_info.has(CERT_KEY_USAGE) && current_cert_info[CERT_KEY_USAGE].isArray() && + (!_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE], + (std::string)CERT_KU_CERT_SIGN))) + { + throw LLCertKeyUsageValidationException(cert); + } + } + + // validate basic constraints + if ((validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS) && + current_cert_info.has(CERT_BASIC_CONSTRAINTS) && + current_cert_info[CERT_BASIC_CONSTRAINTS].isMap()) + { + if(!current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_CA) || + !current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_CA]) + { + throw LLCertBasicConstraintsValidationException(cert); + } + if (current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_PATHLEN) && + ((current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger() != 0) && + (depth > current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger()))) + { + throw LLCertBasicConstraintsValidationException(cert); + } + } +} + +bool _verify_signature(LLPointer<LLCertificate> parent, + LLPointer<LLCertificate> child) +{ + bool verify_result = FALSE; + LLSD cert1 = parent->getLLSD(); + LLSD cert2 = child->getLLSD(); + X509 *signing_cert = parent->getOpenSSLX509(); + X509 *child_cert = child->getOpenSSLX509(); + if((signing_cert != NULL) && (child_cert != NULL)) + { + EVP_PKEY *pkey = X509_get_pubkey(signing_cert); + + + if(pkey) + { + int verify_code = X509_verify(child_cert, pkey); + verify_result = ( verify_code > 0); + EVP_PKEY_free(pkey); + } + else + { + LL_WARNS("SECAPI") << "Could not validate the cert chain signature, as the public key of the signing cert could not be retrieved" << LL_ENDL; + } + + } + else + { + LL_WARNS("SECAPI") << "Signature verification failed as there are no certs in the chain" << LL_ENDL; + } + if(child_cert) + { + X509_free(child_cert); + } + if(signing_cert) + { + X509_free(signing_cert); + } + return verify_result; +} + +// validate the certificate chain against a store. +// There are many aspects of cert validatioin policy involved in +// trust validation. The policies in this validation algorithm include +// * Hostname matching for SSL certs +// * Expiration time matching +// * Signature validation +// * Chain trust (is the cert chain trusted against the store) +// * Basic constraints +// * key usage and extended key usage +// TODO: We should add 'authority key identifier' for chaining. +// This algorithm doesn't simply validate the chain by itself +// and verify the last cert is in the certificate store, or points +// to a cert in the store. It validates whether any cert in the chain +// is trusted in the store, even if it's not the last one. +void LLBasicCertificateChain::validate(int validation_policy, + LLPointer<LLCertificateStore> ca_store, + const LLSD& validation_params) +{ + + if(size() < 1) + { + throw LLCertException(NULL, "No certs in chain"); + } + iterator current_cert = begin(); + LLSD current_cert_info = (*current_cert)->getLLSD(); + LLSD validation_date; + if (validation_params.has(CERT_VALIDATION_DATE)) + { + validation_date = validation_params[CERT_VALIDATION_DATE]; + } + + if (validation_policy & VALIDATION_POLICY_HOSTNAME) + { + if(!validation_params.has(CERT_HOSTNAME)) + { + throw LLCertException((*current_cert), "No hostname passed in for validation"); + } + if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info[CERT_SUBJECT_NAME].has(CERT_NAME_CN)) + { + throw LLInvalidCertificate((*current_cert)); + } + + LL_INFOS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() << + "against the cert CN " << current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString() << LL_ENDL; + if(!_cert_hostname_wildcard_match(validation_params[CERT_HOSTNAME].asString(), + current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString())) + { + throw LLCertValidationHostnameException(validation_params[CERT_HOSTNAME].asString(), + (*current_cert)); + } + } + + + int depth = 0; + LLPointer<LLCertificate> previous_cert; + // loop through the cert chain, validating the current cert against the next one. + while(current_cert != end()) + { + + int local_validation_policy = validation_policy; + if(current_cert == begin()) + { + // for the child cert, we don't validate CA stuff + local_validation_policy &= ~(VALIDATION_POLICY_CA_KU | + VALIDATION_POLICY_CA_BASIC_CONSTRAINTS); + } + else + { + // for non-child certs, we don't validate SSL Key usage + local_validation_policy &= ~VALIDATION_POLICY_SSL_KU; + if(!_verify_signature((*current_cert), + previous_cert)) + { + throw LLCertValidationInvalidSignatureException(previous_cert); + } + } + _validateCert(local_validation_policy, + (*current_cert), + validation_params, + depth); + + // look for a CA in the CA store that may belong to this chain. + LLSD cert_llsd = (*current_cert)->getLLSD(); + LLSD cert_search_params = LLSD::emptyMap(); + // is the cert itself in the store? + cert_search_params[CERT_SHA1_DIGEST] = cert_llsd[CERT_SHA1_DIGEST]; + LLCertificateStore::iterator found_store_cert = ca_store->find(cert_search_params); + if(found_store_cert != ca_store->end()) + { + return; + } + + // is the parent in the cert store? + + cert_search_params = LLSD::emptyMap(); + cert_search_params[CERT_SUBJECT_NAME_STRING] = cert_llsd[CERT_ISSUER_NAME_STRING]; + if (cert_llsd.has(CERT_AUTHORITY_KEY_IDENTIFIER)) + { + LLSD cert_aki = cert_llsd[CERT_AUTHORITY_KEY_IDENTIFIER]; + if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_ID)) + { + cert_search_params[CERT_SUBJECT_KEY_IDENTFIER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_ID]; + } + if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL)) + { + cert_search_params[CERT_SERIAL_NUMBER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL]; + } + } + found_store_cert = ca_store->find(cert_search_params); + + if(found_store_cert != ca_store->end()) + { + LLSD foo = (*found_store_cert)->getLLSD(); + // validate the store cert against the depth + _validateCert(validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS, + (*found_store_cert), + LLSD(), + depth); + + // verify the signature of the CA + if(!_verify_signature((*found_store_cert), + (*current_cert))) + { + throw LLCertValidationInvalidSignatureException(*current_cert); + } + // successfully validated. + return; + } + previous_cert = (*current_cert); + current_cert++; + depth++; + } + if (validation_policy & VALIDATION_POLICY_TRUSTED) + { + LLPointer<LLCertificate> untrusted_ca_cert = (*this)[size()-1]; + // we reached the end without finding a trusted cert. + throw LLCertValidationTrustException((*this)[size()-1]); + + } +} + + +// LLSecAPIBasicHandler Class +// Interface handler class for the various security storage handlers. + +// We read the file on construction, and write it on destruction. This +// means multiple processes cannot modify the datastore. +LLSecAPIBasicHandler::LLSecAPIBasicHandler(const std::string& protected_data_file, + const std::string& legacy_password_path) +{ + mProtectedDataFilename = protected_data_file; + mProtectedDataMap = LLSD::emptyMap(); + mLegacyPasswordPath = legacy_password_path; + +} + +LLSecAPIBasicHandler::LLSecAPIBasicHandler() +{ +} + + +void LLSecAPIBasicHandler::init() +{ + mProtectedDataMap = LLSD::emptyMap(); + if (mProtectedDataFilename.length() == 0) + { + mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "bin_conf.dat"); + mLegacyPasswordPath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "password.dat"); + + mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "bin_conf.dat"); + std::string store_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "CA.pem"); + // copy the CA file to a user writable location so we can manipulate it. + // for this provider, by using a user writable file, there is a risk that + // an attacking program can modify the file, but OS dependent providers + // will reduce that risk. + // by using a user file, modifications will be limited to one user if + // we read-only the main file + if (!LLFile::isfile(store_file)) + { + + std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); + llifstream ca_file(ca_file_path.c_str(), llifstream::binary | llifstream::in); + llofstream copied_store_file(store_file.c_str(), llofstream::binary | llofstream::out); + + while(!ca_file.fail()) + { + char buffer[BUFFER_READ_SIZE]; + ca_file.read(buffer, sizeof(buffer)); + copied_store_file.write(buffer, ca_file.gcount()); + } + ca_file.close(); + copied_store_file.close(); + } + LL_INFOS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL; + mStore = new LLBasicCertificateStore(store_file); + } + _readProtectedData(); // initialize mProtectedDataMap + // may throw LLProtectedDataException if saved datamap is not decryptable +} +LLSecAPIBasicHandler::~LLSecAPIBasicHandler() +{ + _writeProtectedData(); +} + +void LLSecAPIBasicHandler::_readProtectedData() +{ + // attempt to load the file into our map + LLPointer<LLSDParser> parser = new LLSDXMLParser(); + llifstream protected_data_stream(mProtectedDataFilename.c_str(), + llifstream::binary); + + if (!protected_data_stream.fail()) { + int offset; + U8 salt[STORE_SALT_SIZE]; + U8 buffer[BUFFER_READ_SIZE]; + U8 decrypted_buffer[BUFFER_READ_SIZE]; + int decrypted_length; + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES); + + // read in the salt and key + protected_data_stream.read((char *)salt, STORE_SALT_SIZE); + offset = 0; + if (protected_data_stream.gcount() < STORE_SALT_SIZE) + { + throw LLProtectedDataException("Config file too short."); + } + + cipher.decrypt(salt, STORE_SALT_SIZE); + + // totally lame. As we're not using the OS level protected data, we need to + // at least obfuscate the data. We do this by using a salt stored at the head of the file + // to encrypt the data, therefore obfuscating it from someone using simple existing tools. + // We do include the MAC address as part of the obfuscation, which would require an + // attacker to get the MAC address as well as the protected store, which improves things + // somewhat. It would be better to use the password, but as this store + // will be used to store the SL password when the user decides to have SL remember it, + // so we can't use that. OS-dependent store implementations will use the OS password/storage + // mechanisms and are considered to be more secure. + // We've a strong intent to move to OS dependent protected data stores. + + + // read in the rest of the file. + EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX_init(&ctx); + EVP_DecryptInit(&ctx, EVP_rc4(), salt, NULL); + // allocate memory: + std::string decrypted_data; + + while(protected_data_stream.good()) { + // read data as a block: + protected_data_stream.read((char *)buffer, BUFFER_READ_SIZE); + + EVP_DecryptUpdate(&ctx, decrypted_buffer, &decrypted_length, + buffer, protected_data_stream.gcount()); + decrypted_data.append((const char *)decrypted_buffer, protected_data_stream.gcount()); + } + + // RC4 is a stream cipher, so we don't bother to EVP_DecryptFinal, as there is + // no block padding. + EVP_CIPHER_CTX_cleanup(&ctx); + std::istringstream parse_stream(decrypted_data); + if (parser->parse(parse_stream, mProtectedDataMap, + LLSDSerialize::SIZE_UNLIMITED) == LLSDParser::PARSE_FAILURE) + { + throw LLProtectedDataException("Config file cannot be decrypted."); + } + } +} + +void LLSecAPIBasicHandler::_writeProtectedData() +{ + std::ostringstream formatted_data_ostream; + U8 salt[STORE_SALT_SIZE]; + U8 buffer[BUFFER_READ_SIZE]; + U8 encrypted_buffer[BUFFER_READ_SIZE]; + + + if(mProtectedDataMap.isUndefined()) + { + LLFile::remove(mProtectedDataFilename); + return; + } + // create a string with the formatted data. + LLSDSerialize::toXML(mProtectedDataMap, formatted_data_ostream); + std::istringstream formatted_data_istream(formatted_data_ostream.str()); + // generate the seed + RAND_bytes(salt, STORE_SALT_SIZE); + + + // write to a temp file so we don't clobber the initial file if there is + // an error. + std::string tmp_filename = mProtectedDataFilename + ".tmp"; + + llofstream protected_data_stream(tmp_filename.c_str(), + llofstream::binary); + try + { + + EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX_init(&ctx); + EVP_EncryptInit(&ctx, EVP_rc4(), salt, NULL); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES); + cipher.encrypt(salt, STORE_SALT_SIZE); + protected_data_stream.write((const char *)salt, STORE_SALT_SIZE); + + while (formatted_data_istream.good()) + { + formatted_data_istream.read((char *)buffer, BUFFER_READ_SIZE); + if(formatted_data_istream.gcount() == 0) + { + break; + } + int encrypted_length; + EVP_EncryptUpdate(&ctx, encrypted_buffer, &encrypted_length, + buffer, formatted_data_istream.gcount()); + protected_data_stream.write((const char *)encrypted_buffer, encrypted_length); + } + + // no EVP_EncrypteFinal, as this is a stream cipher + EVP_CIPHER_CTX_cleanup(&ctx); + + protected_data_stream.close(); + } + catch (...) + { + // it's good practice to clean up any secure information on error + // (even though this file isn't really secure. Perhaps in the future + // it may be, however. + LLFile::remove(tmp_filename); + throw LLProtectedDataException("Error writing Protected Data Store"); + } + + // move the temporary file to the specified file location. + if((((LLFile::isfile(mProtectedDataFilename) != 0) && + (LLFile::remove(mProtectedDataFilename) != 0))) || + (LLFile::rename(tmp_filename, mProtectedDataFilename))) + { + LLFile::remove(tmp_filename); + throw LLProtectedDataException("Could not overwrite protected data store"); + } +} + +// instantiate a certificate from a pem string +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(const std::string& pem_cert) +{ + LLPointer<LLCertificate> result = new LLBasicCertificate(pem_cert); + return result; +} + + + +// instiate a certificate from an openssl X509 structure +LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(X509* openssl_cert) +{ + LLPointer<LLCertificate> result = new LLBasicCertificate(openssl_cert); + return result; +} + +// instantiate a chain from an X509_STORE_CTX +LLPointer<LLCertificateChain> LLSecAPIBasicHandler::getCertificateChain(const X509_STORE_CTX* chain) +{ + LLPointer<LLCertificateChain> result = new LLBasicCertificateChain(chain); + return result; +} + +// instantiate a cert store given it's id. if a persisted version +// exists, it'll be loaded. If not, one will be created (but not +// persisted) +LLPointer<LLCertificateStore> LLSecAPIBasicHandler::getCertificateStore(const std::string& store_id) +{ + return mStore; +} + +// retrieve protected data +LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, + const std::string& data_id) +{ + + if (mProtectedDataMap.has(data_type) && + mProtectedDataMap[data_type].isMap() && + mProtectedDataMap[data_type].has(data_id)) + { + return mProtectedDataMap[data_type][data_id]; + } + + return LLSD(); +} + +void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, + const std::string& data_id) +{ + if (mProtectedDataMap.has(data_type) && + mProtectedDataMap[data_type].isMap() && + mProtectedDataMap[data_type].has(data_id)) + { + mProtectedDataMap[data_type].erase(data_id); + } +} + + +// +// persist data in a protected store +// +void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data) +{ + if (!mProtectedDataMap.has(data_type) || !mProtectedDataMap[data_type].isMap()) { + mProtectedDataMap[data_type] = LLSD::emptyMap(); + } + + mProtectedDataMap[data_type][data_id] = data; +} + +// +// Create a credential object from an identifier and authenticator. credentials are +// per grid. +LLPointer<LLCredential> LLSecAPIBasicHandler::createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator) +{ + LLPointer<LLSecAPIBasicCredential> result = new LLSecAPIBasicCredential(grid); + result->setCredentialData(identifier, authenticator); + return result; +} + +// Load a credential from the credential store, given the grid +LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid) +{ + LLSD credential = getProtectedData("credential", grid); + LLPointer<LLSecAPIBasicCredential> result = new LLSecAPIBasicCredential(grid); + if(credential.isMap() && + credential.has("identifier")) + { + + LLSD identifier = credential["identifier"]; + LLSD authenticator; + if (credential.has("authenticator")) + { + authenticator = credential["authenticator"]; + } + result->setCredentialData(identifier, authenticator); + } + else + { + // credential was not in protected storage, so pull the credential + // from the legacy store. + std::string first_name = gSavedSettings.getString("FirstName"); + std::string last_name = gSavedSettings.getString("LastName"); + + if ((first_name != "") && + (last_name != "")) + { + LLSD identifier = LLSD::emptyMap(); + LLSD authenticator; + identifier["type"] = "agent"; + identifier["first_name"] = first_name; + identifier["last_name"] = last_name; + + std::string legacy_password = _legacyLoadPassword(); + if (legacy_password.length() > 0) + { + authenticator = LLSD::emptyMap(); + authenticator["type"] = "hash"; + authenticator["algorithm"] = "md5"; + authenticator["secret"] = legacy_password; + } + result->setCredentialData(identifier, authenticator); + } + } + return result; +} + +// Save the credential to the credential store. Save the authenticator also if requested. +// That feature is used to implement the 'remember password' functionality. +void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) +{ + LLSD credential = LLSD::emptyMap(); + credential["identifier"] = cred->getIdentifier(); + if (save_authenticator) + { + credential["authenticator"] = cred->getAuthenticator(); + } + LL_INFOS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL; + setProtectedData("credential", cred->getGrid(), credential); + //*TODO: If we're saving Agni credentials, should we write the + // credentials to the legacy password.dat/etc? + _writeProtectedData(); +} + +// Remove a credential from the credential store. +void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) +{ + LLSD undefVal; + deleteProtectedData("credential", cred->getGrid()); + cred->setCredentialData(undefVal, undefVal); + _writeProtectedData(); +} + +// load the legacy hash for agni, and decrypt it given the +// mac address +std::string LLSecAPIBasicHandler::_legacyLoadPassword() +{ + const S32 HASHED_LENGTH = 32; + std::vector<U8> buffer(HASHED_LENGTH); + llifstream password_file(mLegacyPasswordPath, llifstream::binary); + + if(password_file.fail()) + { + return std::string(""); + } + + password_file.read((char*)&buffer[0], buffer.size()); + if(password_file.gcount() != buffer.size()) + { + return std::string(""); + } + + // Decipher with MAC address + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + LLXORCipher cipher(MACAddress, 6); + cipher.decrypt(&buffer[0], buffer.size()); + + return std::string((const char*)&buffer[0], buffer.size()); +} + + +// return an identifier for the user +std::string LLSecAPIBasicCredential::userID() const +{ + if (!mIdentifier.isMap()) + { + return mGrid + "(null)"; + } + else if ((std::string)mIdentifier["type"] == "agent") + { + return (std::string)mIdentifier["first_name"] + "_" + (std::string)mIdentifier["last_name"]; + } + else if ((std::string)mIdentifier["type"] == "account") + { + return (std::string)mIdentifier["account_name"]; + } + + return "unknown"; + +} + +// return a printable user identifier +std::string LLSecAPIBasicCredential::asString() const +{ + if (!mIdentifier.isMap()) + { + return mGrid + ":(null)"; + } + else if ((std::string)mIdentifier["type"] == "agent") + { + return mGrid + ":" + (std::string)mIdentifier["first_name"] + " " + (std::string)mIdentifier["last_name"]; + } + else if ((std::string)mIdentifier["type"] == "account") + { + return mGrid + ":" + (std::string)mIdentifier["account_name"]; + } + + return mGrid + ":(unknown type)"; +} + + +bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) +{ + if (lhs.type() != rhs.type()) + { + return FALSE; + } + if (lhs.isMap()) + { + // iterate through the map, verifying the right hand side has all of the + // values that the left hand side has. + for (LLSD::map_const_iterator litt = lhs.beginMap(); + litt != lhs.endMap(); + litt++) + { + if (!rhs.has(litt->first)) + { + return FALSE; + } + } + + // Now validate that the left hand side has everything the + // right hand side has, and that the values are equal. + for (LLSD::map_const_iterator ritt = rhs.beginMap(); + ritt != rhs.endMap(); + ritt++) + { + if (!lhs.has(ritt->first)) + { + return FALSE; + } + if (!valueCompareLLSD(lhs[ritt->first], ritt->second)) + { + return FALSE; + } + } + return TRUE; + } + else if (lhs.isArray()) + { + LLSD::array_const_iterator ritt = rhs.beginArray(); + // iterate through the array, comparing + for (LLSD::array_const_iterator litt = lhs.beginArray(); + litt != lhs.endArray(); + litt++) + { + if (!valueCompareLLSD(*ritt, *litt)) + { + return FALSE; + } + ritt++; + } + + return (ritt == rhs.endArray()); + } + else + { + // simple type, compare as string + return (lhs.asString() == rhs.asString()); + } + +} diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h new file mode 100644 index 0000000000..4bbb73f062 --- /dev/null +++ b/indra/newview/llsechandler_basic.h @@ -0,0 +1,285 @@ +/** + * @file llsechandler_basic.h + * @brief Security API for services such as certificate handling + * secure local storage, etc. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 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://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLSECHANDLER_BASIC +#define LLSECHANDLER_BASIC + +#include "llsecapi.h" +#include <vector> +#include <openssl/x509.h> + +// helpers +extern LLSD cert_name_from_X509_NAME(X509_NAME* name); +extern std::string cert_string_name_from_X509_NAME(X509_NAME* name); +extern std::string cert_string_from_asn1_integer(ASN1_INTEGER* value); +extern LLDate cert_date_from_asn1_time(ASN1_TIME* asn1_time); +extern std::string cert_get_digest(const std::string& digest_type, X509 *cert); + + +// class LLCertificate +// +class LLBasicCertificate : public LLCertificate +{ +public: + LOG_CLASS(LLBasicCertificate); + + LLBasicCertificate(const std::string& pem_cert); + LLBasicCertificate(X509* openSSLX509); + + virtual ~LLBasicCertificate(); + + virtual std::string getPem() const; + virtual std::vector<U8> getBinary() const; + virtual LLSD getLLSD() const; + + virtual X509* getOpenSSLX509() const; + + // set llsd elements for testing + void setLLSD(const std::string name, const LLSD& value) { mLLSDInfo[name] = value; } +protected: + + // certificates are stored as X509 objects, as validation and + // other functionality is via openssl + X509* mCert; + + LLSD& _initLLSD(); + LLSD mLLSDInfo; +}; + + +// class LLBasicCertificateVector +// Class representing a list of certificates +// This implementation uses a stl vector of certificates. +class LLBasicCertificateVector : virtual public LLCertificateVector +{ + +public: + LLBasicCertificateVector() {} + + virtual ~LLBasicCertificateVector() {} + + // Implementation of the basic iterator implementation. + // The implementation uses a vector iterator derived from + // the vector in the LLBasicCertificateVector class + class BasicIteratorImpl : public iterator_impl + { + public: + BasicIteratorImpl(std::vector<LLPointer<LLCertificate> >::iterator _iter) { mIter = _iter;} + virtual ~BasicIteratorImpl() {}; + // seek forward or back. Used by the operator++/operator-- implementations + virtual void seek(bool incr) + { + if(incr) + { + mIter++; + } + else + { + mIter--; + } + } + // create a copy of the iterator implementation class, used by the iterator copy constructor + virtual LLPointer<iterator_impl> clone() const + { + return new BasicIteratorImpl(mIter); + } + + virtual bool equals(const LLPointer<iterator_impl>& _iter) const + { + const BasicIteratorImpl *rhs_iter = dynamic_cast<const BasicIteratorImpl *>(_iter.get()); + return (mIter == rhs_iter->mIter); + } + virtual LLPointer<LLCertificate> get() + { + return *mIter; + } + protected: + friend class LLBasicCertificateVector; + std::vector<LLPointer<LLCertificate> >::iterator mIter; + }; + + // numeric index of the vector + virtual LLPointer<LLCertificate> operator[](int _index) { return mCerts[_index];} + + // Iteration + virtual iterator begin() { return iterator(new BasicIteratorImpl(mCerts.begin())); } + + virtual iterator end() { return iterator(new BasicIteratorImpl(mCerts.end())); } + + // find a cert given params + virtual iterator find(const LLSD& params); + + // return the number of certs in the store + virtual int size() const { return mCerts.size(); } + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void add(LLPointer<LLCertificate> cert) { insert(end(), cert); } + + // insert the cert to the store. if a copy of the cert already exists in the store, it is removed first + virtual void insert(iterator _iter, LLPointer<LLCertificate> cert); + + // remove a certificate from the store + virtual LLPointer<LLCertificate> erase(iterator _iter); + +protected: + std::vector<LLPointer<LLCertificate> >mCerts; +}; + +// class LLCertificateStore +// represents a store of certificates, typically a store of root CA +// certificates. The store can be persisted, and can be used to validate +// a cert chain +// +class LLBasicCertificateStore : virtual public LLBasicCertificateVector, public LLCertificateStore +{ +public: + LLBasicCertificateStore(const std::string& filename); + void load_from_file(const std::string& filename); + + virtual ~LLBasicCertificateStore(); + + // persist the store + virtual void save(); + + // return the store id + virtual std::string storeId() const; + +protected: + std::vector<LLPointer<LLCertificate> >mCerts; + std::string mFilename; +}; + +// class LLCertificateChain +// Class representing a chain of certificates in order, with the +// first element being the child cert. +class LLBasicCertificateChain : virtual public LLBasicCertificateVector, public LLCertificateChain +{ + +public: + LLBasicCertificateChain(const X509_STORE_CTX * store); + + virtual ~LLBasicCertificateChain() {} + + // validate a certificate chain against a certificate store, using the + // given validation policy. + virtual void validate(int validation_policy, + LLPointer<LLCertificateStore> ca_store, + const LLSD& validation_params); +}; + + + +// LLSecAPIBasicCredential class +class LLSecAPIBasicCredential : public LLCredential +{ +public: + LLSecAPIBasicCredential(const std::string& grid) : LLCredential(grid) {} + virtual ~LLSecAPIBasicCredential() {} + // return a value representing the user id, (could be guid, name, whatever) + virtual std::string userID() const; + + // printible string identifying the credential. + virtual std::string asString() const; +}; + +// LLSecAPIBasicHandler Class +// Interface handler class for the various security storage handlers. +class LLSecAPIBasicHandler : public LLSecAPIHandler +{ +public: + + LLSecAPIBasicHandler(const std::string& protected_data_filename, + const std::string& legacy_password_path); + LLSecAPIBasicHandler(); + + void init(); + + virtual ~LLSecAPIBasicHandler(); + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert); + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert); + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain); + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id); + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data); + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id); + + // delete a protected data item from the store + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id); + + // credential management routines + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator); + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid); + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator); + + virtual void deleteCredential(LLPointer<LLCredential> cred); + +protected: + void _readProtectedData(); + void _writeProtectedData(); + std::string _legacyLoadPassword(); + + std::string mProtectedDataFilename; + LLSD mProtectedDataMap; + LLPointer<LLBasicCertificateStore> mStore; + + std::string mLegacyPasswordPath; +}; + +bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs); + +#endif // LLSECHANDLER_BASIC + + + diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index d03a492cd1..af16b962e6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2435,7 +2435,7 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) if (identical) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { @@ -2494,11 +2494,11 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) BOOL public_owner = (first_id.isNull() && !first_group_owned); if (first_group_owned) { - name = LLSLURL::buildCommand("group", first_id, "inspect"); + name = LLSLURL("group", first_id, "inspect").getSLURLString(); } else if(!public_owner) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { @@ -2558,7 +2558,7 @@ BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) BOOL public_owner = (first_id.isNull()); if(!public_owner) { - name = LLSLURL::buildCommand("agent", first_id, "inspect"); + name = LLSLURL("agent", first_id, "inspect").getSLURLString(); } else { @@ -3624,14 +3624,14 @@ void LLSelectMgr::sendAttach(U8 attachment_point) return; } -#if ENABLE_MULTIATTACHMENTS - attachment_point |= ATTACHMENT_ADD; -#endif BOOL build_mode = LLToolMgr::getInstance()->inEdit(); // Special case: Attach to default location for this object. if (0 == attachment_point || get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { +#if ENABLE_MULTIATTACHMENTS + attachment_point |= ATTACHMENT_ADD; +#endif sendListToRegions( "ObjectAttach", packAgentIDAndSessionAndAttachment, diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index abef47d4be..0086c6aec4 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -44,6 +44,7 @@ #include "llfoldervieweventlistener.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" +#include "llsidetray.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "llviewerregion.h" @@ -115,6 +116,8 @@ BOOL LLSidepanelAppearance::postBuild() mEditAppearanceBtn = getChild<LLButton>("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); + childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::onEditOutfitButtonClicked, this)); + mEditBtn = getChild<LLButton>("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); @@ -154,7 +157,7 @@ BOOL LLSidepanelAppearance::postBuild() mCurrentLookName = getChild<LLTextBox>("currentlook_name"); - mOutfitDirtyTag = getChild<LLTextBox>("currentlook_title"); + mOutfitStatus = getChild<LLTextBox>("currentlook_status"); mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); @@ -197,8 +200,7 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string) mFilterSubString = search_string; // Searches are case-insensitive - LLStringUtil::toUpper(mFilterSubString); - LLStringUtil::trimHead(mFilterSubString); + // but we don't convert the typed string to upper-case so that it can be fed to the web search as-is. mPanelOutfitsInventory->onSearchEdit(mFilterSubString); } @@ -239,6 +241,13 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked() } } +void LLSidepanelAppearance::onEditOutfitButtonClicked() +{ + LLSD key; + key["type"] = "edit_outfit"; + LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); +} + void LLSidepanelAppearance::onEditButtonClicked() { toggleOutfitEditPanel(FALSE); @@ -308,7 +317,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we { if (!wearable) { - wearable = gAgentWearables.getWearable(WT_SHAPE, 0); + wearable = gAgentWearables.getWearable(LLWearableType::WT_SHAPE, 0); } if (!mEditWearable || !wearable) { @@ -329,8 +338,8 @@ void LLSidepanelAppearance::updateVerbs() if (mPanelOutfitsInventory && !is_look_info_visible) { - const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); - mEditBtn->setEnabled(is_correct_type); +// const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); +// mEditBtn->setEnabled(is_correct_type); } else { @@ -340,7 +349,11 @@ void LLSidepanelAppearance::updateVerbs() void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) { - mOutfitDirtyTag->setVisible(LLAppearanceMgr::getInstance()->isOutfitDirty()); + // Set current outfit status (wearing/unsaved). + bool dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); + std::string cof_status_str = getString(dirty ? "Unsaved Changes" : "Now Wearing"); + mOutfitStatus->setText(cof_status_str); + if (name == "") { std::string outfit_name; @@ -376,11 +389,11 @@ void LLSidepanelAppearance::fetchInventory() mNewOutfitBtn->setEnabled(false); uuid_vec_t ids; LLUUID item_id; - for(S32 type = (S32)WT_SHAPE; type < (S32)WT_COUNT; ++type) + for(S32 type = (S32)LLWearableType::WT_SHAPE; type < (S32)LLWearableType::WT_COUNT; ++type) { - for (U32 index = 0; index < gAgentWearables.getWearableCount((EWearableType)type); ++index) + for (U32 index = 0; index < gAgentWearables.getWearableCount((LLWearableType::EType)type); ++index) { - item_id = gAgentWearables.getWearableItemID((EWearableType)type, index); + item_id = gAgentWearables.getWearableItemID((LLWearableType::EType)type, index); if(item_id.notNull()) { ids.push_back(item_id); @@ -426,3 +439,9 @@ void LLSidepanelAppearance::inventoryFetched() { mNewOutfitBtn->setEnabled(true); } + +void LLSidepanelAppearance::setWearablesLoading(bool val) +{ + childSetVisible("wearables_loading_indicator", val); + childSetVisible("edit_outfit_btn", !val); +} diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 0a609797fb..2900831099 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -65,12 +65,14 @@ public: void showOutfitsInventoryPanel(); void showOutfitEditPanel(); + void setWearablesLoading(bool val); private: void onFilterEdit(const std::string& search_string); void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); + void onEditOutfitButtonClicked(); void onEditButtonClicked(); void onEditWearBackClicked(); @@ -90,7 +92,7 @@ private: LLPanel* mCurrOutfitPanel; LLTextBox* mCurrentLookName; - LLTextBox* mOutfitDirtyTag; + LLTextBox* mOutfitStatus; // Used to make sure the user's inventory is in memory. LLCurrentlyWornFetchObserver* mFetchWorn; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index fa543f1371..65b9184fe5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -323,8 +323,7 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem() U32 LLSidepanelInventory::getSelectedCount() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); - std::set<LLUUID> selection_list; - panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(selection_list); + std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); return selection_list.size(); } diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 5d20e280b5..ff7e479368 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -1,10 +1,11 @@ /** - * @file llslurl.cpp - * @brief SLURL manipulation + * @file llurlsimstring.cpp (was llsimurlstring.cpp) + * @brief Handles "SLURL fragments" like Ahern/123/45 for + * startup processing, login screen, prefs, etc. * - * $LicenseInfo:firstyear=2009&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,155 +34,443 @@ #include "llslurl.h" -#include "llweb.h" - -#include "llurlregistry.h" - -const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app."; -const std::string LLSLURL::PREFIX_SL = "sl://"; -const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://"; -const std::string LLSLURL::PREFIX_SLURL_OLD = "http://slurl.com/secondlife/"; - -// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag +#include "llpanellogin.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llfiltersd2xmlrpc.h" +#include "curl/curl.h" +const char* LLSLURL::SLURL_HTTP_SCHEME = "http"; +const char* LLSLURL::SLURL_HTTPS_SCHEME = "https"; +const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife"; +const char* LLSLURL::SLURL_SECONDLIFE_PATH = "secondlife"; +const char* LLSLURL::SLURL_COM = "slurl.com"; +// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag // text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this // version is required also. -const std::string LLSLURL::PREFIX_SLURL_WWW = "http://www.slurl.com/secondlife/"; -const std::string LLSLURL::PREFIX_SLURL = "http://maps.secondlife.com/secondlife/"; +const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; +const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; +const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info"; +const char* LLSLURL::SLURL_APP_PATH = "app"; +const char* LLSLURL::SLURL_REGION_PATH = "region"; +const char* LLSLURL::SIM_LOCATION_HOME = "home"; +const char* LLSLURL::SIM_LOCATION_LAST = "last"; -const std::string LLSLURL::APP_TOKEN = "app/"; - -// static -std::string LLSLURL::stripProtocol(const std::string& url) +// resolve a simstring from a slurl +LLSLURL::LLSLURL(const std::string& slurl) { - std::string stripped = url; - if (matchPrefix(stripped, PREFIX_SL_HELP)) - { - stripped.erase(0, PREFIX_SL_HELP.length()); - } - else if (matchPrefix(stripped, PREFIX_SL)) - { - stripped.erase(0, PREFIX_SL.length()); - } - else if (matchPrefix(stripped, PREFIX_SECONDLIFE)) - { - stripped.erase(0, PREFIX_SECONDLIFE.length()); - } - else if (matchPrefix(stripped, PREFIX_SLURL)) + // by default we go to agni. + mType = INVALID; + LL_INFOS("AppInit") << "SLURL: " << slurl << LL_ENDL; + if(slurl == SIM_LOCATION_HOME) { - stripped.erase(0, PREFIX_SLURL.length()); + mType = HOME_LOCATION; } - else if (matchPrefix(stripped, PREFIX_SLURL_OLD)) + else if(slurl.empty() || (slurl == SIM_LOCATION_LAST)) { - stripped.erase(0, PREFIX_SLURL_OLD.length()); + + mType = LAST_LOCATION; } - else if (matchPrefix(stripped, PREFIX_SLURL_WWW)) + else { - stripped.erase(0, PREFIX_SLURL_WWW.length()); + LLURI slurl_uri; + // parse the slurl as a uri + if(slurl.find(':') == std::string::npos) + { + // There may be no scheme ('secondlife:' etc.) passed in. In that case + // we want to normalize the slurl by putting the appropriate scheme + // in front of the slurl. So, we grab the appropriate slurl base + // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or + // https://<hostname>/region/ for Standalone grid (the word region, not the region name) + // these slurls are typically passed in from the 'starting location' box on the login panel, + // where the user can type in <regionname>/<x>/<y>/<z> + std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase(); + // the slurl that was passed in might have a prepended /, or not. So, + // we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z> + // or some such. + + if(slurl[0] == '/') + { + fixed_slurl += slurl.substr(1); + } + else + { + fixed_slurl += slurl; + } + // We then load the slurl into a LLURI form + slurl_uri = LLURI(fixed_slurl); + } + else + { + // as we did have a scheme, implying a URI style slurl, we + // simply parse it as a URI + slurl_uri = LLURI(slurl); + } + + LLSD path_array = slurl_uri.pathArray(); + + // determine whether it's a maingrid URI or an Standalone/open style URI + // by looking at the scheme. If it's a 'secondlife:' slurl scheme or + // 'sl:' scheme, we know it's maingrid + + // At the end of this if/else block, we'll have determined the grid, + // and the slurl type (APP or LOCATION) + if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) + { + // parse a maingrid style slurl. We know the grid is maingrid + // so grab it. + // A location slurl for maingrid (with the special schemes) can be in the form + // secondlife://<regionname>/<x>/<y>/<z> + // or + // secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z> + // where if grid is empty, it specifies Agni + + // An app style slurl for maingrid can be + // secondlife://<Grid>/app/<app parameters> + // where an empty grid implies Agni + + // we'll start by checking the top of the 'path' which will be + // either 'app', 'secondlife', or <x>. + + // default to maingrid + + mGrid = MAINGRID; + + if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) || + (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)) + { + // it's in the form secondlife://<grid>/(app|secondlife) + // so parse the grid name to derive the grid ID + if (!slurl_uri.hostName().empty()) + { + mGrid = LLGridManager::getInstance()->getGridByLabel(slurl_uri.hostName()); + } + else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) + { + // If the slurl is in the form secondlife:///secondlife/<region> form, + // then we are in fact on maingrid. + mGrid = MAINGRID; + } + else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH) + { + // for app style slurls, where no grid name is specified, assume the currently + // selected or logged in grid. + mGrid = LLGridManager::getInstance()->getGrid(); + } + + if(mGrid.empty()) + { + // we couldn't find the grid in the grid manager, so bail + return; + } + // set the type as appropriate. + if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) + { + mType = LOCATION; + } + else + { + mType = APP; + } + path_array.erase(0); + } + else + { + // it wasn't a /secondlife/<region> or /app/<params>, so it must be secondlife://<region> + // therefore the hostname will be the region name, and it's a location type + mType = LOCATION; + // 'normalize' it so the region name is in fact the head of the path_array + path_array.insert(0, slurl_uri.hostName()); + } + } + else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) || + (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || + (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)) + { + // We're dealing with either a Standalone style slurl or slurl.com slurl + if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) || + (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || + (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM)) + { + // slurl.com implies maingrid + mGrid = MAINGRID; + } + else + { + // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open style + // urls are properly formed, unlike the stinky maingrid style + mGrid = slurl_uri.hostName(); + } + if (path_array.size() == 0) + { + // um, we need a path... + return; + } + + // we need to normalize the urls so + // the path portion starts with the 'command' that we want to do + // it can either be region or app. + if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) || + (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)) + { + // strip off 'region' or 'secondlife' + path_array.erase(0); + // it's a location + mType = LOCATION; + } + else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH) + { + mType = APP; + path_array.erase(0); + // leave app appended. + } + else + { + // not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL + return; + } + } + else + { + // invalid scheme, so bail + return; + } + + + if(path_array.size() == 0) + { + // we gotta have some stuff after the specifier as to whether it's a region or command + return; + } + + // now that we know whether it's an app slurl or a location slurl, + // parse the slurl into the proper data structures. + if(mType == APP) + { + // grab the app command type and strip it (could be a command to jump somewhere, + // or whatever ) + mAppCmd = path_array[0].asString(); + path_array.erase(0); + + // Grab the parameters + mAppPath = path_array; + // and the query + mAppQuery = slurl_uri.query(); + mAppQueryMap = slurl_uri.queryMap(); + return; + } + else if(mType == LOCATION) + { + // at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z + // are collectively optional + // are optional + mRegion = LLURI::unescape(path_array[0].asString()); + path_array.erase(0); + + // parse the x, y, z + if(path_array.size() >= 3) + { + + mPosition = LLVector3(path_array); + if((F32(mPosition[VX]) < 0.f) || + (mPosition[VX] > REGION_WIDTH_METERS) || + (F32(mPosition[VY]) < 0.f) || + (mPosition[VY] > REGION_WIDTH_METERS) || + (F32(mPosition[VZ]) < 0.f) || + (mPosition[VZ] > REGION_HEIGHT_METERS)) + { + mType = INVALID; + return; + } + + } + else + { + // if x, y and z were not fully passed in, go to the middle of the region. + // teleport will adjust the actual location to make sure you're on the ground + // and such + mPosition = LLVector3(REGION_WIDTH_METERS/2, REGION_WIDTH_METERS/2, 0); + } + } } - - return stripped; } -// static -bool LLSLURL::isSLURL(const std::string& url) + +// Create a slurl for the middle of the region +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region) { - if (matchPrefix(url, PREFIX_SL_HELP)) return true; - if (matchPrefix(url, PREFIX_SL)) return true; - if (matchPrefix(url, PREFIX_SECONDLIFE)) return true; - if (matchPrefix(url, PREFIX_SLURL)) return true; - if (matchPrefix(url, PREFIX_SLURL_OLD)) return true; - if (matchPrefix(url, PREFIX_SLURL_WWW)) return true; - - return false; + mGrid = grid; + mRegion = region; + mType = LOCATION; + mPosition = LLVector3((F64)REGION_WIDTH_METERS/2, (F64)REGION_WIDTH_METERS/2, 0); } -bool LLSLURL::isValidSLURL(const std::string& url) + + +// create a slurl given the position. The position will be modded with the region +// width handling global positions as well +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region, + const LLVector3& position) { - std::string temp_url(url); - //"www." may appear in DnD- see description of PREFIX_SLURL_WWW. - // If it is found, we remove it because it isn't expected in regexp. - if (matchPrefix(url, PREFIX_SLURL_WWW)) - { - size_t position = url.find("www."); - temp_url.erase(position,4); - } - - return LLUrlRegistry::getInstance()->isUrl(temp_url); + mGrid = grid; + mRegion = region; + S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) ); + S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) ); + S32 z = llround( (F32)position[VZ] ); + mType = LOCATION; + mPosition = LLVector3(x, y, z); } -// static -bool LLSLURL::isSLURLCommand(const std::string& url) -{ - if (matchPrefix(url, PREFIX_SL + APP_TOKEN) || - matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL_WWW + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL_OLD + APP_TOKEN) ) - { - return true; - } - return false; +// create a simstring +LLSLURL::LLSLURL(const std::string& region, + const LLVector3& position) +{ + *this = LLSLURL(LLGridManager::getInstance()->getGrid(), + region, position); } -// static -bool LLSLURL::isSLURLHelp(const std::string& url) +// create a slurl from a global position +LLSLURL::LLSLURL(const std::string& grid, + const std::string& region, + const LLVector3d& global_position) { - return matchPrefix(url, PREFIX_SL_HELP); + *this = LLSLURL(grid, + region, LLVector3(global_position.mdV[VX], + global_position.mdV[VY], + global_position.mdV[VZ])); } -// static -std::string LLSLURL::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z) +// create a slurl from a global position +LLSLURL::LLSLURL(const std::string& region, + const LLVector3d& global_position) { - std::string slurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z); - slurl = LLWeb::escapeURL( slurl ); - return slurl; + *this = LLSLURL(LLGridManager::getInstance()->getGrid(), + region, global_position); } -// static -std::string LLSLURL::buildCommand(const char* noun, const LLUUID& id, const char* verb) +LLSLURL::LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb) { - std::string slurl = llformat("secondlife:///app/%s/%s/%s", - noun, id.asString().c_str(), verb); - return slurl; + mType = APP; + mAppCmd = command; + mAppPath = LLSD::emptyArray(); + mAppPath.append(LLSD(id)); + mAppPath.append(LLSD(verb)); } -// static -std::string LLSLURL::buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z) + +std::string LLSLURL::getSLURLString() const { - std::string unescapedslurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z); - return unescapedslurl; + switch(mType) + { + case HOME_LOCATION: + return SIM_LOCATION_HOME; + case LAST_LOCATION: + return SIM_LOCATION_LAST; + case LOCATION: + { + // lookup the grid + S32 x = llround( (F32)mPosition[VX] ); + S32 y = llround( (F32)mPosition[VY] ); + S32 z = llround( (F32)mPosition[VZ] ); + return LLGridManager::getInstance()->getSLURLBase(mGrid) + + LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); + } + case APP: + { + std::ostringstream app_url; + app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd; + for(LLSD::array_const_iterator i = mAppPath.beginArray(); + i != mAppPath.endArray(); + i++) + { + app_url << "/" << i->asString(); + } + if(mAppQuery.length() > 0) + { + app_url << "?" << mAppQuery; + } + return app_url.str(); + } + default: + LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL; + return std::string(); + } } -// static -std::string LLSLURL::buildSLURLfromPosGlobal(const std::string& regionname, - const LLVector3d& global_pos, - bool escaped /*= true*/) +std::string LLSLURL::getLoginString() const { - S32 x, y, z; - globalPosToXYZ(global_pos, x, y, z); - if(escaped) + + std::stringstream unescaped_start; + switch(mType) { - return buildSLURL(regionname, x, y, z); + case LOCATION: + unescaped_start << "uri:" + << mRegion << "&" + << llround(mPosition[0]) << "&" + << llround(mPosition[1]) << "&" + << llround(mPosition[2]); + break; + case HOME_LOCATION: + unescaped_start << "home"; + break; + case LAST_LOCATION: + unescaped_start << "last"; + break; + default: + LL_WARNS("AppInit") << "Unexpected SLURL type for login string" << (int)mType << LL_ENDL; + break; } - else + return xml_escape_string(unescaped_start.str()); +} + +bool LLSLURL::operator==(const LLSLURL& rhs) +{ + if(rhs.mType != mType) return false; + switch(mType) { - return buildUnescapedSLURL(regionname, x, y, z); + case LOCATION: + return ((mGrid == rhs.mGrid) && + (mRegion == rhs.mRegion) && + (mPosition == rhs.mPosition)); + case APP: + return getSLURLString() == rhs.getSLURLString(); + + case HOME_LOCATION: + case LAST_LOCATION: + return true; + default: + return false; } } -// static -bool LLSLURL::matchPrefix(const std::string& url, const std::string& prefix) +bool LLSLURL::operator !=(const LLSLURL& rhs) { - std::string test_prefix = url.substr(0, prefix.length()); - LLStringUtil::toLower(test_prefix); - return test_prefix == prefix; + return !(*this == rhs); } -void LLSLURL::globalPosToXYZ(const LLVector3d& pos, S32& x, S32& y, S32& z) +std::string LLSLURL::getLocationString() const +{ + return llformat("%s/%d/%d/%d", + mRegion.c_str(), + (int)llround(mPosition[0]), + (int)llround(mPosition[1]), + (int)llround(mPosition[2])); +} +std::string LLSLURL::asString() const { - x = llround((F32)fmod(pos.mdV[VX], (F64)REGION_WIDTH_METERS)); - y = llround((F32)fmod(pos.mdV[VY], (F64)REGION_WIDTH_METERS)); - z = llround((F32)pos.mdV[VZ]); + std::ostringstream result; + result << " mAppCmd:" << getAppCmd() << + " mAppPath:" + getAppPath().asString() << + " mAppQueryMap:" + getAppQueryMap().asString() << + " mAppQuery: " + getAppQuery() << + " mGrid: " + getGrid() << + " mRegion: " + getRegion() << + " mPosition: " << + " mType: " << mType << + " mPosition: " << mPosition; + return result.str(); } + diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index a79a8fc97c..28c23561cf 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -1,10 +1,11 @@ -/** +/** * @file llslurl.h - * @brief SLURL manipulation + * @brief Handles "SLURL fragments" like Ahern/123/45 for + * startup processing, login screen, prefs, etc. * - * $LicenseInfo:firstyear=2009&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -29,85 +29,84 @@ * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ +#ifndef LLSLURL_H +#define LLSLURL_H -#ifndef LL_SLURL_H -#define LL_SLURL_H +#include "llstring.h" -#include <string> -// IAN BUG: where should this live? -// IAN BUG: are static utility functions right? See LLUUID. -// question of whether to have a LLSLURL object or a -// some of this was moved from LLURLDispatcher +// represents a location in a grid -/** - * SLURL manipulation - */ class LLSLURL { public: - static const std::string PREFIX_SL_HELP; - static const std::string PREFIX_SL; - static const std::string PREFIX_SECONDLIFE; - static const std::string PREFIX_SLURL; - static const std::string PREFIX_SLURL_OLD; - static const std::string PREFIX_SLURL_WWW; - - static const std::string APP_TOKEN; - - /** - * Is this any sort of secondlife:// or sl:// URL? - */ - static bool isSLURL(const std::string& url); - - /** - * Returns true if url is proven valid by regexp check from LLUrlRegistry - */ - static bool isValidSLURL(const std::string& url); - - /** - * Is this a special secondlife://app/ URL? - */ - static bool isSLURLCommand(const std::string& url); - - /** - * Not sure what it is. - */ - static bool isSLURLHelp(const std::string& url); - - /** - * builds: http://slurl.com/secondlife/Region%20Name/x/y/z/ escaping result url. - */ - static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z); - - /// Build a SLURL like secondlife:///app/agent/<uuid>/inspect - static std::string buildCommand(const char* noun, const LLUUID& id, const char* verb); - - /** - * builds: http://slurl.com/secondlife/Region Name/x/y/z/ without escaping result url. - */ - static std::string buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z); - - /** - * builds SLURL from global position. Returns escaped or unescaped url. - * Returns escaped url by default. - */ - static std::string buildSLURLfromPosGlobal(const std::string& regionname, - const LLVector3d& global_pos, - bool escaped = true); - /** - * Strip protocol part from the URL. - */ - static std::string stripProtocol(const std::string& url); - - /** - * Convert global position to X, Y Z - */ - static void globalPosToXYZ(const LLVector3d& pos, S32& x, S32& y, S32& z); - -private: - static bool matchPrefix(const std::string& url, const std::string& prefix); - + static const char* SLURL_HTTPS_SCHEME; + static const char* SLURL_HTTP_SCHEME; + static const char* SLURL_SL_SCHEME; + static const char* SLURL_SECONDLIFE_SCHEME; + static const char* SLURL_SECONDLIFE_PATH; + static const char* SLURL_COM; + static const char* WWW_SLURL_COM; + static const char* MAPS_SECONDLIFE_COM; + static const char* SLURL_X_GRID_LOCATION_INFO_SCHEME; + static LLSLURL START_LOCATION; + static const char* SIM_LOCATION_HOME; + static const char* SIM_LOCATION_LAST; + static const char* SLURL_APP_PATH; + static const char* SLURL_REGION_PATH; + + enum SLURL_TYPE { + INVALID, + LOCATION, + HOME_LOCATION, + LAST_LOCATION, + APP, + HELP + }; + + + LLSLURL(): mType(LAST_LOCATION) { } + LLSLURL(const std::string& slurl); + LLSLURL(const std::string& grid, const std::string& region); + LLSLURL(const std::string& region, const LLVector3& position); + LLSLURL(const std::string& grid, const std::string& region, const LLVector3& position); + LLSLURL(const std::string& grid, const std::string& region, const LLVector3d& global_position); + LLSLURL(const std::string& region, const LLVector3d& global_position); + LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb); + + SLURL_TYPE getType() const { return mType; } + + std::string getSLURLString() const; + std::string getLoginString() const; + std::string getLocationString() const; + std::string getGrid() const { return mGrid; } + std::string getRegion() const { return mRegion; } + LLVector3 getPosition() const { return mPosition; } + std::string getAppCmd() const { return mAppCmd; } + std::string getAppQuery() const { return mAppQuery; } + LLSD getAppQueryMap() const { return mAppQueryMap; } + LLSD getAppPath() const { return mAppPath; } + + bool isValid() const { return mType != INVALID; } + bool isSpatial() const { return (mType == LAST_LOCATION) || (mType == HOME_LOCATION) || (mType == LOCATION); } + + bool operator==(const LLSLURL& rhs); + bool operator!=(const LLSLURL&rhs); + + std::string asString() const ; + +protected: + SLURL_TYPE mType; + + // used for Apps and Help + std::string mAppCmd; + LLSD mAppPath; + LLSD mAppQueryMap; + std::string mAppQuery; + + std::string mGrid; // reference to grid manager grid + std::string mRegion; + LLVector3 mPosition; }; -#endif +#endif // LLSLURL_H diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index c5c311ed33..d7de050636 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -59,9 +59,9 @@ LLSpeakButton::Params::Params() void LLSpeakButton::draw() { - // gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state. - bool openmic = gVoiceClient->getUserPTTState(); - bool voiceenabled = gVoiceClient->voiceEnabled(); + // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. + bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); + bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); mSpeakBtn->setToggleState(openmic && voiceenabled); mOutputMonitor->setIsMuted(!voiceenabled); LLUICtrl::draw(); @@ -176,11 +176,11 @@ void LLSpeakButton::setLabelVisible(bool visible) void LLSpeakButton::onMouseDown_SpeakBtn() { bool down = true; - gVoiceClient->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk + LLVoiceClient::getInstance()->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk } void LLSpeakButton::onMouseUp_SpeakBtn() { bool down = false; - gVoiceClient->inputUserControlState(down); + LLVoiceClient::getInstance()->inputUserControlState(down); } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index ba6a44dff4..c8bb4aa983 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -299,7 +299,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin void LLSpeakerMgr::update(BOOL resort_ok) { - if (!gVoiceClient) + if (!LLVoiceClient::getInstance()) { return; } @@ -313,7 +313,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) } // update status of all current speakers - BOOL voice_channel_active = (!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); + BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end();) { LLUUID speaker_id = speaker_it->first; @@ -321,21 +321,21 @@ void LLSpeakerMgr::update(BOOL resort_ok) speaker_map_t::iterator cur_speaker_it = speaker_it++; - if (voice_channel_active && gVoiceClient->getVoiceEnabled(speaker_id)) + if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) { - speakerp->mSpeechVolume = gVoiceClient->getCurrentPower(speaker_id); - BOOL moderator_muted_voice = gVoiceClient->getIsModeratorMuted(speaker_id); + speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id); + BOOL moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id); if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); } - if (gVoiceClient->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) + if (LLVoiceClient::getInstance()->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) { speakerp->mStatus = LLSpeaker::STATUS_MUTED; } - else if (gVoiceClient->getIsSpeaking(speaker_id)) + else if (LLVoiceClient::getInstance()->getIsSpeaking(speaker_id)) { // reset inactivity expiration if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING) @@ -417,19 +417,21 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { // are we bound to the currently active voice channel? - if ((!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) - { - LLVoiceClient::participantMap* participants = gVoiceClient->getParticipantList(); - if(participants) + if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) + { + std::set<LLUUID> participants; + LLVoiceClient::getInstance()->getParticipantList(participants); + // add new participants to our list of known speakers + for (std::set<LLUUID>::iterator participant_it = participants.begin(); + participant_it != participants.end(); + ++participant_it) { - LLVoiceClient::participantMap::iterator participant_it; + setSpeaker(*participant_it, + LLVoiceClient::getInstance()->getDisplayName(*participant_it), + LLSpeaker::STATUS_VOICE_ACTIVE, + (LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); + - // add new participants to our list of known speakers - for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it) - { - LLVoiceClient::participantState* participantp = participant_it->second; - setSpeaker(participantp->mAvatarID, participantp->mDisplayName, LLSpeaker::STATUS_VOICE_ACTIVE, (participantp->isAvatar()?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); - } } } } @@ -519,7 +521,7 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id) BOOL LLSpeakerMgr::isVoiceActive() { // mVoiceChannel = NULL means current voice channel, whatever it is - return LLVoiceClient::voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive(); + return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive(); } diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index cc06179481..29237946d2 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -158,7 +158,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i mSpeakingIndicators.insert(value_type); speaker_ids_t speakers_uuids; - BOOL is_in_same_voice = LLVoiceClient::getInstance()->findParticipantByID(speaker_id) != NULL; + BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); speakers_uuids.insert(speaker_id); switchSpeakerIndicators(speakers_uuids, is_in_same_voice); @@ -210,7 +210,7 @@ void SpeakingIndicatorManager::onChange() LL_DEBUGS("SpeakingIndicator") << "Voice participant list was changed, updating indicators" << LL_ENDL; speaker_ids_t speakers_uuids; - LLVoiceClient::getInstance()->getParticipantsUUIDSet(speakers_uuids); + LLVoiceClient::getInstance()->getParticipantList(speakers_uuids); LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL; // switch all indicators off diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7ad7799515..a84bb98a90 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -147,7 +147,7 @@ #include "lltrans.h" #include "llui.h" #include "llurldispatcher.h" -#include "llurlsimstring.h" +#include "llslurl.h" #include "llurlhistory.h" #include "llurlwhitelist.h" #include "llvieweraudio.h" @@ -192,6 +192,7 @@ #include "llinventorybridge.h" #include "llappearancemgr.h" #include "llavatariconctrl.h" +#include "llvoicechannel.h" #include "lllogin.h" #include "llevents.h" @@ -228,11 +229,11 @@ static std::string sInitialOutfitGender; // "male" or "female" static bool gUseCircuitCallbackCalled = false; EStartupState LLStartUp::gStartupState = STATE_FIRST; +LLSLURL LLStartUp::sStartSLURL; -// *NOTE:Mani - to reconcile with giab changes... -static std::string gFirstname; -static std::string gLastname; -static std::string gPassword; +static LLPointer<LLCredential> gUserCredential; +static std::string gDisplayName; +static BOOL gRememberPassword = TRUE; static U64 gFirstSimHandle = 0; static LLHost gFirstSim; @@ -249,7 +250,6 @@ boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener( void login_show(); void login_callback(S32 option, void* userdata); -bool is_hex_string(U8* str, S32 len); void show_first_run_dialog(); bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); @@ -262,6 +262,9 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response); void init_start_screen(S32 location_id); void release_start_screen(); void reset_login(); +LLSD transform_cert_args(LLPointer<LLCertificate> cert); +void general_cert_done(const LLSD& notification, const LLSD& response); +void trust_cert_done(const LLSD& notification, const LLSD& response); void apply_udp_blacklist(const std::string& csv); bool process_login_success_response(); void transition_back_to_login_panel(const std::string& emsg); @@ -364,7 +367,7 @@ bool idle_startup() if ( STATE_FIRST == LLStartUp::getStartupState() ) { - gViewerWindow->showCursor(); + gViewerWindow->showCursor(); gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); ///////////////////////////////////////////////// @@ -662,69 +665,25 @@ bool idle_startup() // // Log on to system // - if (!LLStartUp::sSLURLCommand.empty()) - { - // this might be a secondlife:///app/login URL - gLoginHandler.parseDirectLogin(LLStartUp::sSLURLCommand); - } - if (!gLoginHandler.getFirstName().empty() - || !gLoginHandler.getLastName().empty() - /*|| !gLoginHandler.getWebLoginKey().isNull()*/ ) - { - // We have at least some login information on a SLURL - gFirstname = gLoginHandler.getFirstName(); - gLastname = gLoginHandler.getLastName(); - LL_DEBUGS("LLStartup") << "STATE_FIRST: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - - // Show the login screen if we don't have everything - show_connect_box = - gFirstname.empty() || gLastname.empty(); - } - else if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) - { - LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); - gFirstname = cmd_line_login[0].asString(); - gLastname = cmd_line_login[1].asString(); - LL_DEBUGS("LLStartup") << "Setting gFirstname, gLastname from gSavedSettings(\"UserLoginInfo\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - - LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); - char md5pass[33]; /* Flawfinder: ignore */ - pass.hex_digest(md5pass); - gPassword = md5pass; - -#ifdef USE_VIEWER_AUTH - show_connect_box = true; -#else - show_connect_box = false; -#endif - gSavedSettings.setBOOL("AutoLogin", TRUE); - } - else if (gSavedSettings.getBOOL("AutoLogin")) - { - gFirstname = gSavedSettings.getString("FirstName"); - gLastname = gSavedSettings.getString("LastName"); - LL_DEBUGS("LLStartup") << "AutoLogin: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - gPassword = LLStartUp::loadPasswordFromDisk(); - gSavedSettings.setBOOL("RememberPassword", TRUE); - -#ifdef USE_VIEWER_AUTH - show_connect_box = true; -#else - show_connect_box = false; -#endif + if (gUserCredential.isNull()) + { + gUserCredential = gLoginHandler.initializeLoginInfo(); } - else + if (gUserCredential.isNull()) { - // if not automatically logging in, display login dialog - // a valid grid is selected - gFirstname = gSavedSettings.getString("FirstName"); - gLastname = gSavedSettings.getString("LastName"); - LL_DEBUGS("LLStartup") << "normal login: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - gPassword = LLStartUp::loadPasswordFromDisk(); - show_connect_box = true; + show_connect_box = TRUE; + } + else if (gSavedSettings.getBOOL("AutoLogin")) + { + gRememberPassword = TRUE; + gSavedSettings.setBOOL("RememberPassword", TRUE); + show_connect_box = false; + } + else + { + gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); + show_connect_box = TRUE; } - - // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); return FALSE; @@ -756,8 +715,10 @@ bool idle_startup() // Load all the name information out of the login view // NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't // show the login view until login_show() is called below. - // LLPanelLogin::getFields(gFirstname, gLastname, gPassword); - + if (gUserCredential.isNull()) + { + gUserCredential = gLoginHandler.initializeLoginInfo(); + } if (gNoRender) { LL_ERRS("AppInit") << "Need to autologin or use command line with norender!" << LL_ENDL; @@ -768,8 +729,10 @@ bool idle_startup() // Show the login dialog login_show(); // connect dialog is already shown, so fill in the names - LLPanelLogin::setFields( gFirstname, gLastname, gPassword); - + if (gUserCredential.notNull()) + { + LLPanelLogin::setFields( gUserCredential, gRememberPassword); + } LLPanelLogin::giveFocus(); gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); @@ -836,42 +799,39 @@ bool idle_startup() gViewerWindow->moveProgressViewToFront(); //reset the values that could have come in from a slurl - // DEV-42215: Make sure they're not empty -- gFirstname and gLastname + // DEV-42215: Make sure they're not empty -- gUserCredential // might already have been set from gSavedSettings, and it's too bad // to overwrite valid values with empty strings. - if (! gLoginHandler.getFirstName().empty() && ! gLoginHandler.getLastName().empty()) - { - gFirstname = gLoginHandler.getFirstName(); - gLastname = gLoginHandler.getLastName(); - LL_DEBUGS("LLStartup") << "STATE_LOGIN_CLEANUP: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL; - } if (show_connect_box) { // TODO if not use viewer auth // Load all the name information out of the login view - LLPanelLogin::getFields(&gFirstname, &gLastname, &gPassword); + LLPanelLogin::getFields(gUserCredential, gRememberPassword); // end TODO // HACK: Try to make not jump on login gKeyboard->resetKeys(); } - if (!gFirstname.empty() && !gLastname.empty()) - { - gSavedSettings.setString("FirstName", gFirstname); - gSavedSettings.setString("LastName", gLastname); - - LL_INFOS("AppInit") << "Attempting login as: " << gFirstname << " " << gLastname << LL_ENDL; - gDebugInfo["LoginName"] = gFirstname + " " + gLastname; + // save the credentials + std::string userid = "unknown"; + if(gUserCredential.notNull()) + { + userid = gUserCredential->userID(); + gSecAPIHandler->saveCredential(gUserCredential, gRememberPassword); } - + gSavedSettings.setBOOL("RememberPassword", gRememberPassword); + LL_INFOS("AppInit") << "Attempting login as: " << userid << LL_ENDL; + gDebugInfo["LoginName"] = userid; + // create necessary directories // *FIX: these mkdir's should error check - gDirUtilp->setLindenUserDir(gFirstname, gLastname); + gDirUtilp->setLindenUserDir(userid); LLFile::mkdir(gDirUtilp->getLindenUserDir()); - + // Set PerAccountSettingsFile to the default value. + std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"); gSavedSettings.setString("PerAccountSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"))); @@ -900,9 +860,8 @@ bool idle_startup() { gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); } + gDirUtilp->setPerAccountChatLogsDir(userid); - gDirUtilp->setPerAccountChatLogsDir(gFirstname, gLastname); - LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); @@ -923,11 +882,7 @@ bool idle_startup() if (show_connect_box) { - std::string location; - LLPanelLogin::getLocation( location ); - LLURLSimString::setString( location ); - - // END TODO + LLSLURL slurl; LLPanelLogin::closePanel(); } @@ -951,26 +906,21 @@ bool idle_startup() // their last location, or some URL "-url //sim/x/y[/z]" // All accounts have both a home and a last location, and we don't support // more locations than that. Choose the appropriate one. JC - if (LLURLSimString::parse()) - { - // a startup URL was specified - agent_location_id = START_LOCATION_ID_URL; - - // doesn't really matter what location_which is, since - // gAgentStartLookAt will be overwritten when the - // UserLoginLocationReply arrives - location_which = START_LOCATION_ID_LAST; - } - else if (gSavedSettings.getString("LoginLocation") == "last" ) - { - agent_location_id = START_LOCATION_ID_LAST; // last location - location_which = START_LOCATION_ID_LAST; - } - else - { - agent_location_id = START_LOCATION_ID_HOME; // home - location_which = START_LOCATION_ID_HOME; - } + switch (LLStartUp::getStartSLURL().getType()) + { + case LLSLURL::LOCATION: + agent_location_id = START_LOCATION_ID_URL; + location_which = START_LOCATION_ID_LAST; + break; + case LLSLURL::LAST_LOCATION: + agent_location_id = START_LOCATION_ID_LAST; + location_which = START_LOCATION_ID_LAST; + break; + default: + agent_location_id = START_LOCATION_ID_HOME; + location_which = START_LOCATION_ID_HOME; + break; + } gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); @@ -997,7 +947,7 @@ bool idle_startup() if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) { - gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); + gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel(); // Update progress status and the display loop. auth_desc = LLTrans::getString("LoginInProgress"); @@ -1021,11 +971,7 @@ bool idle_startup() // This call to LLLoginInstance::connect() starts the // authentication process. - LLSD credentials; - credentials["first"] = gFirstname; - credentials["last"] = gLastname; - credentials["passwd"] = gPassword; - login->connect(credentials); + login->connect(gUserCredential); LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK ); return FALSE; @@ -1050,10 +996,11 @@ bool idle_startup() { LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): " << LLLoginInstance::getInstance()->getResponse() << LL_ENDL; + LLSD response = LLLoginInstance::getInstance()->getResponse(); // Still have error conditions that may need some // sort of handling. - std::string reason_response = LLLoginInstance::getInstance()->getResponse("reason"); - std::string message_response = LLLoginInstance::getInstance()->getResponse("message"); + std::string reason_response = response["reason"]; + std::string message_response = response["message"]; if(!message_response.empty()) { @@ -1073,8 +1020,8 @@ bool idle_startup() if(reason_response == "key") { // Couldn't login because user/password is wrong - // Clear the password - gPassword = ""; + // Clear the credential + gUserCredential->clearAuthenticator(); } if(reason_response == "update" @@ -1087,18 +1034,65 @@ bool idle_startup() LLLoginInstance::getInstance()->disconnect(); LLAppViewer::instance()->forceQuit(); } - else + else { - // Don't pop up a notification in the TOS case because - // LLFloaterTOS::onCancel() already scolded the user. - if (reason_response != "tos") + if (reason_response != "tos") { - LLSD args; - args["ERROR_MESSAGE"] = emsg.str(); - LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL; - LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); + // Don't pop up a notification in the TOS case because + // LLFloaterTOS::onCancel() already scolded the user. + std::string error_code; + if(response.has("errorcode")) + { + error_code = response["errorcode"].asString(); + } + if ((reason_response == "CURLError") && + (error_code == "SSL_CACERT" || error_code == "SSL_PEER_CERTIFICATE") && + response.has("certificate")) + { + // This was a certificate error, so grab the certificate + // and throw up the appropriate dialog. + LLPointer<LLCertificate> certificate = gSecAPIHandler->getCertificate(response["certificate"]); + if(certificate) + { + LLSD args = transform_cert_args(certificate); + + if(error_code == "SSL_CACERT") + { + // if we are handling an untrusted CA, throw up the dialog + // with the 'trust this CA' button. + LLNotificationsUtil::add("TrustCertificateError", args, response, + trust_cert_done); + + show_connect_box = true; + } + else + { + // the certificate exception returns a unique string for each type of exception. + // we grab this string via the LLUserAuth object, and use that to grab the localized + // string. + args["REASON"] = LLTrans::getString(message_response); + + LLNotificationsUtil::add("GeneralCertificateError", args, response, + general_cert_done); + + reset_login(); + gSavedSettings.setBOOL("AutoLogin", FALSE); + show_connect_box = true; + + } + + } + } + else + { + // This wasn't a certificate error, so throw up the normal + // notificatioin message. + LLSD args; + args["ERROR_MESSAGE"] = emsg.str(); + LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL; + LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); + } } - //setup map of datetime strings to codes and slt & local time offset from utc // *TODO: Does this need to be here? LLStringOps::setupDatetimeInfo (false); @@ -1111,7 +1105,12 @@ bool idle_startup() if(process_login_success_response()) { // Pass the user information to the voice chat server interface. - gVoiceClient->userAuthorized(gFirstname, gLastname, gAgentID); + LLVoiceClient::getInstance()->userAuthorized(gUserCredential->userID(), gAgentID); + // create the default proximal channel + LLVoiceChannel::initClass(); + // update the voice settings + LLVoiceClient::getInstance()->updateSettings(); + LLGridManager::getInstance()->setFavorite(); LLStartUp::setStartupState( STATE_WORLD_INIT); } else @@ -1122,6 +1121,7 @@ bool idle_startup() LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); transition_back_to_login_panel(emsg.str()); show_connect_box = true; + return FALSE; } } return FALSE; @@ -1807,9 +1807,12 @@ bool idle_startup() // thus, do not show this alert. if (!gAgent.isFirstLogin()) { - bool url_ok = LLURLSimString::sInstance.parse(); - if ((url_ok && gAgentStartLocation == "url") || - (!url_ok && ((gAgentStartLocation == gSavedSettings.getString("LoginLocation"))))) + llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl; + LLSLURL start_slurl = LLStartUp::getStartSLURL(); + + if (((start_slurl.getType() == LLSLURL::LOCATION) && (gAgentStartLocation == "url")) || + ((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) || + ((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home"))) { // Start location is OK // Disabled code to restore camera location and focus if logging in to default location @@ -1831,17 +1834,23 @@ bool idle_startup() else { std::string msg; - if (url_ok) + switch(start_slurl.getType()) { - msg = "AvatarMovedDesired"; - } - else if (gSavedSettings.getString("LoginLocation") == "home") - { - msg = "AvatarMovedHome"; - } - else - { - msg = "AvatarMovedLast"; + case LLSLURL::LOCATION: + { + + msg = "AvatarMovedDesired"; + break; + } + case LLSLURL::HOME_LOCATION: + { + msg = "AvatarMovedHome"; + break; + } + default: + { + msg = "AvatarMovedLast"; + } } LLNotificationsUtil::add(msg); } @@ -2057,20 +2066,9 @@ void login_show() #endif LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), - bUseDebugLogin, + bUseDebugLogin || gSavedSettings.getBOOL("SecondLifeEnterprise"), login_callback, NULL ); - // UI textures have been previously loaded in doPreloadImages() - - LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL; - - LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel(), LLViewerLogin::getInstance()->getGridChoice()); - - LLViewerLogin* vl = LLViewerLogin::getInstance(); - for(int grid_index = GRID_INFO_ADITI; grid_index < GRID_INFO_OTHER; ++grid_index) - { - LLPanelLogin::addServer(vl->getKnownGridLabel((EGridInfo)grid_index), grid_index); - } } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. @@ -2086,9 +2084,6 @@ void login_callback(S32 option, void *userdata) } else if (QUIT_OPTION == option) // *TODO: THIS CODE SEEMS TO BE UNREACHABLE!!!!! login_callback is never called with option equal to QUIT_OPTION { - // Make sure we don't save the password if the user is trying to clear it. - std::string first, last, password; - LLPanelLogin::getFields(&first, &last, &password); if (!gSavedSettings.getBOOL("RememberPassword")) { // turn off the setting and write out to disk @@ -2111,142 +2106,6 @@ void login_callback(S32 option, void *userdata) } } - -// static -std::string LLStartUp::loadPasswordFromDisk() -{ - // Only load password if we also intend to save it (otherwise the user - // wonders what we're doing behind his back). JC - BOOL remember_password = gSavedSettings.getBOOL("RememberPassword"); - if (!remember_password) - { - return std::string(""); - } - - std::string hashed_password(""); - - // Look for legacy "marker" password from settings.ini - hashed_password = gSavedSettings.getString("Marker"); - if (!hashed_password.empty()) - { - // Stomp the Marker entry. - gSavedSettings.setString("Marker", ""); - - // Return that password. - return hashed_password; - } - - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFILE* fp = LLFile::fopen(filepath, "rb"); /* Flawfinder: ignore */ - if (!fp) - { - return hashed_password; - } - - // UUID is 16 bytes, written into ASCII is 32 characters - // without trailing \0 - const S32 HASHED_LENGTH = 32; - U8 buffer[HASHED_LENGTH+1]; - - if (1 != fread(buffer, HASHED_LENGTH, 1, fp)) - { - return hashed_password; - } - - fclose(fp); - - // Decipher with MAC address - LLXORCipher cipher(gMACAddress, 6); - cipher.decrypt(buffer, HASHED_LENGTH); - - buffer[HASHED_LENGTH] = '\0'; - - // Check to see if the mac address generated a bad hashed - // password. It should be a hex-string or else the mac adress has - // changed. This is a security feature to make sure that if you - // get someone's password.dat file, you cannot hack their account. - if(is_hex_string(buffer, HASHED_LENGTH)) - { - hashed_password.assign((char*)buffer); - } - - return hashed_password; -} - - -// static -void LLStartUp::savePasswordToDisk(const std::string& hashed_password) -{ - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFILE* fp = LLFile::fopen(filepath, "wb"); /* Flawfinder: ignore */ - if (!fp) - { - return; - } - - // Encipher with MAC address - const S32 HASHED_LENGTH = 32; - U8 buffer[HASHED_LENGTH+1]; - - LLStringUtil::copy((char*)buffer, hashed_password.c_str(), HASHED_LENGTH+1); - - LLXORCipher cipher(gMACAddress, 6); - cipher.encrypt(buffer, HASHED_LENGTH); - - if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1) - { - LL_WARNS("AppInit") << "Short write" << LL_ENDL; - } - - fclose(fp); -} - - -// static -void LLStartUp::deletePasswordFromDisk() -{ - std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "password.dat"); - LLFile::remove(filepath); -} - - -bool is_hex_string(U8* str, S32 len) -{ - bool rv = true; - U8* c = str; - while(rv && len--) - { - switch(*c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - ++c; - break; - default: - rv = false; - break; - } - } - return rv; -} - void show_first_run_dialog() { LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); @@ -2288,7 +2147,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) // break; case 2: // Teleport // Restart the login process, starting at our home locaton - LLURLSimString::setString("home"); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); break; default: @@ -2508,30 +2367,35 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3 const std::string COMMON_GESTURES_FOLDER = "Common Gestures"; const std::string MALE_GESTURES_FOLDER = "Male Gestures"; const std::string FEMALE_GESTURES_FOLDER = "Female Gestures"; -const std::string MALE_OUTFIT_FOLDER = "Male Shape & Outfit"; -const std::string FEMALE_OUTFIT_FOLDER = "Female Shape & Outfit"; const S32 OPT_CLOSED_WINDOW = -1; const S32 OPT_MALE = 0; const S32 OPT_FEMALE = 1; - +const S32 OPT_TRUST_CERT = 0; +const S32 OPT_CANCEL_TRUST = 1; + bool callback_choose_gender(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +{ + + // These defaults are returned from the server on login. They are set in login.xml. + // If no default is returned from the server, they are retrieved from settings.xml. + + S32 option = LLNotification::getSelectedOption(notification, response); switch(option) { - case OPT_MALE: - LLStartUp::loadInitialOutfit( MALE_OUTFIT_FOLDER, "male" ); - break; - - case OPT_FEMALE: - case OPT_CLOSED_WINDOW: - default: - LLStartUp::loadInitialOutfit( FEMALE_OUTFIT_FOLDER, "female" ); - break; + case OPT_MALE: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultMaleAvatar"), "male" ); + break; + + case OPT_FEMALE: + case OPT_CLOSED_WINDOW: + default: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultFemaleAvatar"), "female" ); + break; } return false; } + void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { @@ -2746,7 +2610,6 @@ void reset_login() //--------------------------------------------------------------------------- -std::string LLStartUp::sSLURLCommand; bool LLStartUp::canGoFullscreen() { @@ -2779,41 +2642,145 @@ void LLStartUp::fontInit() bool LLStartUp::dispatchURL() { // ok, if we've gotten this far and have a startup URL - if (!sSLURLCommand.empty()) + if (!getStartSLURL().isValid()) { - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(sSLURLCommand, web, trusted_browser); + return false; } - else if (LLURLSimString::parse()) - { + if(getStartSLURL().getType() != LLSLURL::APP) + { + // If we started with a location, but we're already // at that location, don't pop dialogs open. LLVector3 pos = gAgent.getPositionAgent(); - F32 dx = pos.mV[VX] - (F32)LLURLSimString::sInstance.mX; - F32 dy = pos.mV[VY] - (F32)LLURLSimString::sInstance.mY; + LLVector3 slurlpos = getStartSLURL().getPosition(); + F32 dx = pos.mV[VX] - slurlpos.mV[VX]; + F32 dy = pos.mV[VY] - slurlpos.mV[VY]; const F32 SLOP = 2.f; // meters - if( LLURLSimString::sInstance.mSimName != gAgent.getRegion()->getName() + if( getStartSLURL().getRegion() != gAgent.getRegion()->getName() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - std::string url = LLURLSimString::getURL(); - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(url, web, trusted_browser); + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), + NULL, false); } return true; } return false; } +void LLStartUp::setStartSLURL(const LLSLURL& slurl) +{ + sStartSLURL = slurl; + switch(slurl.getType()) + { + case LLSLURL::HOME_LOCATION: + { + gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME); + break; + } + case LLSLURL::LAST_LOCATION: + { + gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_LAST); + break; + } + default: + LLGridManager::getInstance()->setGridChoice(slurl.getGrid()); + break; + } +} + bool login_alert_done(const LLSD& notification, const LLSD& response) { LLPanelLogin::giveFocus(); return false; } +// parse the certificate information into args for the +// certificate notifications +LLSD transform_cert_args(LLPointer<LLCertificate> cert) +{ + LLSD args = LLSD::emptyMap(); + std::string value; + LLSD cert_info = cert->getLLSD(); + // convert all of the elements in the cert into + // args for the xml dialog, so we have flexability to + // display various parts of the cert by only modifying + // the cert alert dialog xml. + for(LLSD::map_iterator iter = cert_info.beginMap(); + iter != cert_info.endMap(); + iter++) + { + // key usage and extended key usage + // are actually arrays, and we want to format them as comma separated + // strings, so special case those. + LLSDSerialize::toXML(cert_info[iter->first], std::cout); + if((iter->first== std::string(CERT_KEY_USAGE)) | + (iter->first == std::string(CERT_EXTENDED_KEY_USAGE))) + { + value = ""; + LLSD usage = cert_info[iter->first]; + for (LLSD::array_iterator usage_iter = usage.beginArray(); + usage_iter != usage.endArray(); + usage_iter++) + { + + if(usage_iter != usage.beginArray()) + { + value += ", "; + } + + value += (*usage_iter).asString(); + } + + } + else + { + value = iter->second.asString(); + } + + std::string name = iter->first; + std::transform(name.begin(), name.end(), name.begin(), + (int(*)(int))toupper); + args[name.c_str()] = value; + } + return args; +} + + +// when we handle a cert error, give focus back to the login panel +void general_cert_done(const LLSD& notification, const LLSD& response) +{ + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + LLPanelLogin::giveFocus(); +} + +// check to see if the user wants to trust the cert. +// if they do, add it to the cert store and +void trust_cert_done(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + switch(option) + { + case OPT_TRUST_CERT: + { + LLPointer<LLCertificate> cert = gSecAPIHandler->getCertificate(notification["payload"]["certificate"]); + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(gSavedSettings.getString("CertStore")); + store->add(cert); + store->save(); + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); + break; + } + case OPT_CANCEL_TRUST: + reset_login(); + gSavedSettings.setBOOL("AutoLogin", FALSE); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + default: + LLPanelLogin::giveFocus(); + break; + } + +} void apply_udp_blacklist(const std::string& csv) { @@ -2861,33 +2828,45 @@ bool process_login_success_response() text = response["secure_session_id"].asString(); if(!text.empty()) gAgent.mSecureSessionID.set(text); - text = response["first_name"].asString(); - if(!text.empty()) - { - // Remove quotes from string. Login.cgi sends these to force - // names that look like numbers into strings. - gFirstname.assign(text); - LLStringUtil::replaceChar(gFirstname, '"', ' '); - LLStringUtil::trim(gFirstname); - } - text = response["last_name"].asString(); - if(!text.empty()) + // if the response contains a display name, use that, + // otherwise if the response contains a first and/or last name, + // use those. Otherwise use the credential identifier + + gDisplayName = ""; + if (response.has("display_name")) { - gLastname.assign(text); + gDisplayName.assign(response["display_name"].asString()); + if(!gDisplayName.empty()) + { + // Remove quotes from string. Login.cgi sends these to force + // names that look like numbers into strings. + LLStringUtil::replaceChar(gDisplayName, '"', ' '); + LLStringUtil::trim(gDisplayName); + } } - gSavedSettings.setString("FirstName", gFirstname); - gSavedSettings.setString("LastName", gLastname); - - if (gSavedSettings.getBOOL("RememberPassword")) + if(gDisplayName.empty()) { - // Successful login means the password is valid, so save it. - LLStartUp::savePasswordToDisk(gPassword); + if(response.has("first_name")) + { + gDisplayName.assign(response["first_name"].asString()); + LLStringUtil::replaceChar(gDisplayName, '"', ' '); + LLStringUtil::trim(gDisplayName); + } + if(response.has("last_name")) + { + text.assign(response["last_name"].asString()); + LLStringUtil::replaceChar(text, '"', ' '); + LLStringUtil::trim(text); + if(!gDisplayName.empty()) + { + gDisplayName += " "; + } + gDisplayName += text; + } } - else + if(gDisplayName.empty()) { - // Don't leave password from previous session sitting around - // during this login session. - LLStartUp::deletePasswordFromDisk(); + gDisplayName.assign(gUserCredential->asString()); } // this is their actual ability to access content @@ -2981,7 +2960,7 @@ bool process_login_success_response() // replace the default help URL format gSavedSettings.setString("HelpURLFormat",text); - // don't fall back to Nebraska's pre-connection static help + // don't fall back to Standalone's pre-connection static help gSavedSettings.setBOOL("HelpUseLocal", false); } @@ -3044,6 +3023,37 @@ bool process_login_success_response() LLStringOps::setupDatetimeInfo(pacific_daylight_time); } + // set up the voice configuration. Ultimately, we should pass this up as part of each voice + // channel if we need to move to multiple voice servers per grid. + LLSD voice_config_info = response["voice-config"]; + if(voice_config_info.has("VoiceServerType")) + { + gSavedSettings.setString("VoiceServerType", voice_config_info["VoiceServerType"].asString()); + } + + // Request the map server url + std::string map_server_url = response["map-server-url"]; + if(!map_server_url.empty()) + { + gSavedSettings.setString("MapServerURL", map_server_url); + } + + // Default male and female avatars allowing the user to choose their avatar on first login. + // These may be passed up by SLE to allow choice of enterprise avatars instead of the standard + // "new ruth." Not to be confused with 'initial-outfit' below + LLSD newuser_config = response["newuser-config"]; + if(newuser_config.has("DefaultFemaleAvatar")) + { + gSavedSettings.setString("DefaultFemaleAvatar", newuser_config["DefaultFemaleAvatar"].asString()); + } + if(newuser_config.has("DefaultMaleAvatar")) + { + gSavedSettings.setString("DefaultMaleAvatar", newuser_config["DefaultMaleAvatar"].asString()); + } + + // Initial outfit for the user. + // QUESTION: Why can't we simply simply set the users outfit directly + // from a web page into the user info on the server? - Roxie LLSD initial_outfit = response["initial-outfit"][0]; if(initial_outfit.size()) { @@ -3097,7 +3107,7 @@ bool process_login_success_response() bool success = false; // JC: gesture loading done below, when we have an asset system - // in place. Don't delete/clear user_credentials until then. + // in place. Don't delete/clear gUserCredentials until then. if(gAgentID.notNull() && gAgentSessionID.notNull() && gMessageSystem->mOurCircuitCode diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 92fe9521d3..16cc74504f 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -38,6 +38,7 @@ class LLViewerTexture ; class LLEventPump; class LLStartupListener; +class LLSLURL; // functions bool idle_startup(); @@ -101,26 +102,18 @@ public: static void loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ); - // Load MD5 of user's password from local disk file. - static std::string loadPasswordFromDisk(); - - // Record MD5 of user's password for subsequent login. - static void savePasswordToDisk(const std::string& hashed_password); - - // Delete the saved password local disk file. - static void deletePasswordFromDisk(); static bool dispatchURL(); // if we have a SLURL or sim string ("Ahern/123/45") that started // the viewer, dispatch it - static std::string sSLURLCommand; - // *HACK: On startup, if we were passed a secondlife://app/do/foo - // command URL, store it for later processing. - static void postStartupState(); + static void setStartSLURL(const LLSLURL& slurl); + static LLSLURL& getStartSLURL() { return sStartSLURL; } private: + static LLSLURL sStartSLURL; + static std::string startupStateToString(EStartupState state); static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState static boost::scoped_ptr<LLEventPump> sStateWatcher; diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index 61705c4eb3..8fab3bb361 100644 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -51,7 +51,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source) style_params.color.control = "HTMLLinkColor"; style_params.readonly_color.control = "HTMLLinkColor"; style_params.link_href = - LLSLURL::buildCommand("agent", source, "inspect"); + LLSLURL("agent", source, "inspect").getSLURLString(); } else { diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cbb030836e..cb65756764 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -56,14 +56,11 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N mChannel(NULL), mMessageList(NULL), mSysWellChiclet(NULL), - mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel"), mIsReshapedByUser(false) { - mTypedItemsCount[IT_NOTIFICATION] = 0; - mTypedItemsCount[IT_INSTANT_MESSAGE] = 0; setOverlapsScreenChannel(true); } @@ -75,18 +72,6 @@ BOOL LLSysWellWindow::postBuild() // get a corresponding channel initChannel(); - LLPanel::Params params; - mSeparator = LLUICtrlFactory::create<LLPanel>(params); - LLUICtrlFactory::instance().buildPanel(mSeparator, "panel_separator.xml"); - - LLRect rc = mSeparator->getRect(); - rc.setOriginAndSize(0, 0, mMessageList->getItemsRect().getWidth(), rc.getHeight()); - mSeparator->setRect(rc); - mSeparator->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); - mSeparator->setVisible(FALSE); - - 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)); @@ -130,7 +115,7 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { - handleItemRemoved(IT_NOTIFICATION); + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); } else @@ -258,76 +243,7 @@ void LLSysWellWindow::releaseNewMessagesState() //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { - // keep in mind, mSeparator is always in the list - return mMessageList->size() == 1; -} - -// *TODO: mantipov: probably is deprecated -void LLSysWellWindow::handleItemAdded(EItemType added_item_type) -{ - bool should_be_shown = ++mTypedItemsCount[added_item_type] == 1 && anotherTypeExists(added_item_type); - - if (should_be_shown && !mSeparator->getVisible()) - { - mSeparator->setVisible(TRUE); - - // 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); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type) -{ - bool should_be_hidden = --mTypedItemsCount[removed_item_type] == 0; - - if (should_be_hidden && mSeparator->getVisible()) - { - mSeparator->setVisible(FALSE); - - // refresh list to recalculate mSeparator position - mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -bool LLSysWellWindow::anotherTypeExists(EItemType item_type) -{ - bool exists = false; - switch(item_type) - { - case IT_INSTANT_MESSAGE: - if (mTypedItemsCount[IT_NOTIFICATION] > 0) - { - exists = true; - } - break; - case IT_NOTIFICATION: - if (mTypedItemsCount[IT_INSTANT_MESSAGE] > 0) - { - exists = true; - } - break; - } - return exists; + return mMessageList->size() == 0; } /************************************************************************/ @@ -559,8 +475,7 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) LLSysWellItem* new_item = new LLSysWellItem(p); if (mMessageList->addItem(new_item, value, ADD_TOP)) { - handleItemAdded(IT_NOTIFICATION); - + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); @@ -755,9 +670,9 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) { RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId); - if (mMessageList->insertItemAfter(mSeparator, item, sessionId)) + if (mMessageList->addItem(item, sessionId)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -782,7 +697,7 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) if (mMessageList->removeItemByValue(sessionId)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -810,9 +725,9 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag if (mMessageList->getItemByValue(notification_id) == NULL) { ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); - if (mMessageList->insertItemAfter(mSeparator, item, notification_id)) + if (mMessageList->addItem(item, notification_id)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -827,7 +742,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 296bdf7482..c8215c71ee 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -82,20 +82,12 @@ public: protected: - typedef enum{ - IT_NOTIFICATION, - IT_INSTANT_MESSAGE - }EItemType; - // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111) void getAllowedRect(LLRect& rect); // init Window's channel virtual void initChannel(); - void handleItemAdded(EItemType added_item_type); - void handleItemRemoved(EItemType removed_item_type); - bool anotherTypeExists(EItemType item_type) ; const std::string NOTIFICATION_WELL_ANCHOR_NAME; const std::string IM_WELL_ANCHOR_NAME; @@ -113,15 +105,6 @@ protected: */ 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 - */ - LLPanel* mSeparator; - - typedef std::map<EItemType, S32> typed_items_count_t; - typed_items_count_t mTypedItemsCount; bool mIsReshapedByUser; }; diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index dcc85392f7..15684337f4 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -136,6 +136,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check { llwarns << "Invalid current item. (this should not happen)" << llendl; + llassert(!"Invalid current teleport histiry item"); return; } LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos); @@ -166,6 +167,17 @@ void LLTeleportHistory::onHistoryChanged() void LLTeleportHistory::purgeItems() { + if (mItems.size() == 0) // no entries yet (we're called before login) + { + // If we don't return here the history will get into inconsistent state, hence: + // 1) updateCurrentLocation() will malfunction, + // so further teleports will not properly update the history; + // 2) mHistoryChangedSignal subscribers will be notified + // of such an invalid change. (EXT-6798) + // Both should not happen. + return; + } + if (mItems.size() > 0) { mItems.erase(mItems.begin(), mItems.end()-1); diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index c635f91423..430d62e15e 100644 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -89,6 +89,13 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange() if (!th) return; + // Hacky sanity check. (EXT-6798) + if (th->getItems().size() == 0) + { + llassert(!"Inconsistent teleport history state"); + return; + } + const LLTeleportHistoryItem &item = th->getItems()[th->getCurrentItemIndex()]; addItem(item.mTitle, item.mGlobalPos); diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 4262264a1d..82fa672342 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -178,7 +178,7 @@ BOOL LLTexLayerSetBuffer::needsRender() BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating; if (needs_update) { - BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT); + BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(LLWearableType::WT_SKIRT); if (invalid_skirt) { // we were trying to create a skirt texture @@ -1848,7 +1848,7 @@ U32 LLTexLayerTemplate::updateWearableCache() //this isn't a cloneable layer return 0; } - EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te); U32 num_wearables = gAgentWearables.getWearableCount(wearable_type); U32 added = 0; for (U32 i = 0; i < num_wearables; i++) diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 5e5d344461..35acf883c7 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -234,8 +234,8 @@ BOOL LLTexLayerParamAlpha::getSkip() const } } - EWearableType type = (EWearableType)getWearableType(); - if ((type != WT_INVALID) && !avatar->isWearingWearableType(type)) + LLWearableType::EType type = (LLWearableType::EType)getWearableType(); + if ((type != LLWearableType::WT_INVALID) && !avatar->isWearingWearableType(type)) { return TRUE; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index df79725474..9ad2322765 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -401,7 +401,8 @@ bool LLTextureCacheRemoteWorker::doRead() // Second state / stage : identify the cache or not... if (!done && (mState == CACHE)) { - idx = mCache->getHeaderCacheEntry(mID, mImageSize); + LLTextureCache::Entry entry ; + idx = mCache->getHeaderCacheEntry(mID, entry); if (idx < 0) { // The texture is *not* cached. We're done here... @@ -410,6 +411,7 @@ bool LLTextureCacheRemoteWorker::doRead() } else { + mImageSize = entry.mImageSize ; // If the read offset is bigger than the header cache, we read directly from the body // Note that currently, we *never* read with offset from the cache, so the result is *always* HEADER mState = mOffset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; @@ -531,13 +533,14 @@ bool LLTextureCacheRemoteWorker::doRead() bool LLTextureCacheRemoteWorker::doWrite() { bool done = false; - S32 idx = -1; + S32 idx = -1; // First state / stage : check that what we're trying to cache is in an OK shape if (mState == INIT) { llassert_always(mOffset == 0); // We currently do not support write offsets llassert_always(mDataSize > 0); // Things will go badly wrong if mDataSize is nul or negative... + llassert_always(mImageSize >= mDataSize); mState = CACHE; } @@ -547,14 +550,19 @@ bool LLTextureCacheRemoteWorker::doWrite() if (!done && (mState == CACHE)) { bool alreadyCached = false; - S32 cur_imagesize = 0; + LLTextureCache::Entry entry ; + // Checks if this image is already in the entry list - idx = mCache->getHeaderCacheEntry(mID, cur_imagesize); - if (idx >= 0 && (cur_imagesize > 0)) + idx = mCache->getHeaderCacheEntry(mID, entry); + if(idx < 0) + { + idx = mCache->setHeaderCacheEntry(mID, entry, mImageSize, mDataSize); // create the new entry. + } + else { - alreadyCached = true; // already there and non empty + alreadyCached = mCache->updateEntry(idx, entry, mImageSize, mDataSize); // update the existing entry. } - idx = mCache->setHeaderCacheEntry(mID, mImageSize); // create or touch the entry + if (idx < 0) { llwarns << "LLTextureCacheWorker: " << mID @@ -564,10 +572,6 @@ bool LLTextureCacheRemoteWorker::doWrite() } else { - if (cur_imagesize > 0 && (mImageSize != cur_imagesize)) - { - alreadyCached = false; // re-write the header if the size changed in all cases - } if (alreadyCached && (mDataSize <= TEXTURE_CACHE_ENTRY_SIZE)) { // Small texture already cached case: we're done with writing @@ -630,7 +634,7 @@ bool LLTextureCacheRemoteWorker::doWrite() { llassert(mDataSize > TEXTURE_CACHE_ENTRY_SIZE); // wouldn't make sense to be here otherwise... S32 file_size = mDataSize - TEXTURE_CACHE_ENTRY_SIZE; - if ((file_size > 0) && mCache->updateTextureEntryList(mID, file_size)) + { // build the cache file name from the UUID std::string filename = mCache->getTextureFileName(mID); @@ -648,10 +652,7 @@ bool LLTextureCacheRemoteWorker::doWrite() done = true; } } - else - { - mDataSize = 0; // no data written - } + // Nothing else to do at that point... done = true; } @@ -825,53 +826,6 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id) return filename; } -bool LLTextureCache::updateTextureEntryList(const LLUUID& id, S32 bodysize) -{ - bool res = false; - bool purge = false; - { - LLMutexLock lock(&mHeaderMutex); - size_map_t::iterator iter1 = mTexturesSizeMap.find(id); - if (iter1 == mTexturesSizeMap.end() || iter1->second < bodysize) - { - llassert_always(bodysize > 0); - - S32 oldbodysize = 0; - if (iter1 != mTexturesSizeMap.end()) - { - oldbodysize = iter1->second; - } - - Entry entry; - S32 idx = openAndReadEntry(id, entry, false); - if (idx < 0) - { - llwarns << "Failed to open entry: " << id << llendl; - removeCachedTexture(id) ; - return false; - } - else if (oldbodysize != entry.mBodySize) - { - // only happens to 64 bits systems, do not know why. - llwarns << "Entry mismatch in mTextureSizeMap / mHeaderIDMap" - << " idx=" << idx << " oldsize=" << oldbodysize << " entrysize=" << entry.mBodySize << llendl; - } - updateEntry(idx, entry, entry.mImageSize, bodysize); - - if (mTexturesSizeTotal > sCacheMaxTexturesSize) - { - purge = true; - } - res = true; - } - } - if (purge) - { - mDoPurge = TRUE; - } - return res; -} - //debug BOOL LLTextureCache::isInCache(const LLUUID& id) { @@ -1207,55 +1161,64 @@ void LLTextureCache::updateEntryTimeStamp(S32 idx, Entry& entry) { if (!mReadOnly) { - llassert_always(entry.mImageSize > entry.mBodySize); - entry.mTime = time(NULL); mUpdatedEntryMap[idx] = entry ; } } } -//mHeaderMutex is locked before calling this. //update an existing entry, write to header file immediately. -void LLTextureCache::updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size) +bool LLTextureCache::updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_data_size) { - llassert_always(new_image_size > -1) ; - + S32 new_body_size = llmax(0, new_data_size - TEXTURE_CACHE_ENTRY_SIZE) ; + if(new_image_size == entry.mImageSize && new_body_size == entry.mBodySize) { - updateEntryTimeStamp(idx, entry) ; //nothing changed. + return true ; //nothing changed. } - else if (idx >= 0) + else { - if (!mReadOnly) - { - llassert_always(new_image_size > new_body_size) ; + bool purge = false ; - bool update_header = false ; - if(entry.mImageSize < 0) //is a brand-new entry - { - mHeaderIDMap[entry.mID] = idx; - mTexturesSizeMap[entry.mID] = new_body_size ; - mTexturesSizeTotal += new_body_size ; - - // Update Header - update_header = true ; - } - else if (entry.mBodySize != new_body_size) - { - //already in mHeaderIDMap. - mTexturesSizeMap[entry.mID] = new_body_size ; - mTexturesSizeTotal -= entry.mBodySize ; - mTexturesSizeTotal += new_body_size ; - } - entry.mTime = time(NULL); - entry.mImageSize = new_image_size ; - entry.mBodySize = new_body_size ; + lockHeaders() ; + + bool update_header = false ; + if(entry.mImageSize < 0) //is a brand-new entry + { + mHeaderIDMap[entry.mID] = idx; + mTexturesSizeMap[entry.mID] = new_body_size ; + mTexturesSizeTotal += new_body_size ; -// llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; - writeEntryToHeaderImmediately(idx, entry, update_header) ; + // Update Header + update_header = true ; + } + else if (entry.mBodySize != new_body_size) + { + //already in mHeaderIDMap. + mTexturesSizeMap[entry.mID] = new_body_size ; + mTexturesSizeTotal -= entry.mBodySize ; + mTexturesSizeTotal += new_body_size ; + } + entry.mTime = time(NULL); + entry.mImageSize = new_image_size ; + entry.mBodySize = new_body_size ; + + writeEntryToHeaderImmediately(idx, entry, update_header) ; + + if (mTexturesSizeTotal > sCacheMaxTexturesSize) + { + purge = true; + } + + unlockHeaders() ; + + if (purge) + { + mDoPurge = TRUE; } } + + return false ; } U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) @@ -1658,39 +1621,37 @@ LLTextureCacheWorker* LLTextureCache::getWriter(handle_t handle) // Called from work thread // Reads imagesize from the header, updates timestamp -S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, S32& imagesize) +S32 LLTextureCache::getHeaderCacheEntry(const LLUUID& id, Entry& entry) { - LLMutexLock lock(&mHeaderMutex); - Entry entry; + LLMutexLock lock(&mHeaderMutex); S32 idx = openAndReadEntry(id, entry, false); if (idx >= 0) - { - imagesize = entry.mImageSize; + { updateEntryTimeStamp(idx, entry); // updates time } return idx; } // Writes imagesize to the header, updates timestamp -S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, S32 imagesize) +S32 LLTextureCache::setHeaderCacheEntry(const LLUUID& id, Entry& entry, S32 imagesize, S32 datasize) { mHeaderMutex.lock(); - llassert_always(imagesize >= 0); - Entry entry; S32 idx = openAndReadEntry(id, entry, true); + mHeaderMutex.unlock(); + if (idx >= 0) { - updateEntry(idx, entry, imagesize, entry.mBodySize); - mHeaderMutex.unlock(); + updateEntry(idx, entry, imagesize, datasize); } else // retry { - mHeaderMutex.unlock(); readHeaderCache(); // We couldn't write an entry, so refresh the LRU + mHeaderMutex.lock(); llassert_always(!mLRU.empty() || mHeaderEntriesInfo.mEntries < sCacheMaxEntries); mHeaderMutex.unlock(); - idx = setHeaderCacheEntry(id, imagesize); // assert above ensures no inf. recursion + + idx = setHeaderCacheEntry(id, entry, imagesize, datasize); // assert above ensures no inf. recursion } return idx; } diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 5dc06ff401..0fceee3011 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -144,7 +144,6 @@ public: protected: // Accessed by LLTextureCacheWorker - bool updateTextureEntryList(const LLUUID& id, S32 size); std::string getLocalFileName(const LLUUID& id); std::string getTextureFileName(const LLUUID& id); void addCompleted(Responder* responder, bool success); @@ -162,7 +161,7 @@ private: void readEntriesHeader(); void writeEntriesHeader(); S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create); - void updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size); + bool updateEntry(S32 idx, Entry& entry, S32 new_image_size, S32 new_body_size); void updateEntryTimeStamp(S32 idx, Entry& entry) ; U32 openAndReadEntries(std::vector<Entry>& entries); void writeEntriesAndClose(const std::vector<Entry>& entries); @@ -170,8 +169,8 @@ private: void writeEntryToHeaderImmediately(S32 idx, Entry& entry, bool write_header = false) ; void removeEntry(S32 idx, Entry& entry, std::string& filename); void removeCachedTexture(const LLUUID& id) ; - S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); - S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); + S32 getHeaderCacheEntry(const LLUUID& id, Entry& entry); + S32 setHeaderCacheEntry(const LLUUID& id, Entry& entry, S32 imagesize, S32 datasize); void writeUpdatedEntries() ; void updatedHeaderEntriesFile() ; void lockHeaders() { mHeaderMutex.lock(); } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2ea6e5936d..7fa04ce574 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -166,9 +166,10 @@ public: mGetReason = reason; } + void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} + bool getCanUseHTTP()const {return mCanUseHTTP ;} + protected: - LLTextureFetchWorker(LLTextureFetch* fetcher, const LLUUID& id, const LLHost& host, - F32 priority, S32 discard, S32 size); LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, S32 discard, S32 size); @@ -215,8 +216,15 @@ private: QUEUED = 1, SENT_SIM = 2 }; + enum e_write_to_cache_state //mWriteToCacheState + { + NOT_WRITE = 0, + CAN_WRITE = 1, + SHOULD_WRITE = 2 + }; static const char* sStateDescs[]; e_state mState; + e_write_to_cache_state mWriteToCacheState; LLTextureFetch* mFetcher; LLPointer<LLImageFormatted> mFormattedImage; LLPointer<LLImageRaw> mRawImage; @@ -242,15 +250,16 @@ private: S32 mRequestedSize; S32 mDesiredSize; S32 mFileSize; - S32 mCachedSize; - BOOL mLoaded; + S32 mCachedSize; e_request_state mSentRequest; handle_t mDecodeHandle; + BOOL mLoaded; BOOL mDecoded; BOOL mWritten; BOOL mNeedsAux; BOOL mHaveAllData; BOOL mInLocalCache; + bool mCanUseHTTP ; S32 mHTTPFailCount; S32 mRetryAttempt; S32 mActiveCount; @@ -377,6 +386,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, S32 size) // Desired size : LLWorkerClass(fetcher, "TextureFetch"), mState(INIT), + mWriteToCacheState(NOT_WRITE), mFetcher(fetcher), mID(id), mHost(host), @@ -405,6 +415,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mNeedsAux(FALSE), mHaveAllData(FALSE), mInLocalCache(FALSE), + mCanUseHTTP(true), mHTTPFailCount(0), mRetryAttempt(0), mActiveCount(0), @@ -595,7 +606,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } if (mState == INIT) - { + { mRawImage = NULL ; mRequestedDiscard = -1; mLoadedDiscard = -1; @@ -634,23 +645,27 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; } mFileSize = 0; - mLoaded = FALSE; - setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it - - CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); + mLoaded = FALSE; + if (mUrl.compare(0, 7, "file://") == 0) { + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + // read file from local disk std::string filename = mUrl.substr(7, std::string::npos); + CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority, offset, size, responder); } else if (mUrl.empty()) { + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it + + CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, offset, size, responder); } - else + else if(mCanUseHTTP) { if (!(mUrl.compare(0, 7, "http://") == 0)) { @@ -659,8 +674,11 @@ bool LLTextureFetchWorker::doWork(S32 param) } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = SEND_HTTP_REQ; - delete responder; - responder = NULL; + } + else + { + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + mState = LOAD_FROM_NETWORK; } } @@ -694,6 +712,7 @@ bool LLTextureFetchWorker::doWork(S32 param) llassert_always(mFormattedImage->getDataSize() > 0); mLoadedDiscard = mDesiredDiscard; mState = DECODE_IMAGE; + mWriteToCacheState = NOT_WRITE ; LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; @@ -721,7 +740,7 @@ bool LLTextureFetchWorker::doWork(S32 param) static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP"); // if (mHost != LLHost::invalid) get_url = false; - if ( use_http && mUrl.empty())//get http url. + if ( use_http && mCanUseHTTP && mUrl.empty())//get http url. { LLViewerRegion* region = NULL; if (mHost == LLHost::invalid) @@ -735,6 +754,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (!http_url.empty()) { mUrl = http_url + "/?texture_id=" + mID.asString().c_str(); + mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id. } } else @@ -743,16 +763,21 @@ bool LLTextureFetchWorker::doWork(S32 param) //llwarns << "Region not found for host: " << mHost << llendl; } } - if (!mUrl.empty()) + if (mCanUseHTTP && !mUrl.empty()) { mState = LLTextureFetchWorker::SEND_HTTP_REQ; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + if(mWriteToCacheState != NOT_WRITE) + { + mWriteToCacheState = CAN_WRITE ; + } // don't return, fall through to next state } else if (mSentRequest == UNSENT) { // Add this to the network queue and sit here. // LLTextureFetch::update() will send off a request which will change our state + mWriteToCacheState = CAN_WRITE ; mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; mSentRequest = QUEUED; @@ -789,6 +814,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = DECODE_IMAGE; + mWriteToCacheState = SHOULD_WRITE ; } else { @@ -878,7 +904,13 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mGetStatus == HTTP_NOT_FOUND) { mHTTPFailCount = max_attempts = 1; // Don't retry - llinfos << "Texture missing from server (404): " << mUrl << llendl; + //llinfos << "Texture missing from server (404): " << mUrl << llendl; + + //roll back to try UDP + mState = INIT ; + mCanUseHTTP = false ; + setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + return false ; } else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) { @@ -932,10 +964,15 @@ bool LLTextureFetchWorker::doWork(S32 param) } llassert_always(mBufferSize == cur_size + mRequestedSize); - if (mHaveAllData) + if (mHaveAllData && mRequestedDiscard == 0) //the image file is fully loaded. { mFileSize = mBufferSize; } + else //the file size is unknown. + { + mFileSize = mBufferSize + 1 ; //flag the file is not fully loaded. + } + U8* buffer = new U8[mBufferSize]; if (cur_size > 0) { @@ -950,6 +987,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mBufferSize = 0; mLoadedDiscard = mRequestedDiscard; mState = DECODE_IMAGE; + if(mWriteToCacheState != NOT_WRITE) + { + mWriteToCacheState = SHOULD_WRITE ; + } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); return false; } @@ -1049,7 +1090,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == WRITE_TO_CACHE) { - if (mInLocalCache || mSentRequest == UNSENT || mFormattedImage.isNull()) + if (mWriteToCacheState != SHOULD_WRITE || mFormattedImage.isNull()) { // If we're in a local cache or we didn't actually receive any new data, // or we failed to load anything, skip @@ -1057,6 +1098,17 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; } S32 datasize = mFormattedImage->getDataSize(); + if(mFileSize < datasize)//This could happen when http fetching and sim fetching mixed. + { + if(mHaveAllData) + { + mFileSize = datasize ; + } + else + { + mFileSize = datasize + 1 ; //flag not fully loaded. + } + } llassert_always(datasize); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it U32 cache_priority = mWorkPriority; @@ -1438,7 +1490,7 @@ LLTextureFetch::~LLTextureFetch() } bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) + S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) { if (mDebugPause) { @@ -1500,6 +1552,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con worker->mNeedsAux = needs_aux; worker->setImagePriority(priority); worker->setDesiredDiscard(desired_discard, desired_size); + worker->setCanUseHTTP(can_use_http) ; if (!worker->haveWork()) { worker->mState = LLTextureFetchWorker::INIT; @@ -1522,6 +1575,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con worker->lockWorkMutex(); worker->mActiveCount++; worker->mNeedsAux = needs_aux; + worker->setCanUseHTTP(can_use_http) ; worker->unlockWorkMutex(); } @@ -2182,7 +2236,7 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) } S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& requested_priority_p, - U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p) + U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http) { S32 state = LLTextureFetchWorker::INVALID; F32 data_progress = 0.0f; @@ -2220,6 +2274,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r requested_priority = worker->mImagePriority; } fetch_priority = worker->getPriority(); + can_use_http = worker->getCanUseHTTP() ; worker->unlockWorkMutex(); } data_progress_p = data_progress; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index ef2ec520bf..634e590fe0 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -62,7 +62,7 @@ public: void shutDownImageDecodeThread() ; //called in the main thread after the ImageDecodeThread shuts down. bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 discard, bool needs_aux); + S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http); void deleteRequest(const LLUUID& id, bool cancel); bool getRequestFinished(const LLUUID& id, S32& discard_level, LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux); @@ -77,7 +77,7 @@ public: // Debug BOOL isFromLocalCache(const LLUUID& id); S32 getFetchState(const LLUUID& id, F32& decode_progress_p, F32& requested_priority_p, - U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p); + U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http); void dump(); S32 getNumRequests() ; S32 getNumHTTPRequests() ; diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 22b12ee132..568cd4cb19 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -67,6 +67,7 @@ LLToast::Params::Params() LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), + mToastLifetime(p.lifetime_secs), mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), @@ -241,6 +242,13 @@ void LLToast::draw() drawChild(mHideBtn); } } + + // if timer started and remaining time <= fading time + if (mTimer->getStarted() && (mToastLifetime + - mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime) + { + setBackgroundOpaque(FALSE); + } } //-------------------------------------------------------------------------- diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 4a213580da..4211f21ef1 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -209,6 +209,7 @@ private: // timer counts a lifetime of a toast std::auto_ptr<LLToastLifeTimer> mTimer; + F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds LLPanel* mPanel; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 986ccdf19b..2b529a4e50 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -50,6 +50,7 @@ #include "llnotifications.h" #include "llfunctorregistry.h" #include "llrootview.h" +#include "llviewercontrol.h" // for gSavedSettings const S32 MAX_ALLOWED_MSG_WIDTH = 400; const F32 DEFAULT_BUTTON_DELAY = 0.5f; @@ -279,7 +280,18 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight()); mLineEditor->setRect(leditor_rect); mLineEditor->setText(edit_text_contents); - mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); + + // decrease limit of line editor of teleport offer dialog to avoid truncation of + // location URL in invitation message, see EXT-6891 + if ("OfferTeleport" == mNotification->getName()) + { + mLineEditor->setMaxTextLength(gSavedSettings.getS32( + "teleport_offer_invitation_max_length")); + } + else + { + mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); + } LLToastPanel::addChild(mLineEditor); diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index add61c00cf..7eac3867d5 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -133,9 +133,8 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification childSetActionTextbox("attachment", boost::bind( &LLToastGroupNotifyPanel::onClickAttachment, this)); - LLUIImagePtr attachIconImg = get_item_icon(mInventoryOffer->mType, - LLInventoryType::IT_TEXTURE, - 0, FALSE); + LLUIImagePtr attachIconImg = LLInventoryIcon::getIcon(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); pAttachIcon->setValue(attachIconImg->getName()); } diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index c9d2d404c0..9275ca4f42 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -291,7 +291,10 @@ LLToastNotifyPanel::~LLToastNotifyPanel() { // let reusable notification be deleted mNotification->setReusable(false); - LLNotifications::getInstance()->cancel(mNotification); + if (!mNotification->isPersistent()) + { + LLNotifications::getInstance()->cancel(mNotification); + } } } @@ -493,7 +496,7 @@ void LLToastNotifyPanel::onClickButton(void* data) { sButtonClickSignal(self->mNotification->getID(), button_name); - if(new_info) + if(new_info && !self->mNotification->isPersistent()) { self->mNotification->setResponseFunctor( boost::bind(&LLOfferInfo::inventory_offer_callback, new_info, _1, _2)); diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index d142a0665b..71598b3169 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanelgenerictip.h" +#include "llpanelonlinestatus.h" #include "llnotifications.h" #include "lltoastpanel.h" @@ -97,9 +98,19 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification( { LLToastPanel* res = NULL; - if (notification->getName() == "SystemMessageTip") + //process tip toast panels + if ("notifytip" == notification->getType()) { - res = new LLPanelGenericTip(notification); + // if it is online/offline notification + if ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) + { + res = new LLPanelOnlineStatus(notification); + } + // in all other case we use generic tip panel + else + { + res = new LLPanelGenericTip(notification); + } } /* else if(...) diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 04d873f91b..cae5e93545 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -891,7 +891,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) // Look for cursor against the edge of the screen // Only works in fullscreen - if (gSavedSettings.getBOOL("WindowFullScreen")) + if (gSavedSettings.getBOOL("FullScreen")) { if (gAgentCamera.cameraThirdPerson() ) { diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index ab65ead4c5..83a5839a93 100644 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -286,5 +286,11 @@ const char * LLURL::getFullPath() return(sReturnString); } +const char * LLURL::getAuthority() +{ + strncpy(LLURL::sReturnString,mAuthority, LL_MAX_PATH -1); /* Flawfinder: ignore */ + LLURL::sReturnString[LL_MAX_PATH -1] = '\0'; + return(sReturnString); +} char LLURL::sReturnString[LL_MAX_PATH] = ""; diff --git a/indra/newview/llurl.h b/indra/newview/llurl.h index 9a089dd835..e41b83d29f 100644 --- a/indra/newview/llurl.h +++ b/indra/newview/llurl.h @@ -79,6 +79,7 @@ public: virtual const char *getFQURL() const; virtual const char *getFullPath(); + virtual const char *getAuthority(); virtual const char *updateRelativePath(const LLURL &url); diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index b88069cd48..a31c3a0f1b 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2007-2009, Linden Research, Inc. + * Copyright (c) 2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +12,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed 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 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -45,10 +44,10 @@ #include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState -#include "llurlsimstring.h" #include "llweb.h" #include "llworldmapmessage.h" #include "llurldispatcherlistener.h" +#include "llviewernetwork.h" // library includes #include "llnotificationsutil.h" @@ -59,25 +58,25 @@ static LLURLDispatcherListener sURLDispatcherListener; class LLURLDispatcherImpl { public: - static bool dispatch(const std::string& url, + static bool dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser); // returns true if handled or explicitly blocked. - static bool dispatchRightClick(const std::string& url); + static bool dispatchRightClick(const LLSLURL& slurl); private: - static bool dispatchCore(const std::string& url, + static bool dispatchCore(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser); // handles both left and right click - static bool dispatchHelp(const std::string& url, bool right_mouse); + static bool dispatchHelp(const LLSLURL& slurl, bool right_mouse); // Handles sl://app.floater.html.help by showing Help floater. // Returns true if handled. - static bool dispatchApp(const std::string& url, + static bool dispatchApp(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser); @@ -85,16 +84,16 @@ private: // by showing panel in Search floater. // Returns true if handled or explicitly blocked. - static bool dispatchRegion(const std::string& url, bool right_mouse); + static bool dispatchRegion(const LLSLURL& slurl, bool right_mouse); // handles secondlife://Ahern/123/45/67/ // Returns true if handled. - static void regionHandleCallback(U64 handle, const std::string& url, + static void regionHandleCallback(U64 handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport); // Called by LLWorldMap when a location has been resolved to a // region name - static void regionNameCallback(U64 handle, const std::string& url, + static void regionNameCallback(U64 handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport); // Called by LLWorldMap when a region name has been resolved to a // location in-world, used by places-panel display. @@ -103,65 +102,57 @@ private: }; // static -bool LLURLDispatcherImpl::dispatchCore(const std::string& url, +bool LLURLDispatcherImpl::dispatchCore(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser) { - if (url.empty()) return false; - //if (dispatchHelp(url, right_mouse)) return true; - if (dispatchApp(url, right_mouse, web, trusted_browser)) return true; - if (dispatchRegion(url, right_mouse)) return true; + //if (dispatchHelp(slurl, right_mouse)) return true; + switch(slurl.getType()) + { + case LLSLURL::APP: + return dispatchApp(slurl, right_mouse, web, trusted_browser); + case LLSLURL::LOCATION: + return dispatchRegion(slurl, right_mouse); + default: + return false; + } /* // Inform the user we can't handle this std::map<std::string, std::string> args; - args["SLURL"] = url; + args["SLURL"] = slurl; r; */ - - return false; } // static -bool LLURLDispatcherImpl::dispatch(const std::string& url, +bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser) { - llinfos << "url: " << url << llendl; const bool right_click = false; - return dispatchCore(url, right_click, web, trusted_browser); + return dispatchCore(slurl, right_click, web, trusted_browser); } // static -bool LLURLDispatcherImpl::dispatchRightClick(const std::string& url) +bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl) { - llinfos << "url: " << url << llendl; const bool right_click = true; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - return dispatchCore(url, right_click, web, trusted_browser); + return dispatchCore(slurl, right_click, web, trusted_browser); } // static -bool LLURLDispatcherImpl::dispatchApp(const std::string& url, +bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl, bool right_mouse, LLMediaCtrl* web, bool trusted_browser) { - // ensure the URL is in the secondlife:///app/ format - if (!LLSLURL::isSLURLCommand(url)) - { - return false; - } - - LLURI uri(url); - LLSD pathArray = uri.pathArray(); - pathArray.erase(0); // erase "app" - std::string cmd = pathArray.get(0); - pathArray.erase(0); // erase "cmd" + llinfos << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << llendl; bool handled = LLCommandDispatcher::dispatch( - cmd, pathArray, uri.queryMap(), web, trusted_browser); + slurl.getAppCmd(), slurl.getAppPath(), slurl.getAppQuery(), web, trusted_browser); // alert if we didn't handle this secondlife:///app/ SLURL // (but still return true because it is a valid app SLURL) @@ -173,81 +164,72 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, } // static -bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mouse) +bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, bool right_mouse) { - if (!LLSLURL::isSLURL(url)) - { - return false; - } - - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - if (! LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) - { - return false; - } - + if(slurl.getType() != LLSLURL::LOCATION) + { + return false; + } // Before we're logged in, need to update the startup screen // to tell the user where they are going. if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) { - // Parse it and stash in globals, it will be dispatched in - // STATE_CLEANUP. - LLURLSimString::setString(url); // We're at the login screen, so make sure user can see // the login location box to know where they are going. - LLPanelLogin::refreshLocation( true ); + LLPanelLogin::setLocation(slurl); return true; } // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. - //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); - //if(url_displayp) url_displayp->setName(region_name); + //LLFloaterURLDisplay* slurl_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); + //if(slurl_displayp) slurl_displayp->setName(region_name); // Request a region handle by name - LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, - LLURLDispatcherImpl::regionNameCallback, - url, - false); // don't teleport + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(slurl.getRegion(), + LLURLDispatcherImpl::regionNameCallback, + slurl.getSLURLString(), + false); // don't teleport return true; } /*static*/ -void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) +void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport) { - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - - if (LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) - { - regionHandleCallback(region_handle, url, snapshot_id, teleport); - } + + if(slurl.getType() == LLSLURL::LOCATION) + { + regionHandleCallback(region_handle, slurl, snapshot_id, teleport); + } } /* static */ -void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) +void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& slurl, const LLUUID& snapshot_id, bool teleport) { - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - - LLVector3 local_pos; - local_pos.mV[VX] = (F32)x; - local_pos.mV[VY] = (F32)y; - local_pos.mV[VZ] = (F32)z; + // we can't teleport cross grid at this point + if((!LLGridManager::getInstance()->isSystemGrid(slurl.getGrid()) || !LLGridManager::getInstance()->isSystemGrid()) && + (slurl.getGrid() != LLGridManager::getInstance()->getGrid())) + { + LLSD args; + args["SLURL"] = slurl.getLocationString(); + args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); + LLSD grid_info = LLGridManager::getInstance()->getGridInfo(slurl.getGrid()); + + if(grid_info.has(GRID_LABEL_VALUE)) + { + args["GRID"] = grid_info[GRID_LABEL_VALUE].asString(); + } + else + { + args["GRID"] = slurl.getGrid(); + } + LLNotificationsUtil::add("CantTeleportToGrid", args); + return; + } + LLVector3d global_pos = from_region_handle(region_handle); - global_pos += LLVector3d(local_pos); + global_pos += LLVector3d(slurl.getPosition()); if (teleport) { @@ -271,8 +253,8 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. // // display informational floater, allow user to click teleport btn -// LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); -// if(url_displayp) +// LLFloaterURLDisplay* slurl_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); +// if(slurl_displayp) // { // url_displayp->displayParcelInfo(region_handle, local_pos); // if(snapshot_id.notNull()) @@ -287,7 +269,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str //--------------------------------------------------------------------------- // Teleportation links are handled here because they are tightly coupled -// to URL parsing and sim-fragment parsing +// to SLURL parsing and sim-fragment parsing class LLTeleportHandler : public LLCommandHandler { public: @@ -303,18 +285,21 @@ public: // a global position, and teleport to it if (tokens.size() < 1) return false; - // Region names may be %20 escaped. - std::string region_name = LLURLSimString::unescapeRegionName(tokens[0]); - - // build secondlife://De%20Haro/123/45/67 for use in callback - std::string url = LLSLURL::PREFIX_SECONDLIFE; - for (int i = 0; i < tokens.size(); ++i) + LLVector3 coords(128, 128, 0); + if (tokens.size() <= 4) { - url += tokens[i].asString() + "/"; + coords = LLVector3(tokens[1].asReal(), + tokens[2].asReal(), + tokens[3].asReal()); } + + // Region names may be %20 escaped. + + std::string region_name = LLURI::unescape(tokens[0]); + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionHandleCallback, - url, + LLSLURL(region_name, coords).getSLURLString(), true); // teleport return true; } @@ -324,21 +309,21 @@ LLTeleportHandler gTeleportHandler; //--------------------------------------------------------------------------- // static -bool LLURLDispatcher::dispatch(const std::string& url, +bool LLURLDispatcher::dispatch(const std::string& slurl, LLMediaCtrl* web, bool trusted_browser) { - return LLURLDispatcherImpl::dispatch(url, web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), web, trusted_browser); } // static -bool LLURLDispatcher::dispatchRightClick(const std::string& url) +bool LLURLDispatcher::dispatchRightClick(const std::string& slurl) { - return LLURLDispatcherImpl::dispatchRightClick(url); + return LLURLDispatcherImpl::dispatchRightClick(LLSLURL(slurl)); } // static -bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl) { // *NOTE: Text editors are considered sources of trusted URLs // in order to make avatar profile links in chat history work. @@ -348,5 +333,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) // *TODO: Make this trust model more refined. JC const bool trusted_browser = true; LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(url, web, trusted_browser); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), web, trusted_browser); } + + diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index ff8a351253..407e417e58 100644 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -2,9 +2,9 @@ * @file llurldispatcher.h * @brief Central registry for all SL URL handlers * - * $LicenseInfo:firstyear=2007&license=viewergpl$ + * $LicenseInfo:firstyear=2010&license=viewergpl$ * - * Copyright (c) 2007-2009, Linden Research, Inc. + * Copyright (c) 2007-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,13 +12,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed 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 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -31,16 +30,16 @@ */ #ifndef LLURLDISPATCHER_H #define LLURLDISPATCHER_H - class LLMediaCtrl; class LLURLDispatcher { public: - static bool dispatch(const std::string& url, + + static bool dispatch(const std::string& slurl, LLMediaCtrl* web, - bool trusted_browser); + bool trusted_browser); // At startup time and on clicks in internal web browsers, // teleport, open map, or run requested command. // @param url @@ -54,9 +53,9 @@ public: // that navigates to trusted (Linden Lab) pages. // Returns true if someone handled the URL. - static bool dispatchRightClick(const std::string& url); + static bool dispatchRightClick(const std::string& slurl); - static bool dispatchFromTextEditor(const std::string& url); + static bool dispatchFromTextEditor(const std::string& slurl); }; #endif diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 1d2687a8c2..8488527185 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -89,7 +89,7 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; - if (LLSLURL::isSLURL(unescaped_text)) + if (LLSLURL(unescaped_text).isValid()) text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); else text_to_copy = utf8str_to_wstring(unescaped_text); diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 2661c9f32b..1094f030bf 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -145,7 +145,7 @@ void audio_update_volume(bool force_update) { F32 music_volume = gSavedSettings.getF32("AudioLevelMusic"); BOOL music_muted = gSavedSettings.getBOOL("MuteMusic"); - music_volume = mute_volume * master_volume * (music_volume*music_volume); + music_volume = mute_volume * master_volume * music_volume; gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume ); } @@ -153,25 +153,25 @@ void audio_update_volume(bool force_update) // Streaming Media F32 media_volume = gSavedSettings.getF32("AudioLevelMedia"); BOOL media_muted = gSavedSettings.getBOOL("MuteMedia"); - media_volume = mute_volume * master_volume * (media_volume*media_volume); + media_volume = mute_volume * master_volume * media_volume; LLViewerMedia::setVolume( media_muted ? 0.0f : media_volume ); // Voice - if (gVoiceClient) + if (LLVoiceClient::getInstance()) { F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice"); voice_volume = mute_volume * master_volume * voice_volume; BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice"); - gVoiceClient->setVoiceVolume(voice_mute ? 0.f : voice_volume); - gVoiceClient->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); + LLVoiceClient::getInstance()->setVoiceVolume(voice_mute ? 0.f : voice_volume); + LLVoiceClient::getInstance()->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) { - gVoiceClient->setMuteMic(true); + LLVoiceClient::getInstance()->setMuteMic(true); } else { - gVoiceClient->setMuteMic(false); + LLVoiceClient::getInstance()->setMuteMic(false); } } } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 874995a09e..514f72c334 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -443,7 +443,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue) bool handleForceShowGrid(const LLSD& newvalue) { - LLPanelLogin::refreshLocation( false ); + LLPanelLogin::updateServer( ); return true; } @@ -496,12 +496,6 @@ bool toggle_show_favorites_panel(const LLSD& newvalue) 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(); @@ -650,7 +644,6 @@ 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)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 823466e33e..3482ac508e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -169,7 +169,6 @@ void display_startup() void display_update_camera() { LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA); - llpushcallstacks ; // TODO: cut draw distance down if customizing avatar? // TODO: cut draw distance on per-parcel basis? @@ -732,6 +731,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT); + gPipeline.sAllowRebuildPriorityGroup = TRUE ; gPipeline.stateSort(*LLViewerCamera::getInstance(), result); stop_glerror(); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 8a891b1462..49748c59e8 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -36,7 +36,6 @@ #include "llnotificationsutil.h" #include "llsdserialize.h" #include "message.h" -#include "indra_constants.h" #include "llagent.h" #include "llagentcamera.h" @@ -67,6 +66,40 @@ #include "llviewermessage.h" ///---------------------------------------------------------------------------- +/// Helper class to store special inventory item names +///---------------------------------------------------------------------------- +class LLLocalizedInventoryItemsDictionary : public LLSingleton<LLLocalizedInventoryItemsDictionary> +{ +public: + std::map<std::string, std::string> mInventoryItemsDict; + + LLLocalizedInventoryItemsDictionary() + { + mInventoryItemsDict["New Shape"] = LLTrans::getString("New Shape"); + mInventoryItemsDict["New Skin"] = LLTrans::getString("New Skin"); + mInventoryItemsDict["New Hair"] = LLTrans::getString("New Hair"); + mInventoryItemsDict["New Eyes"] = LLTrans::getString("New Eyes"); + mInventoryItemsDict["New Shirt"] = LLTrans::getString("New Shirt"); + mInventoryItemsDict["New Pants"] = LLTrans::getString("New Pants"); + mInventoryItemsDict["New Shoes"] = LLTrans::getString("New Shoes"); + mInventoryItemsDict["New Socks"] = LLTrans::getString("New Socks"); + mInventoryItemsDict["New Jacket"] = LLTrans::getString("New Jacket"); + mInventoryItemsDict["New Gloves"] = LLTrans::getString("New Gloves"); + mInventoryItemsDict["New Undershirt"] = LLTrans::getString("New Undershirt"); + mInventoryItemsDict["New Underpants"] = LLTrans::getString("New Underpants"); + mInventoryItemsDict["New Skirt"] = LLTrans::getString("New Skirt"); + mInventoryItemsDict["New Alpha"] = LLTrans::getString("New Alpha"); + mInventoryItemsDict["New Tattoo"] = LLTrans::getString("New Tattoo"); + mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable"); + + mInventoryItemsDict["New Script"] = LLTrans::getString("New Script"); + mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder"); + mInventoryItemsDict["Contents"] = LLTrans::getString("Contents"); + } +}; + + +///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -265,10 +298,14 @@ void LLViewerInventoryItem::fetchFromServer(void) const // we have to check region. It can be null after region was destroyed. See EXT-245 if (region) { - if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString()) - url = region->getCapability("FetchLib"); - else - url = region->getCapability("FetchInventory"); + if(gAgent.getID() != mPermissions.getOwner()) + { + url = region->getCapability("FetchLib"); + } + else + { + url = region->getCapability("FetchInventory"); + } } else { @@ -316,6 +353,18 @@ BOOL LLViewerInventoryItem::unpackMessage(LLSD item) BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) { BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); + + std::string localized_str; + + std::map<std::string, std::string>::const_iterator dictionary_iter; + + dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.find(mName); + + if(dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end()) + { + mName = dictionary_iter->second; + } + mIsComplete = TRUE; return rv; } @@ -541,7 +590,7 @@ bool LLViewerInventoryCategory::fetch() std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); if (!url.empty()) //Capability found. Build up LLSD and use it. { - LLInventoryModelBackgroundFetch::instance().start(mUUID); + LLInventoryModelBackgroundFetch::instance().start(mUUID, false); } else { //Deprecated, but if we don't have a capability, use the old system. @@ -678,8 +727,8 @@ void LLViewerInventoryCategory::determineFolderType() return; if (item->isWearableType()) { - const EWearableType wearable_type = item->getWearableType(); - const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type); + const LLWearableType::EType wearable_type = item->getWearableType(); + const std::string& wearable_name = LLWearableType::getTypeName(wearable_type); U64 valid_folder_types = LLViewerFolderType::lookupValidFolderTypes(wearable_name); folder_valid |= valid_folder_types; folder_invalid |= ~valid_folder_types; @@ -863,10 +912,29 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& parent, const LLTransactionID& transaction_id, const std::string& name, const std::string& desc, LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, EWearableType wtype, + LLInventoryType::EType inv_type, LLWearableType::EType wtype, U32 next_owner_perm, LLPointer<LLInventoryCallback> cb) { + //check if name is equal to one of special inventory items names + //EXT-5839 + std::string server_name = name; + + { + std::map<std::string, std::string>::const_iterator dictionary_iter; + + for (dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.begin(); + dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end(); + dictionary_iter++) + { + const std::string& localized_name = dictionary_iter->second; + if(localized_name == name) + { + server_name = dictionary_iter->first; + } + } + } + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_CreateInventoryItem); msg->nextBlock(_PREHASH_AgentData); @@ -880,7 +948,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, msg->addS8Fast(_PREHASH_Type, (S8)asset_type); msg->addS8Fast(_PREHASH_InvType, (S8)inv_type); msg->addU8Fast(_PREHASH_WearableType, (U8)wtype); - msg->addStringFast(_PREHASH_Name, name); + msg->addStringFast(_PREHASH_Name, server_name); msg->addStringFast(_PREHASH_Description, desc); gAgent.sendReliableMessage(); @@ -923,6 +991,7 @@ void link_inventory_item( const LLUUID& item_id, const LLUUID& parent_id, const std::string& new_name, + const std::string& new_description, const LLAssetType::EType asset_type, LLPointer<LLInventoryCallback> cb) { @@ -948,7 +1017,6 @@ void link_inventory_item( } LLUUID transaction_id; - std::string desc = "Broken link"; // This should only show if the object can't find its baseobj. LLInventoryType::EType inv_type = LLInventoryType::IT_NONE; if (dynamic_cast<const LLInventoryCategory *>(baseobj)) { @@ -979,7 +1047,7 @@ void link_inventory_item( msg->addS8Fast(_PREHASH_Type, (S8)asset_type); msg->addS8Fast(_PREHASH_InvType, (S8)inv_type); msg->addStringFast(_PREHASH_Name, new_name); - msg->addStringFast(_PREHASH_Description, desc); + msg->addStringFast(_PREHASH_Description, new_description); } gAgent.sendReliableMessage(); } @@ -1131,10 +1199,10 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons else { // Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary. - EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name); - if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT) + LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name); + if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT) { - LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type); + LLAssetType::EType asset_type = LLWearableType::getAssetType(wearable_type); LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type); const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type); LLFolderBridge::createWearable(parent_id, wearable_type); @@ -1472,14 +1540,14 @@ bool LLViewerInventoryItem::isWearableType() const return (getInventoryType() == LLInventoryType::IT_WEARABLE); } -EWearableType LLViewerInventoryItem::getWearableType() const +LLWearableType::EType LLViewerInventoryItem::getWearableType() const { if (!isWearableType()) { llwarns << "item is not a wearable" << llendl; - return WT_INVALID; + return LLWearableType::WT_INVALID; } - return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); + return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 9d449399e8..f0dc7bcb67 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -74,7 +74,7 @@ public: virtual const LLSaleInfo& getSaleInfo() const; virtual LLInventoryType::EType getInventoryType() const; virtual bool isWearableType() const; - virtual EWearableType getWearableType() const; + virtual LLWearableType::EType getWearableType() const; virtual U32 getFlags() const; virtual time_t getCreationDate() const; virtual U32 getCRC32() const; // really more of a checksum. @@ -310,14 +310,14 @@ public: extern LLInventoryCallbackManager gInventoryCallbacks; -#define NOT_WEARABLE (EWearableType)0 +#define NOT_WEARABLE (LLWearableType::EType)0 // *TODO: Find a home for these void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& parent, const LLTransactionID& transaction_id, const std::string& name, const std::string& desc, LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, EWearableType wtype, + LLInventoryType::EType inv_type, LLWearableType::EType wtype, U32 next_owner_perm, LLPointer<LLInventoryCallback> cb); @@ -339,6 +339,7 @@ void link_inventory_item( const LLUUID& item_id, const LLUUID& parent_id, const std::string& new_name, + const std::string& new_description, const LLAssetType::EType asset_type, LLPointer<LLInventoryCallback> cb); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 3c0345df90..4db05e8a98 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewermedia.h" #include "llviewermediafocus.h" #include "llmimetypes.h" @@ -732,10 +733,17 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi } } +static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media"); + ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerMedia::updateMedia(void *dummy_arg) { + LLFastTimer t1(FTM_MEDIA_UPDATE); + + // Enable/disable the plugin read thread + LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); + sAnyMediaShowing = false; sUpdatedCookies = getCookieStore()->getChangedCookies(); if(!sUpdatedCookies.empty()) @@ -1578,6 +1586,7 @@ void LLViewerMediaImpl::destroyMediaSource() if(mMediaSource) { + mMediaSource->setDeleteOK(true) ; delete mMediaSource; mMediaSource = NULL; } @@ -1729,7 +1738,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) } mMediaSource = media_source; - + mMediaSource->setDeleteOK(false) ; updateVolume(); return true; @@ -1914,7 +1923,28 @@ void LLViewerMediaImpl::updateVolume() { if(mMediaSource) { - mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume()); + // always scale the volume by the global media volume + F32 volume = mRequestedVolume * LLViewerMedia::getVolume(); + + if (mProximityCamera > 0) + { + if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMax")) + { + volume = 0; + } + else if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMin")) + { + // attenuated_volume = 1 / (roll_off_rate * (d - min))^2 + // the +1 is there so that for distance 0 the volume stays the same + F64 adjusted_distance = mProximityCamera - gSavedSettings.getF32("MediaRollOffMin"); + F64 attenuation = gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance; + attenuation = 1.0 / (attenuation * attenuation); + // the attenuation multiplier should never be more than one since that would increase volume + volume = volume * llmin(1.0, attenuation); + } + } + + mMediaSource->setVolume(volume); } } @@ -2427,6 +2457,8 @@ void LLViewerMediaImpl::update() } else { + updateVolume(); + // If we didn't just create the impl, it may need to get cookie updates. if(!sUpdatedCookies.empty()) { @@ -2999,6 +3031,9 @@ void LLViewerMediaImpl::calculateInterest() LLVector3d agent_global = gAgent.getPositionGlobal() ; LLVector3d global_delta = agent_global - obj_global ; mProximityDistance = global_delta.magVecSquared(); // use distance-squared because it's cheaper and sorts the same. + + LLVector3d camera_delta = gAgentCamera.getCameraPositionGlobal() - obj_global; + mProximityCamera = camera_delta.magVec(); } if(mNeedsMuteCheck) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index e829d7a5b4..8626f4469e 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -431,6 +431,7 @@ private: bool mIsParcelMedia; S32 mProximity; F64 mProximityDistance; + F64 mProximityCamera; LLMimeDiscoveryResponder *mMimeTypeProbe; bool mMediaAutoPlay; std::string mMediaEntryURL; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index c1e851350b..02e450b223 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -215,6 +215,8 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, // We need the aspect ratio, and the 3 components of the bbox as height, width, and depth. F32 aspect_ratio = getBBoxAspectRatio(bbox, normal, &height, &width, &depth); F32 camera_aspect = LLViewerCamera::getInstance()->getAspect(); + + lldebugs << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << llendl; // We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for // a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is @@ -231,11 +233,15 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, { angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect()); distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); + + lldebugs << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; } else { angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView()); distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); + + lldebugs << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; } distance += depth * 0.5; @@ -440,40 +446,38 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& LLVector3 bbox_max = bbox.getExtentLocal(); F32 dot1 = 0.f; F32 dot2 = 0.f; + + lldebugs << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << llendl; // The largest component of the localized normal vector is the depth component // meaning that the other two are the legs of the rectangle. local_normal.abs(); - if(local_normal.mV[VX] > local_normal.mV[VY]) + + // Using temporary variables for these makes the logic a bit more readable. + bool XgtY = (local_normal.mV[VX] > local_normal.mV[VY]); + bool XgtZ = (local_normal.mV[VX] > local_normal.mV[VZ]); + bool YgtZ = (local_normal.mV[VY] > local_normal.mV[VZ]); + + if(XgtY && XgtZ) { - if(local_normal.mV[VX] > local_normal.mV[VZ]) - { - // Use the y and z comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VX]; - } - else - { - // Use the x and y comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VZ]; - } + lldebugs << "x component of normal is longest, using y and z" << llendl; + comp1.mV[VY] = bbox_max.mV[VY]; + comp2.mV[VZ] = bbox_max.mV[VZ]; + *depth = bbox_max.mV[VX]; } - else if(local_normal.mV[VY] > local_normal.mV[VZ]) + else if(!XgtY && YgtZ) { - // Use the x and z comps + lldebugs << "y component of normal is longest, using x and z" << llendl; comp1.mV[VX] = bbox_max.mV[VX]; comp2.mV[VZ] = bbox_max.mV[VZ]; *depth = bbox_max.mV[VY]; } else { - // Use the x and y comps - comp1.mV[VY] = bbox_max.mV[VY]; - comp2.mV[VZ] = bbox_max.mV[VZ]; - *depth = bbox_max.mV[VX]; + lldebugs << "z component of normal is longest, using x and y" << llendl; + comp1.mV[VX] = bbox_max.mV[VX]; + comp2.mV[VY] = bbox_max.mV[VY]; + *depth = bbox_max.mV[VZ]; } // The height is the vector closest to vertical in the bbox coordinate space (highest dot product value) @@ -483,12 +487,20 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& { *height = comp1.length(); *width = comp2.length(); + + lldebugs << "comp1 = " << comp1 << ", height = " << *height << llendl; + lldebugs << "comp2 = " << comp2 << ", width = " << *width << llendl; } else { *height = comp2.length(); *width = comp1.length(); + + lldebugs << "comp2 = " << comp2 << ", height = " << *height << llendl; + lldebugs << "comp1 = " << comp1 << ", width = " << *width << llendl; } + + lldebugs << "returning " << (*width / *height) << llendl; // Return the aspect ratio. return *width / *height; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7c439d7200..42428bab03 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -430,7 +430,7 @@ void init_menus() gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. - if (LLViewerLogin::getInstance()->isInProductionGrid()) + if (LLGridManager::getInstance()->isInProductionGrid()) { color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); } @@ -446,7 +446,7 @@ void init_menus() menu_bar_holder->addChild(gMenuBarView); gViewerWindow->setMenuBackgroundColor(false, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); // Assume L$10 for now, the server will tell us the real cost at login // *TODO:Also fix cost in llfolderview.cpp for Inventory menus @@ -3468,7 +3468,7 @@ void set_god_level(U8 god_level) if(gViewerWindow) { gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); } LLSD args; @@ -3508,7 +3508,7 @@ BOOL check_toggle_hacked_godmode(void*) bool enable_toggle_hacked_godmode(void*) { - return !LLViewerLogin::getInstance()->isInProductionGrid(); + return !LLGridManager::getInstance()->isInProductionGrid(); } #endif @@ -3786,7 +3786,9 @@ class LLViewFullscreen : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gViewerWindow->toggleFullscreen(TRUE); + // we no longer permit full screen mode EXT-6775 + // gViewerWindow->toggleFullscreen(TRUE); + llwarns << "full screen mode no longer supported" << llendl; return true; } }; @@ -4379,7 +4381,7 @@ BOOL enable_take() return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; @@ -4992,7 +4994,7 @@ bool enable_object_delete() TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - (!LLViewerLogin::getInstance()->isInProductionGrid() + (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) || # endif LLSelectMgr::getInstance()->canDoDelete(); @@ -6636,7 +6638,7 @@ bool enable_object_take_copy() all_valid = true; #ifndef HACKED_GODLIKE_VIEWER # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (LLViewerLogin::getInstance()->isInProductionGrid() + if (LLGridManager::getInstance()->isInProductionGrid() || !gAgent.isGodlike()) # endif { @@ -6698,7 +6700,7 @@ BOOL enable_save_into_inventory(void*) return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; @@ -7472,8 +7474,8 @@ class LLEditEnableTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - EWearableType type = LLWearableDictionary::typeNameToType(clothing); - if (type >= WT_SHAPE && type < WT_COUNT) + LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) return LLAgentWearables::selfHasWearable(type); return false; } @@ -7488,8 +7490,8 @@ class LLEditTakeOff : public view_listener_t LLWearableBridge::removeAllClothesFromAvatar(); else { - EWearableType type = LLWearableDictionary::typeNameToType(clothing); - if (type >= WT_SHAPE && type < WT_COUNT) + LLWearableType::EType type = LLWearableType::typeNameToType(clothing); + if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) { // MULTI-WEARABLES LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c8a4b27f40..86e040692c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -794,7 +794,10 @@ private: // Store selected items (without destination folder) mSelectedItems.clear(); - mActivePanel->getRootFolder()->getSelectionList(mSelectedItems); + if (mActivePanel) + { + mSelectedItems = mActivePanel->getRootFolder()->getSelectionList(); + } mSelectedItems.erase(mMoveIntoFolderID); } @@ -826,8 +829,7 @@ private: } // get selected items (without destination folder) - selected_items_t selected_items; - mActivePanel->getRootFolder()->getSelectionList(selected_items); + selected_items_t selected_items = mActivePanel->getRootFolder()->getSelectionList(); selected_items.erase(mMoveIntoFolderID); // compare stored & current sets of selected items @@ -1032,21 +1034,26 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) { // Use the name of the last item giver, who is probably the person // spamming you. - std::ostringstream message; - message << LLAppViewer::instance()->getSecondLifeTitle(); + + LLStringUtil::format_map_t arg; + std::string log_msg; + std::ostringstream time ; + time<<OFFER_THROTTLE_TIME; + + arg["APP_NAME"] = LLAppViewer::instance()->getSecondLifeTitle(); + arg["TIME"] = time.str(); + if (!from_name.empty()) { - message << ": Items coming in too fast from " << from_name; + arg["FROM_NAME"] = from_name; + log_msg = LLTrans::getString("ItemsComingInTooFastFrom", arg); } else { - message << ": Items coming in too fast"; + log_msg = LLTrans::getString("ItemsComingInTooFast", arg); } - message << ", automatic preview disabled for " - << OFFER_THROTTLE_TIME << " seconds."; //this is kinda important, so actually put it on screen - std::string log_msg = message.str(); LLSD args; args["MESSAGE"] = log_msg; LLNotificationsUtil::add("SystemMessage", args); @@ -1083,7 +1090,7 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. - const LLAssetType::EType asset_type = item->getType(); + const LLAssetType::EType asset_type = item->getActualType(); if (check_offer_throttle(from_name, false)) // If we are throttled, don't display { LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL; @@ -1229,7 +1236,6 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, bool matches(const LLNotificationPtr notification) const { if(notification->getName() == "ObjectGiveItem" - || notification->getName() == "ObjectGiveItemUnknownUser" || notification->getName() == "UserGiveItem") { return (notification->getPayload()["from_id"].asUUID() == blocked_id); @@ -1244,6 +1250,16 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } +LLOfferInfo::LLOfferInfo() + : LLNotificationResponderInterface() + , mFromGroup(FALSE) + , mFromObject(FALSE) + , mIM(IM_NOTHING_SPECIAL) + , mType(LLAssetType::AT_NONE) + , mPersist(false) +{ +} + LLOfferInfo::LLOfferInfo(const LLSD& sd) { mIM = (EInstantMessage)sd["im_type"].asInteger(); @@ -1257,6 +1273,7 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd) mFromName = sd["from_name"].asString(); mDesc = sd["description"].asString(); mHost = LLHost(sd["sender"].asString()); + mPersist = sd["persist"].asBoolean(); } LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) @@ -1272,6 +1289,7 @@ LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) mFromName = info.mFromName; mDesc = info.mDesc; mHost = info.mHost; + mPersist = info.mPersist; } LLSD LLOfferInfo::asLLSD() @@ -1288,9 +1306,15 @@ LLSD LLOfferInfo::asLLSD() sd["from_name"] = mFromName; sd["description"] = mDesc; sd["sender"] = mHost.getIPandPort(); + sd["persist"] = mPersist; return sd; } +void LLOfferInfo::fromLLSD(const LLSD& params) +{ + *this = params; +} + void LLOfferInfo::send_auto_receive_response(void) { LLMessageSystem* msg = gMessageSystem; @@ -1330,6 +1354,21 @@ void LLOfferInfo::send_auto_receive_response(void) } } +void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response) +{ + initRespondFunctionMap(); + + const std::string name = notification["name"].asString(); + if(mRespondFunctions.find(name) == mRespondFunctions.end()) + { + llwarns << "Unexpected notification name : " << name << llendl; + llassert(!"Unexpected notification name"); + return; + } + + mRespondFunctions[name](notification, response); +} + bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& response) { LLChat chat; @@ -1466,7 +1505,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& gInventory.addObserver(opener); } - delete this; + if(!mPersist) + { + delete this; + } return false; } @@ -1632,7 +1674,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const gInventory.addObserver(opener); } - delete this; + if(!mPersist) + { + delete this; + } return false; } @@ -1648,6 +1693,15 @@ protected: } }; +void LLOfferInfo::initRespondFunctionMap() +{ + if(mRespondFunctions.empty()) + { + mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); + mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2); + } +} + void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1714,30 +1768,6 @@ void inventory_offer_handler(LLOfferInfo* info) return; } - // Name cache callbacks don't store userdata, so can't save - // off the LLOfferInfo. Argh. - BOOL name_found = FALSE; - if (info->mFromGroup) - { - std::string group_name; - if (gCacheName->getGroupName(info->mFromID, group_name)) - { - args["FIRST"] = group_name; - args["LAST"] = ""; - name_found = TRUE; - } - } - else - { - std::string first_name, last_name; - if (gCacheName->getName(info->mFromID, first_name, last_name)) - { - args["FIRST"] = first_name; - args["LAST"] = last_name; - name_found = TRUE; - } - } - // If mObjectID is null then generate the object_id based on msg to prevent // multiple creation of chiclets for same object. LLUUID object_id = info->mObjectID; @@ -1752,9 +1782,9 @@ void inventory_offer_handler(LLOfferInfo* info) payload["give_inventory_notification"] = FALSE; args["OBJECTFROMNAME"] = info->mFromName; args["NAME"] = info->mFromName; - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); + args["NAME_SLURL"] = LLSLURL("agent", info->mFromID, "about").getSLURLString(); std::string verb = "select?name=" + LLURI::escape(msg); - args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str()); + args["ITEM_SLURL"] = LLSLURL("inventory", info->mObjectID, verb.c_str()).getSLURLString(); LLNotification::Params p("ObjectGiveItem"); @@ -1764,10 +1794,11 @@ void inventory_offer_handler(LLOfferInfo* info) // Inventory Slurls don't currently work for non agent transfers, so only display the object name. args["ITEM_SLURL"] = msg; // 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"; + p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); + info->mPersist = true; + p.name = "ObjectGiveItem"; // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. - LLNotifications::instance().add(p); + LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE); } else // Agent -> Agent Inventory Offer { @@ -1776,7 +1807,8 @@ void inventory_offer_handler(LLOfferInfo* info) // *TODO fix memory leak // inventory_offer_callback() is not invoked if user received notification and // closes viewer(without responding the notification) - p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); + p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); + info->mPersist = true; p.name = "UserGiveItem"; // Prefetch the item into your local inventory. @@ -1797,10 +1829,8 @@ void inventory_offer_handler(LLOfferInfo* info) // Inform user that there is a script floater via toast system { payload["give_inventory_notification"] = TRUE; - LLNotification::Params params(p.name); - params.substitutions = p.substitutions; - params.payload = p.payload; - LLPostponedNotification::add<LLPostponedOfferNotification>( params, info->mFromID, false); + p.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false); } } } @@ -1877,7 +1907,7 @@ protected: } }; -static void parse_lure_bucket(const std::string& bucket, +static bool parse_lure_bucket(const std::string& bucket, U64& region_handle, LLVector3& pos, LLVector3& look_at, @@ -1889,15 +1919,25 @@ static void parse_lure_bucket(const std::string& bucket, tokenizer tokens(bucket, sep); tokenizer::iterator iter = tokens.begin(); - S32 gx = boost::lexical_cast<S32>((*(iter)).c_str()); - S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str()); - S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str()); - + S32 gx,gy,rx,ry,rz,lx,ly,lz; + try + { + gx = boost::lexical_cast<S32>((*(iter)).c_str()); + gy = boost::lexical_cast<S32>((*(++iter)).c_str()); + rx = boost::lexical_cast<S32>((*(++iter)).c_str()); + ry = boost::lexical_cast<S32>((*(++iter)).c_str()); + rz = boost::lexical_cast<S32>((*(++iter)).c_str()); + lx = boost::lexical_cast<S32>((*(++iter)).c_str()); + ly = boost::lexical_cast<S32>((*(++iter)).c_str()); + lz = boost::lexical_cast<S32>((*(++iter)).c_str()); + } + catch( boost::bad_lexical_cast& ) + { + LL_WARNS("parse_lure_bucket") + << "Couldn't parse lure bucket." + << LL_ENDL; + return false; + } // Grab region access region_access = SIM_ACCESS_MIN; if (++iter != tokens.end()) @@ -1922,6 +1962,7 @@ static void parse_lure_bucket(const std::string& bucket, look_at.setVec((F32)lx, (F32)ly, (F32)lz); region_handle = to_region_handle(gx, gy); + return true; } void process_improved_im(LLMessageSystem *msg, void **user_data) @@ -2286,7 +2327,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration + LLNotificationsUtil::add("JoinGroup", args, payload); } } break; @@ -2472,16 +2514,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) query_string["groupowned"] = "true"; } - std::ostringstream link; - link << "secondlife:///app/objectim/" << session_id << LLURI::mapToQueryString(query_string); - - chat.mURL = link.str(); + chat.mURL = LLSLURL("objectim", session_id, "").getSLURLString(); chat.mText = message; // Note: lie to Nearby Chat, pretending that this is NOT an IM, because // IMs from obejcts don't open IM sessions. LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); - if(nearby_chat) + if(SYSTEM_FROM != name && nearby_chat) { LLSD args; args["owner_id"] = from_id; @@ -2559,15 +2598,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) U64 region_handle; U8 region_access; std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size); - parse_lure_bucket(region_info, region_handle, pos, look_at, region_access); + std::string region_access_str = LLStringUtil::null; + std::string region_access_icn = LLStringUtil::null; - std::string region_access_str = LLViewerRegion::accessToString(region_access); + if (parse_lure_bucket(region_info, region_handle, pos, look_at, region_access)) + { + region_access_str = LLViewerRegion::accessToString(region_access); + region_access_icn = LLViewerRegion::getAccessIcon(region_access); + } LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); + args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); args["MESSAGE"] = message; - args["MATURITY"] = region_access_str; + args["MATURITY_STR"] = region_access_str; + args["MATURITY_ICON"] = region_access_icn; LLSD payload; payload["from_id"] = from_id; payload["lure_id"] = session_id; @@ -2636,7 +2681,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); + args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); if(message.empty()) { //support for frienship offers from clients before July 2008 @@ -3400,7 +3445,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { // Chat the "back" SLURL. (DEV-4907) - LLSD substitution = LLSD().with("[T_SLURL]", gAgent.getTeleportSourceSLURL()); + LLSLURL slurl; + gAgent.getTeleportSourceSLURL(slurl); + LLSD substitution = LLSD().with("[T_SLURL]", slurl.getSLURLString()); std::string completed_from = LLAgent::sTeleportProgressMessages["completed_from"]; LLStringUtil::format(completed_from, substitution); @@ -5801,7 +5848,9 @@ 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()); + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + text.append("\r\n").append(slurl.getSLURLString()); S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) @@ -6244,7 +6293,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLFloaterBuyLand::updateEstateName(estate_name); std::string owner_name = - LLSLURL::buildCommand("agent", estate_owner_id, "inspect"); + LLSLURL("agent", estate_owner_id, "inspect").getSLURLString(); LLPanelEstateCovenant::updateEstateOwnerName(owner_name); LLPanelLandCovenant::updateEstateOwnerName(owner_name); LLFloaterBuyLand::updateEstateOwnerName(owner_name); @@ -6424,3 +6473,4 @@ void LLOfferInfo::forceResponse(InventoryOfferResponse response) params.functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2)); LLNotifications::instance().forceResponse(params, response); } + diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 7c021dc05f..72ad3c8926 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -40,6 +40,7 @@ #include "lluuid.h" #include "message.h" #include "stdenums.h" +#include "llnotifications.h" // // Forward declarations @@ -210,11 +211,10 @@ bool highlight_offered_item(const LLUUID& item_id); void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); -struct LLOfferInfo +class LLOfferInfo : public LLNotificationResponderInterface { - LLOfferInfo() - : mFromGroup(FALSE), mFromObject(FALSE), - mIM(IM_NOTHING_SPECIAL), mType(LLAssetType::AT_NONE) {}; +public: + LLOfferInfo(); LLOfferInfo(const LLSD& sd); LLOfferInfo(const LLOfferInfo& info); @@ -232,12 +232,27 @@ struct LLOfferInfo std::string mFromName; std::string mDesc; LLHost mHost; + bool mPersist; + + // LLNotificationResponderInterface implementation + /*virtual*/ LLSD asLLSD(); + /*virtual*/ void fromLLSD(const LLSD& params); + /*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response); - LLSD asLLSD(); void send_auto_receive_response(void); + + // TODO - replace all references with handleRespond() bool inventory_offer_callback(const LLSD& notification, const LLSD& response); bool inventory_task_offer_callback(const LLSD& notification, const LLSD& response); +private: + + void initRespondFunctionMap(); + + typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t; + typedef std::map<std::string, respond_function_t> respond_function_map_t; + + respond_function_map_t mRespondFunctions; }; void process_feature_disabled_message(LLMessageSystem* msg, void**); diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 987d23630a..a160572f7a 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2006&license=viewergpl$ * - * Copyright (c) 2006-2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,303 +33,477 @@ #include "llviewerprecompiledheaders.h" #include "llviewernetwork.h" +#include "llviewercontrol.h" +#include "llsdserialize.h" +#include "llsecapi.h" +#include "llweb.h" -#include "llevents.h" -#include "net.h" + +const char* DEFAULT_LOGIN_PAGE = "http://secondlife.com/app/login/"; -#include "llviewercontrol.h" -#include "lllogin.h" +const char* SYSTEM_GRID_SLURL_BASE = "secondlife://%s/secondlife/"; +const char* MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/"; +const char* SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app"; -struct LLGridData -{ - const char* mLabel; - const char* mName; - const char* mLoginURI; - const char* mHelperURI; -}; +const char* DEFAULT_SLURL_BASE = "https://%s/region/"; +const char* DEFAULT_APP_SLURL_BASE = "x-grid-location-info://%s/app"; -static LLGridData gGridInfo[GRID_INFO_COUNT] = +LLGridManager::LLGridManager() { - { "None", "", "", ""}, - { "Aditi", - "util.aditi.lindenlab.com", - "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", - "http://aditi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Agni", - "util.agni.lindenlab.com", - "https://login.agni.lindenlab.com/cgi-bin/login.cgi", - "https://secondlife.com/helpers/" }, - { "Aruna", - "util.aruna.lindenlab.com", - "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", - "http://aruna-secondlife.webdev.lindenlab.com/helpers/" }, - { "Bharati", - "util.bharati.lindenlab.com", - "https://login.bharati.lindenlab.com/cgi-bin/login.cgi", - "http://bharati-secondlife.webdev.lindenlab.com/helpers/" }, - { "Chandra", - "util.chandra.lindenlab.com", - "https://login.chandra.lindenlab.com/cgi-bin/login.cgi", - "http://chandra-secondlife.webdev.lindenlab.com/helpers/" }, - { "Damballah", - "util.damballah.lindenlab.com", - "https://login.damballah.lindenlab.com/cgi-bin/login.cgi", - "http://damballah-secondlife.webdev.lindenlab.com/helpers/" }, - { "Danu", - "util.danu.lindenlab.com", - "https://login.danu.lindenlab.com/cgi-bin/login.cgi", - "http://danu-secondlife.webdev.lindenlab.com/helpers/" }, - { "Durga", - "util.durga.lindenlab.com", - "https://login.durga.lindenlab.com/cgi-bin/login.cgi", - "http://durga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Ganga", - "util.ganga.lindenlab.com", - "https://login.ganga.lindenlab.com/cgi-bin/login.cgi", - "http://ganga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Mitra", - "util.mitra.lindenlab.com", - "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", - "http://mitra-secondlife.webdev.lindenlab.com/helpers/" }, - { "Mohini", - "util.mohini.lindenlab.com", - "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", - "http://mohini-secondlife.webdev.lindenlab.com/helpers/" }, - { "Nandi", - "util.nandi.lindenlab.com", - "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", - "http://nandi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Parvati", - "util.parvati.lindenlab.com", - "https://login.parvati.lindenlab.com/cgi-bin/login.cgi", - "http://parvati-secondlife.webdev.lindenlab.com/helpers/" }, - { "Radha", - "util.radha.lindenlab.com", - "https://login.radha.lindenlab.com/cgi-bin/login.cgi", - "http://radha-secondlife.webdev.lindenlab.com/helpers/" }, - { "Ravi", - "util.ravi.lindenlab.com", - "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", - "http://ravi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Siva", - "util.siva.lindenlab.com", - "https://login.siva.lindenlab.com/cgi-bin/login.cgi", - "http://siva-secondlife.webdev.lindenlab.com/helpers/" }, - { "Shakti", - "util.shakti.lindenlab.com", - "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", - "http://shakti-secondlife.webdev.lindenlab.com/helpers/" }, - { "Skanda", - "util.skanda.lindenlab.com", - "https://login.skanda.lindenlab.com/cgi-bin/login.cgi", - "http://skanda-secondlife.webdev.lindenlab.com/helpers/" }, - { "Soma", - "util.soma.lindenlab.com", - "https://login.soma.lindenlab.com/cgi-bin/login.cgi", - "http://soma-secondlife.webdev.lindenlab.com/helpers/" }, - { "Uma", - "util.uma.lindenlab.com", - "https://login.uma.lindenlab.com/cgi-bin/login.cgi", - "http://uma-secondlife.webdev.lindenlab.com/helpers/" }, - { "Vaak", - "util.vaak.lindenlab.com", - "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", - "http://vaak-secondlife.webdev.lindenlab.com/helpers/" }, - { "Yami", - "util.yami.lindenlab.com", - "https://login.yami.lindenlab.com/cgi-bin/login.cgi", - "http://yami-secondlife.webdev.lindenlab.com/helpers/" }, - { "Local", - "localhost", - "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", - "" }, - { "Other", - "", - "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", - "" } -}; - -const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; - - -unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ - -LLViewerLogin::LLViewerLogin() : - mGridChoice(DEFAULT_GRID_CHOICE) + // by default, we use the 'grids.xml' file in the user settings directory + // this file is an LLSD file containing multiple grid definitions. + // This file does not contain definitions for secondlife.com grids, + // as that would be a security issue when they are overwritten by + // an attacker. Don't want someone snagging a password. + std::string grid_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "grids.xml"); + initialize(grid_file); + +} + + +LLGridManager::LLGridManager(const std::string& grid_file) { + // initialize with an explicity grid file for testing. + initialize(grid_file); } - LLViewerLogin::~LLViewerLogin() - { - } +// +// LLGridManager - class for managing the list of known grids, and the current +// selection +// + -void LLViewerLogin::setGridChoice(EGridInfo grid) -{ - if(grid < 0 || grid >= GRID_INFO_COUNT) +// +// LLGridManager::initialze - initialize the list of known grids based +// on the fixed list of linden grids (fixed for security reasons) +// the grids.xml file +// and the command line. +void LLGridManager::initialize(const std::string& grid_file) +{ + // default grid list. + // Don't move to a modifiable file for security reasons, + mGrid.clear() ; + // set to undefined + mGridList = LLSD(); + mGridFile = grid_file; + // as we don't want an attacker to override our grid list + // to point the default grid to an invalid grid + addSystemGrid("None", "", "", "", DEFAULT_LOGIN_PAGE); + + + + addSystemGrid("Agni", + MAINGRID, + "https://login.agni.lindenlab.com/cgi-bin/login.cgi", + "https://secondlife.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Aditi", + "util.aditi.lindenlab.com", + "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", + "http://aditi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Aruna", + "util.aruna.lindenlab.com", + "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", + "http://aruna-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Durga", + "util.durga.lindenlab.com", + "https://login.durga.lindenlab.com/cgi-bin/login.cgi", + "http://durga-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Ganga", + "util.ganga.lindenlab.com", + "https://login.ganga.lindenlab.com/cgi-bin/login.cgi", + "http://ganga-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Mitra", + "util.mitra.lindenlab.com", + "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", + "http://mitra-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Mohini", + "util.mohini.lindenlab.com", + "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", + "http://mohini-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Nandi", + "util.nandi.lindenlab.com", + "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", + "http://nandi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Radha", + "util.radha.lindenlab.com", + "https://login.radha.lindenlab.com/cgi-bin/login.cgi", + "http://radha-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Ravi", + "util.ravi.lindenlab.com", + "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", + "http://ravi-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Siva", + "util.siva.lindenlab.com", + "https://login.siva.lindenlab.com/cgi-bin/login.cgi", + "http://siva-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Shakti", + "util.shakti.lindenlab.com", + "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", + "http://shakti-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Soma", + "util.soma.lindenlab.com", + "https://login.soma.lindenlab.com/cgi-bin/login.cgi", + "http://soma-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + + addSystemGrid("Uma", + "util.uma.lindenlab.com", + "https://login.uma.lindenlab.com/cgi-bin/login.cgi", + "http://uma-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Vaak", + "util.vaak.lindenlab.com", + "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", + "http://vaak-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Yami", + "util.yami.lindenlab.com", + "https://login.yami.lindenlab.com/cgi-bin/login.cgi", + "http://yami-secondlife.webdev.lindenlab.com/helpers/", + DEFAULT_LOGIN_PAGE); + addSystemGrid("Local (Linden)", + "localhost", + "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", + "", + DEFAULT_LOGIN_PAGE); + + + LLSD other_grids; + llifstream llsd_xml; + if (!grid_file.empty()) { - llerrs << "Invalid grid index specified." << llendl; - return; + llsd_xml.open( grid_file.c_str(), std::ios::in | std::ios::binary ); + + // parse through the gridfile, inserting grids into the list unless + // they overwrite a linden grid. + if( llsd_xml.is_open()) + { + LLSDSerialize::fromXMLDocument( other_grids, llsd_xml ); + if(other_grids.isMap()) + { + for(LLSD::map_iterator grid_itr = other_grids.beginMap(); + grid_itr != other_grids.endMap(); + ++grid_itr) + { + LLSD::String key_name = grid_itr->first; + LLSD grid = grid_itr->second; + // TODO: Make sure gridfile specified label is not + // a system grid label + LL_INFOS("GridManager") << "reading: " << key_name << LL_ENDL; + if (mGridList.has(key_name) && + mGridList[key_name].has(GRID_IS_SYSTEM_GRID_VALUE)) + { + LL_INFOS("GridManager") << "Cannot override grid " << key_name << " as it's a system grid" << LL_ENDL; + // If the system grid does exist in the grids file, and it's marked as a favorite, set it as a favorite. + if(grid_itr->second.has(GRID_IS_FAVORITE_VALUE) && grid_itr->second[GRID_IS_FAVORITE_VALUE].asBoolean() ) + { + mGridList[key_name][GRID_IS_FAVORITE_VALUE] = TRUE; + } + } + else + { + try + { + addGrid(grid); + LL_INFOS("GridManager") << "Added grid: " << key_name << LL_ENDL; + } + catch (...) + { + } + } + } + llsd_xml.close(); + } + } } + + // load a grid from the command line. + // if the actual grid name is specified from the command line, + // set it as the 'selected' grid. + mGrid = gSavedSettings.getString("CmdLineGridChoice"); + LL_INFOS("GridManager") << "Grid Name: " << mGrid << LL_ENDL; + + // If a command line login URI was passed in, so we should add the command + // line grid to the list of grids - if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid) + LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI"); + if (cmd_line_login_uri.isString()) { - mGridChoice = grid; - if(GRID_INFO_LOCAL == mGridChoice) + LL_INFOS("GridManager") << "adding cmd line login uri" << LL_ENDL; + // grab the other related URI values + std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI"); + std::string cmd_line_login_page = gSavedSettings.getString("LoginPage"); + + // we've a cmd line login, so add a grid for the command line, + // overwriting any existing grids + LLSD grid = LLSD::emptyMap(); + grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid[GRID_LOGIN_URI_VALUE].append(cmd_line_login_uri); + LL_INFOS("GridManager") << "cmd line login uri: " << cmd_line_login_uri.asString() << LL_ENDL; + LLURI uri(cmd_line_login_uri.asString()); + if (mGrid.empty()) { - mGridName = LOOPBACK_ADDRESS_STRING; + // if a grid name was not passed in via the command line, + // then set the grid name based on the hostname of the + // login uri + mGrid = uri.hostName(); } - else if(GRID_INFO_OTHER == mGridChoice) + + grid[GRID_VALUE] = mGrid; + + if (mGridList.has(mGrid) && mGridList[mGrid].has(GRID_LABEL_VALUE)) { - // *FIX:Mani - could this possibly be valid? - mGridName = "other"; + grid[GRID_LABEL_VALUE] = mGridList[mGrid][GRID_LABEL_VALUE]; } else { - mGridName = gGridInfo[mGridChoice].mLabel; + grid[GRID_LABEL_VALUE] = mGrid; + } + if(!cmd_line_helper_uri.empty()) + { + grid[GRID_HELPER_URI_VALUE] = cmd_line_helper_uri; } - gSavedSettings.setS32("ServerChoice", mGridChoice); - gSavedSettings.setString("CustomServer", ""); + if(!cmd_line_login_page.empty()) + { + grid[GRID_LOGIN_PAGE_VALUE] = cmd_line_login_page; + } + // if the login page, helper URI value, and so on are not specified, + // add grid will generate them. + + // Also, we will override a system grid if values are passed in via the command + // line, for testing. These values will not be remembered though. + if (mGridList.has(mGrid) && mGridList[mGrid].has(GRID_IS_SYSTEM_GRID_VALUE)) + { + grid[GRID_IS_SYSTEM_GRID_VALUE] = TRUE; + } + addGrid(grid); } -} + + // if a grid was not passed in via the command line, grab it from the CurrentGrid setting. + if (mGrid.empty()) + { + + mGrid = gSavedSettings.getString("CurrentGrid"); + } + + if (mGrid.empty() || !mGridList.has(mGrid)) + { + // the grid name was empty, or the grid isn't actually in the list, then set it to the + // appropriate default. + LL_INFOS("GridManager") << "Resetting grid as grid name " << mGrid << " is not in the list" << LL_ENDL; + mGrid = MAINGRID; + } + LL_INFOS("GridManager") << "Selected grid is " << mGrid << LL_ENDL; + gSavedSettings.setString("CurrentGrid", mGrid); -void LLViewerLogin::setGridChoice(const std::string& grid_name) -{ - // Set the grid choice based on a string. - // The string can be: - // - a grid label from the gGridInfo table - // - an ip address - if(!grid_name.empty()) - { - // find the grid choice from the user setting. - int grid_index = GRID_INFO_NONE; - for(;grid_index < GRID_INFO_OTHER; ++grid_index) - { - if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) - { - // Founding a matching label in the list... - setGridChoice((EGridInfo)grid_index); - break; - } - } - - if(GRID_INFO_OTHER == grid_index) - { - // *FIX:MEP Can and should we validate that this is an IP address? - mGridChoice = GRID_INFO_OTHER; - mGridName = grid_name; - gSavedSettings.setS32("ServerChoice", mGridChoice); - gSavedSettings.setString("CustomServer", mGridName); - } - } } -void LLViewerLogin::resetURIs() +LLGridManager::~LLGridManager() { - // Clear URIs when picking a new server - gSavedSettings.setLLSD("CmdLineLoginURI", LLSD::emptyArray()); - gSavedSettings.setString("CmdLineHelperURI", ""); + saveFavorites(); } -EGridInfo LLViewerLogin::getGridChoice() const +// +// LLGridManager::addGrid - add a grid to the grid list, populating the needed values +// if they're not populated yet. +// + +void LLGridManager::addGrid(LLSD& grid_data) { - return mGridChoice; + if (grid_data.isMap() && grid_data.has(GRID_VALUE)) + { + std::string grid = utf8str_tolower(grid_data[GRID_VALUE]); + + // grid should be in the form of a dns address + if (!grid.empty() && + grid.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890-_. ") != std::string::npos) + { + printf("grid name: %s", grid.c_str()); + throw LLInvalidGridName(grid); + } + + // populate the other values if they don't exist + if (!grid_data.has(GRID_LABEL_VALUE)) + { + grid_data[GRID_LABEL_VALUE] = grid; + } + if (!grid_data.has(GRID_ID_VALUE)) + { + grid_data[GRID_ID_VALUE] = grid; + } + + // if the grid data doesn't include any of the URIs, then + // generate them from the grid, which should be a dns address + if (!grid_data.has(GRID_LOGIN_URI_VALUE)) + { + grid_data[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid_data[GRID_LOGIN_URI_VALUE].append(std::string("https://") + + grid + "/cgi-bin/login.cgi"); + } + // Populate to the default values + if (!grid_data.has(GRID_LOGIN_PAGE_VALUE)) + { + grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/"; + } + if (!grid_data.has(GRID_HELPER_URI_VALUE)) + { + grid_data[GRID_HELPER_URI_VALUE] = std::string("https://") + grid + "/helpers/"; + } + + if (!grid_data.has(GRID_LOGIN_IDENTIFIER_TYPES)) + { + // non system grids and grids that haven't already been configured with values + // get both types of credentials. + grid_data[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray(); + grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT); + grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_ACCOUNT); + } + + LL_INFOS("GridManager") << "ADDING: " << grid << LL_ENDL; + mGridList[grid] = grid_data; + } } -std::string LLViewerLogin::getGridLabel() const +// +// LLGridManager::addSystemGrid - helper for adding a system grid. +void LLGridManager::addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id) { - if(mGridChoice == GRID_INFO_NONE) + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = name; + grid[GRID_LABEL_VALUE] = label; + grid[GRID_HELPER_URI_VALUE] = helper; + grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); + grid[GRID_LOGIN_URI_VALUE].append(login); + grid[GRID_LOGIN_PAGE_VALUE] = login_page; + grid[GRID_IS_SYSTEM_GRID_VALUE] = TRUE; + grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray(); + grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT); + + grid[GRID_APP_SLURL_BASE] = SYSTEM_GRID_APP_SLURL_BASE; + if (login_id.empty()) { - return "None"; + grid[GRID_ID_VALUE] = name; } - else if(mGridChoice < GRID_INFO_OTHER) + else { - return gGridInfo[mGridChoice].mLabel; + grid[GRID_ID_VALUE] = login_id; } - - return mGridName; -} - -std::string LLViewerLogin::getKnownGridLabel(EGridInfo grid_index) const -{ - if(grid_index > GRID_INFO_NONE && grid_index < GRID_INFO_OTHER) + + // only add the system grids beyond agni to the visible list + // if we're building a debug version. + if (name == std::string(MAINGRID)) { - return gGridInfo[grid_index].mLabel; + grid[GRID_SLURL_BASE] = MAIN_GRID_SLURL_BASE; + grid[GRID_IS_FAVORITE_VALUE] = TRUE; } - return gGridInfo[GRID_INFO_NONE].mLabel; + else + { + grid[GRID_SLURL_BASE] = llformat(SYSTEM_GRID_SLURL_BASE, label.c_str()); + } + addGrid(grid); } -void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const +// return a list of grid name -> grid label mappings for UI purposes +std::map<std::string, std::string> LLGridManager::getKnownGrids(bool favorite_only) { - // return the login uri set on the command line. - LLControlVariable* c = gSavedSettings.getControl("CmdLineLoginURI"); - if(c) + std::map<std::string, std::string> result; + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) { - LLSD v = c->getValue(); - if(v.isArray()) - { - for(LLSD::array_const_iterator itr = v.beginArray(); - itr != v.endArray(); ++itr) - { - std::string uri = itr->asString(); - if(!uri.empty()) - { - uris.push_back(uri); - } - } - } - else + if(!favorite_only || grid_iter->second.has(GRID_IS_FAVORITE_VALUE)) { - std::string uri = v.asString(); - if(!uri.empty()) - { - uris.push_back(uri); - } + result[grid_iter->first] = grid_iter->second[GRID_LABEL_VALUE].asString(); } } - // If there was no command line uri... - if(uris.empty()) + return result; +} + +void LLGridManager::setGridChoice(const std::string& grid) +{ + // Set the grid choice based on a string. + // The string can be: + // - a grid label from the gGridInfo table + // - a hostname + // - an ip address + + // loop through. We could do just a hash lookup but we also want to match + // on label + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) { - // If its a known grid choice, get the uri from the table, - // else try the grid name. - if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) + if((grid == grid_iter->first) || + (grid == grid_iter->second[GRID_LABEL_VALUE].asString())) { - uris.push_back(gGridInfo[mGridChoice].mLoginURI); - } - else - { - uris.push_back(mGridName); + mGrid = grid_iter->second[GRID_VALUE].asString(); + gSavedSettings.setString("CurrentGrid", grid_iter->second[GRID_VALUE]); + return; + } } + LLSD grid_data = LLSD::emptyMap(); + grid_data[GRID_VALUE] = grid; + addGrid(grid_data); + mGrid = grid; + gSavedSettings.setString("CurrentGrid", grid); } -std::string LLViewerLogin::getHelperURI() const +std::string LLGridManager::getGridByLabel( const std::string &grid_label) { - std::string helper_uri = gSavedSettings.getString("CmdLineHelperURI"); - if (helper_uri.empty()) + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) { - // grab URI from selected grid - if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) + if (grid_iter->second.has(GRID_LABEL_VALUE) && (grid_iter->second[GRID_LABEL_VALUE].asString() == grid_label)) { - helper_uri = gGridInfo[mGridChoice].mHelperURI; + return grid_iter->first; } + } + return std::string(); +} - if (helper_uri.empty()) - { - // what do we do with unnamed/miscellaneous grids? - // for now, operations that rely on the helper URI (currency/land purchasing) will fail - } +void LLGridManager::getLoginURIs(std::vector<std::string>& uris) +{ + uris.clear(); + for (LLSD::array_iterator llsd_uri = mGridList[mGrid][GRID_LOGIN_URI_VALUE].beginArray(); + llsd_uri != mGridList[mGrid][GRID_LOGIN_URI_VALUE].endArray(); + llsd_uri++) + { + uris.push_back(llsd_uri->asString()); } - return helper_uri; } -bool LLViewerLogin::isInProductionGrid() +bool LLGridManager::isInProductionGrid() { // *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice, // but it seems that loginURI trumps that. std::vector<std::string> uris; getLoginURIs(uris); + if (uris.size() < 1) + { + return 1; + } LLStringUtil::toLower(uris[0]); if((uris[0].find("agni") != std::string::npos)) { @@ -339,3 +512,51 @@ bool LLViewerLogin::isInProductionGrid() return false; } + +void LLGridManager::saveFavorites() +{ + // filter out just those marked as favorites + LLSD output_grid_list = LLSD::emptyMap(); + for(LLSD::map_iterator grid_iter = mGridList.beginMap(); + grid_iter != mGridList.endMap(); + grid_iter++) + { + if(grid_iter->second.has(GRID_IS_FAVORITE_VALUE)) + { + output_grid_list[grid_iter->first] = grid_iter->second; + } + } + llofstream llsd_xml; + llsd_xml.open( mGridFile.c_str(), std::ios::out | std::ios::binary); + LLSDSerialize::toPrettyXML(output_grid_list, llsd_xml); + llsd_xml.close(); +} + + +// build a slurl for the given region within the selected grid +std::string LLGridManager::getSLURLBase(const std::string& grid) +{ + std::string grid_base; + if(mGridList.has(grid) && mGridList[grid].has(GRID_SLURL_BASE)) + { + return mGridList[grid][GRID_SLURL_BASE].asString(); + } + else + { + return llformat(DEFAULT_SLURL_BASE, grid.c_str()); + } +} + +// build a slurl for the given region within the selected grid +std::string LLGridManager::getAppSLURLBase(const std::string& grid) +{ + std::string grid_base; + if(mGridList.has(grid) && mGridList[grid].has(GRID_APP_SLURL_BASE)) + { + return mGridList[grid][GRID_APP_SLURL_BASE].asString(); + } + else + { + return llformat(DEFAULT_APP_SLURL_BASE, grid.c_str()); + } +} diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index edae6dc47b..0271e7a7a5 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2006&license=viewergpl$ * - * Copyright (c) 2006-2009, Linden Research, Inc. + * Copyright (c) 2006-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,13 +13,12 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at http://secondlife.com/developers/opensource/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,83 +32,134 @@ #ifndef LL_LLVIEWERNETWORK_H #define LL_LLVIEWERNETWORK_H + +extern const char* DEFAULT_LOGIN_PAGE; + +#define GRID_VALUE "name" +#define GRID_LABEL_VALUE "label" +#define GRID_ID_VALUE "grid_login_id" +#define GRID_LOGIN_URI_VALUE "login_uri" +#define GRID_HELPER_URI_VALUE "helper_uri" +#define GRID_LOGIN_PAGE_VALUE "login_page" +#define GRID_IS_SYSTEM_GRID_VALUE "system_grid" +#define GRID_IS_FAVORITE_VALUE "favorite" +#define MAINGRID "util.agni.lindenlab.com" +#define GRID_LOGIN_IDENTIFIER_TYPES "login_identifier_types" +// defines slurl formats associated with various grids. +// we need to continue to support existing forms, as slurls +// are shared between viewers that may not understand newer +// forms. +#define GRID_SLURL_BASE "slurl_base" +#define GRID_APP_SLURL_BASE "app_slurl_base" -#include <boost/scoped_ptr.hpp> - -class LLHost; -class LLLogin; - -enum EGridInfo +class LLInvalidGridName { - GRID_INFO_NONE, - GRID_INFO_ADITI, - GRID_INFO_AGNI, - GRID_INFO_ARUNA, - GRID_INFO_BHARATI, - GRID_INFO_CHANDRA, - GRID_INFO_DAMBALLAH, - GRID_INFO_DANU, - GRID_INFO_DURGA, - GRID_INFO_GANGA, - GRID_INFO_MITRA, - GRID_INFO_MOHINI, - GRID_INFO_NANDI, - GRID_INFO_PARVATI, - GRID_INFO_RADHA, - GRID_INFO_RAVI, - GRID_INFO_SIVA, - GRID_INFO_SHAKTI, - GRID_INFO_SKANDA, - GRID_INFO_SOMA, - GRID_INFO_UMA, - GRID_INFO_VAAK, - GRID_INFO_YAMI, - GRID_INFO_LOCAL, - GRID_INFO_OTHER, // IP address set via command line option - GRID_INFO_COUNT +public: + LLInvalidGridName(std::string grid) : mGrid(grid) + { + } +protected: + std::string mGrid; }; + /** - * @brief A class to manage the viewer's login state. + * @brief A class to manage the grids available to the viewer + * including persistance. This class also maintains the currently + * selected grid. * **/ -class LLViewerLogin : public LLSingleton<LLViewerLogin> +class LLGridManager : public LLSingleton<LLGridManager> { public: - LLViewerLogin(); - ~LLViewerLogin(); - - void setGridChoice(EGridInfo grid); - void setGridChoice(const std::string& grid_name); - void resetURIs(); + + // when the grid manager is instantiated, the default grids are automatically + // loaded, and the grids favorites list is loaded from the xml file. + LLGridManager(const std::string& grid_file); + LLGridManager(); + ~LLGridManager(); + + void initialize(const std::string& grid_file); + // grid list management + + // add a grid to the list of grids + void addGrid(LLSD& grid_info); - /** - * @brief Get the enumeration of the grid choice. - * Should only return values > 0 && < GRID_INFO_COUNT - **/ - EGridInfo getGridChoice() const; - - /** - * @brief Get a readable label for the grid choice. - * Returns the readable name for the grid choice. - * If the grid is 'other', returns something - * the string used to specifiy the grid. - **/ - std::string getGridLabel() const; - - std::string getKnownGridLabel(EGridInfo grid_index) const; - - void getLoginURIs(std::vector<std::string>& uris) const; - std::string getHelperURI() const; + // retrieve a map of grid-name <-> label + // by default only return the user visible grids + std::map<std::string, std::string> getKnownGrids(bool favorites_only=FALSE); + + LLSD getGridInfo(const std::string& grid) + { + if(mGridList.has(grid)) + { + return mGridList[grid]; + } + else + { + return LLSD(); + } + } + + // current grid management + // select a given grid as the current grid. If the grid + // is not a known grid, then it's assumed to be a dns name for the + // grid, and the various URIs will be automatically generated. + void setGridChoice(const std::string& grid); + + + std::string getGridLabel() { return mGridList[mGrid][GRID_LABEL_VALUE]; } + std::string getGrid() const { return mGrid; } + void getLoginURIs(std::vector<std::string>& uris); + std::string getHelperURI() {return mGridList[mGrid][GRID_HELPER_URI_VALUE];} + std::string getLoginPage() {return mGridList[mGrid][GRID_LOGIN_PAGE_VALUE];} + std::string getGridLoginID() { return mGridList[mGrid][GRID_ID_VALUE]; } + std::string getLoginPage(const std::string& grid) { return mGridList[grid][GRID_LOGIN_PAGE_VALUE]; } + void getLoginIdentifierTypes(LLSD& idTypes) { idTypes = mGridList[mGrid][GRID_LOGIN_IDENTIFIER_TYPES]; } + + // build a slurl for the given region within the selected grid + std::string getSLURLBase(const std::string& grid); + std::string getSLURLBase() { return getSLURLBase(mGrid); } + + std::string getAppSLURLBase(const std::string& grid); + std::string getAppSLURLBase() { return getAppSLURLBase(mGrid); } + + LLSD getGridInfo() { return mGridList[mGrid]; } + + std::string getGridByLabel( const std::string &grid_label); + + bool isSystemGrid(const std::string& grid) + { + return mGridList.has(grid) && + mGridList[grid].has(GRID_IS_SYSTEM_GRID_VALUE) && + mGridList[grid][GRID_IS_SYSTEM_GRID_VALUE].asBoolean(); + } + bool isSystemGrid() { return isSystemGrid(mGrid); } + // Mark this grid as a favorite that should be persisited on 'save' + // this is currently used to persist a grid after a successful login + void setFavorite() { mGridList[mGrid][GRID_IS_FAVORITE_VALUE] = TRUE; } + bool isInProductionGrid(); + void saveFavorites(); + void clearFavorites(); + +protected: -private: - EGridInfo mGridChoice; - std::string mGridName; + // helper function for adding the predefined grids + void addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id = ""); + + + std::string mGrid; + std::string mGridFile; + LLSD mGridList; }; const S32 MAC_ADDRESS_BYTES = 6; -extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ #endif diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bb7933c10e..ee89680fea 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4727,7 +4727,7 @@ BOOL LLViewerObject::permYouOwner() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4764,7 +4764,7 @@ BOOL LLViewerObject::permOwnerModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4788,7 +4788,7 @@ BOOL LLViewerObject::permModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4812,7 +4812,7 @@ BOOL LLViewerObject::permCopy() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4836,7 +4836,7 @@ BOOL LLViewerObject::permMove() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4860,7 +4860,7 @@ BOOL LLViewerObject::permTransfer() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLViewerLogin::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 07d4ac664f..c48668df9a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -627,6 +627,26 @@ std::string LLViewerRegion::accessToString(U8 sim_access) } // static +std::string LLViewerRegion::getAccessIcon(U8 sim_access) +{ + switch(sim_access) + { + case SIM_ACCESS_MATURE: + return "Parcel_M_Dark"; + + case SIM_ACCESS_ADULT: + return "Parcel_R_Light"; + + case SIM_ACCESS_PG: + return "Parcel_PG_Light"; + + case SIM_ACCESS_MIN: + default: + return ""; + } +} + +// static std::string LLViewerRegion::accessToShortString(U8 sim_access) { switch(sim_access) /* Flawfinder: ignore */ diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 49d0900f2a..5c4d5a61fd 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -203,6 +203,9 @@ public: // Returns "M", "PG", "A" etc. static std::string accessToShortString(U8 sim_access); + + // Return access icon name + static std::string getAccessIcon(U8 sim_access); // helper function which just makes sure all interested parties // can process the message. diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b7c265be59..bdc34d0f18 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -768,9 +768,11 @@ void send_stats() system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB(); system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", - gMACAddress[0],gMACAddress[1],gMACAddress[2], - gMACAddress[3],gMACAddress[4],gMACAddress[5]); + MACAddress[0],MACAddress[1],MACAddress[2], + MACAddress[3],MACAddress[4],MACAddress[5]); system["mac_address"] = macAddressString; system["serial_number"] = LLAppViewer::instance()->getSerialNumber(); std::string gpu_desc = llformat( diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index a5adb11c53..d925ab0d90 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -492,6 +492,7 @@ void LLViewerTexture::init(bool firstinit) mTextureState = NO_DELETE ; mDontDiscard = FALSE; + mCanResetMaxVirtualSize = true ; mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; mNeedsResetMaxVirtualSize = FALSE ; @@ -540,6 +541,11 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != LLViewerTexture::BOOST_NONE) { setNoDelete() ; + + if(LLViewerTexture::BOOST_AVATAR_BAKED_SELF == mBoostLevel || LLViewerTexture::BOOST_AVATAR_BAKED == mBoostLevel) + { + mCanResetMaxVirtualSize = false ; + } } if(gAuditTexture) { @@ -613,7 +619,7 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co void LLViewerTexture::resetTextureStats() { - mMaxVirtualSize = 0.0f; + mMaxVirtualSize = 0.0f ; mAdditionalDecodePriority = 0.f ; mNeedsResetMaxVirtualSize = FALSE ; } @@ -1071,6 +1077,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mRequestedDiscardLevel = -1; mRequestedDownloadPriority = 0.f; mFullyLoaded = FALSE; + mCanUseHTTP = true ; mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; @@ -1564,10 +1571,6 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // larger mips are corrupted priority = -3.0f; } - else if (cur_discard <= mDesiredDiscardLevel) - { - priority = -4.0f; - } else { // priority range = 100,000 - 500,000 @@ -1669,7 +1672,11 @@ void LLViewerFetchedTexture::updateVirtualSize() setAdditionalDecodePriority(facep->getImportanceToCamera()) ; } } - mNeedsResetMaxVirtualSize = TRUE ; + + if(mCanResetMaxVirtualSize) + { + mNeedsResetMaxVirtualSize = TRUE ; + } reorganizeFaceList() ; reorganizeVolumeList(); } @@ -1750,7 +1757,7 @@ bool LLViewerFetchedTexture::updateFetch() else { mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, - mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); + mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); } // We may have data ready regardless of whether or not we are finished (e.g. waiting on write) @@ -1890,7 +1897,7 @@ bool LLViewerFetchedTexture::updateFetch() // bypass texturefetch directly by pulling from LLTextureCache bool fetch_request_created = false; fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), decode_priority, - w, h, c, desired_discard, needsAux()); + w, h, c, desired_discard, needsAux(), mCanUseHTTP); if (fetch_request_created) { @@ -1898,7 +1905,7 @@ bool LLViewerFetchedTexture::updateFetch() mIsFetching = TRUE; mRequestedDiscardLevel = desired_discard; mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, - mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); + mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); } // if createRequest() failed, we're finishing up a request for this UUID, @@ -3295,7 +3302,10 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() } } - mNeedsResetMaxVirtualSize = TRUE ; + if(mCanResetMaxVirtualSize) + { + mNeedsResetMaxVirtualSize = TRUE ; + } reorganizeFaceList() ; reorganizeVolumeList(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index a09a711cc7..74c46f3070 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -263,6 +263,7 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; + bool mCanResetMaxVirtualSize; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S8 mNeedsGLTexture; mutable BOOL mNeedsResetMaxVirtualSize ; @@ -456,6 +457,8 @@ public: BOOL isFullyLoaded() const; BOOL hasFetcher() const { return mHasFetcher;} + void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} + protected: /*virtual*/ void switchToCachedImage(); S32 getCurrentDiscardLevelForFetching() ; @@ -505,6 +508,7 @@ protected: S8 mIsRawImageValid; S8 mHasFetcher; // We've made a fecth request S8 mIsFetching; // Fetch request is active + bool mCanUseHTTP ; //This texture can be fetched through http if true. mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index fad398e00b..422e530dc6 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -45,7 +45,7 @@ //----------------------------------------------------------------------------- LLViewerVisualParamInfo::LLViewerVisualParamInfo() : - mWearableType( WT_INVALID ), + mWearableType( LLWearableType::WT_INVALID ), mCrossWearable(FALSE), mCamDist( 0.5f ), mCamAngle( 0.f ), @@ -77,7 +77,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable"); if( node->getFastAttributeString( wearable_string, wearable) ) { - mWearableType = LLWearableDictionary::typeNameToType( wearable ); + mWearableType = LLWearableType::typeNameToType( wearable ); } static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a96a6bf1b3..56d22a0608 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -85,7 +85,6 @@ #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" -#include "llurlsimstring.h" // newview includes #include "llagent.h" @@ -799,7 +798,7 @@ BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK m BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = TRUE; - gVoiceClient->middleMouseState(true); + LLVoiceClient::getInstance()->middleMouseState(true); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -826,20 +825,16 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (slurl_dnd_enabled) { - - // special case SLURLs - // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964) - if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) ) + LLSLURL dropped_slurl(data); + if(dropped_slurl.isSpatial()) { if (drop) { - LLURLDispatcher::dispatch( data, NULL, true ); - LLURLSimString::setStringRaw( LLSLURL::stripProtocol( data ) ); - LLPanelLogin::refreshLocation( true ); - LLPanelLogin::updateLocationUI(); + LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true ); + return LLWindowCallbacks::DND_MOVE; } return LLWindowCallbacks::DND_COPY; - }; + } } if (prim_media_dnd_enabled) @@ -957,7 +952,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = FALSE; - gVoiceClient->middleMouseState(false); + LLVoiceClient::getInstance()->middleMouseState(false); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -1074,7 +1069,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - gVoiceClient->keyDown(key, mask); + LLVoiceClient::getInstance()->keyDown(key, mask); if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME) { @@ -1096,7 +1091,7 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - gVoiceClient->keyUp(key, mask); + LLVoiceClient::getInstance()->keyUp(key, mask); return FALSE; } @@ -1915,7 +1910,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) // store the mode the user wants (even if not there yet) - gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); + gSavedSettings.setBOOL("FullScreen", mWantFullscreen); // store new settings for the mode we are in, regardless if (!mWindow->getFullscreen()) @@ -1955,7 +1950,7 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) // ...and set the menu color appropriately. setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, - LLViewerLogin::getInstance()->isInProductionGrid()); + LLGridManager::getInstance()->isInProductionGrid()); } if ( gStatusBar ) @@ -1976,15 +1971,15 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) + if(god_mode && LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" ); } - else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(god_mode && !LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } - else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(!god_mode && !LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } @@ -2200,7 +2195,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } return TRUE; } - // hidden edit menu for cut/copy/paste if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { @@ -4716,7 +4710,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); mWantFullscreen = fullscreen; mShowFullscreenProgress = show_progress_bar; - gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen); + gSavedSettings.setBOOL("FullScreen", mWantFullscreen); //gResizeScreenTexture = TRUE; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b94fc3021c..b396d23a06 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -108,8 +108,6 @@ extern F32 ANIM_SPEED_MIN; #include <boost/lexical_cast.hpp> -#define DISPLAY_AVATAR_LOAD_TIMES - using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -834,7 +832,7 @@ BOOL LLVOAvatar::isFullyBaked() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (!isTextureDefined(mBakedTextureDatas[i].mTextureIndex) - && ( (i != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT) ) ) + && ( (i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT) ) ) { return FALSE; } @@ -1292,7 +1290,7 @@ void LLVOAvatar::initInstance(void) //VTPause(); // VTune - mVoiceVisualizer->setVoiceEnabled( gVoiceClient->getVoiceEnabled( mID ) ); + mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) ); } const LLVector3 LLVOAvatar::getRenderPosition() const @@ -2250,8 +2248,8 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } static LLUICachedControl<bool> visualizers_in_calls("ShowVoiceVisualizersInCalls", false); - bool voice_enabled = (visualizers_in_calls || gVoiceClient->inProximalChannel()) && - gVoiceClient->getVoiceEnabled(mID); + bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) && + LLVoiceClient::getInstance()->getVoiceEnabled(mID); idleUpdateVoiceVisualizer( voice_enabled ); idleUpdateMisc( detailed_update ); @@ -2315,7 +2313,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) // Notice the calls to "gAwayTimer.reset()". This resets the timer that determines how long the avatar has been // "away", so that the avatar doesn't lapse into away-mode (and slump over) while the user is still talking. //----------------------------------------------------------------------------------------------------------------- - if (gVoiceClient->getIsSpeaking( mID )) + if (LLVoiceClient::getInstance()->getIsSpeaking( mID )) { if (!mVoiceVisualizer->getCurrentlySpeaking()) { @@ -2324,7 +2322,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) //printf( "gAwayTimer.reset();\n" ); } - mVoiceVisualizer->setSpeakingAmplitude( gVoiceClient->getCurrentPower( mID ) ); + mVoiceVisualizer->setSpeakingAmplitude( LLVoiceClient::getInstance()->getCurrentPower( mID ) ); if( isSelf() ) { @@ -2553,7 +2551,7 @@ F32 LLVOAvatar::calcMorphAmount() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - if ( voice_enabled && (gVoiceClient->lipSyncEnabled()) && gVoiceClient->getIsSpeaking( mID ) ) + if ( voice_enabled && (LLVoiceClient::getInstance()->lipSyncEnabled()) && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) { F32 ooh_morph_amount = 0.0f; F32 aah_morph_amount = 0.0f; @@ -3732,7 +3730,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) mMeshLOD[MESH_ID_LOWER_BODY]->updateJointGeometry(); mMeshLOD[MESH_ID_UPPER_BODY]->updateJointGeometry(); - if( isWearingWearableType( WT_SKIRT ) ) + if( isWearingWearableType( LLWearableType::WT_SKIRT ) ) { mMeshLOD[MESH_ID_SKIRT]->updateJointGeometry(); } @@ -3892,7 +3890,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) U32 LLVOAvatar::renderTransparent(BOOL first_pass) { U32 num_indices = 0; - if( isWearingWearableType( WT_SKIRT ) && (mIsDummy || isTextureVisible(TEX_SKIRT_BAKED)) ) + if( isWearingWearableType( LLWearableType::WT_SKIRT ) && (mIsDummy || isTextureVisible(TEX_SKIRT_BAKED)) ) { gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f); num_indices += mMeshLOD[MESH_ID_SKIRT]->render(mAdjustedPixelArea, FALSE); @@ -4095,7 +4093,7 @@ void LLVOAvatar::updateTextures() mHasGrey = FALSE; // debug for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++) { - EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index); U32 num_wearables = gAgentWearables.getWearableCount(wearable_type); const LLTextureEntry *te = getTE(texture_index); const F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT); @@ -4157,6 +4155,8 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel { mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); mMinPixelArea = llmin(pixel_area, mMinPixelArea); + imagep->resetTextureStats(); + imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); } @@ -5581,6 +5581,14 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState()); + // This should never happen unless the server didn't process the attachment point + // correctly, but putting this check in here to be safe. + if (attachmentID & ATTACHMENT_ADD) + { + llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl; + attachmentID &= ~ATTACHMENT_ADD; + } + LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); if (!attachment) @@ -5992,16 +6000,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); -#ifdef DISPLAY_AVATAR_LOAD_TIMES - if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { - llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; - LLSD args; - args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); - args["NAME"] = getFullname(); - LLNotificationsUtil::add("AvatarRezNotification",args); + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; + LLSD args; + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezNotification",args); + } } -#endif // did our loading state "change" from last call? const S32 UPDATE_RATE = 30; @@ -6306,7 +6315,7 @@ void LLVOAvatar::releaseComponentTextures() const LLVOAvatarDictionary::BakedEntry * bakedDicEntry = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); // skip if this is a skirt and av is not wearing one, or if we don't have a baked texture UUID if (!isTextureDefined(bakedDicEntry->mTextureIndex) - && ( (baked_index != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT) )) + && ( (baked_index != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT) )) { continue; } @@ -6454,23 +6463,23 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const } // Unlike most wearable functions, this works for both self and other. -BOOL LLVOAvatar::isWearingWearableType(EWearableType type) const +BOOL LLVOAvatar::isWearingWearableType(LLWearableType::EType type) const { if (mIsDummy) return TRUE; switch(type) { - case WT_SHAPE: - case WT_SKIN: - case WT_HAIR: - case WT_EYES: + case LLWearableType::WT_SHAPE: + case LLWearableType::WT_SKIN: + case LLWearableType::WT_HAIR: + case LLWearableType::WT_EYES: return TRUE; // everyone has all bodyparts default: break; // Do nothing } /* switch(type) - case WT_SHIRT: + case LLWearableType::WT_SHIRT: indicator_te = TEX_UPPER_SHIRT; */ for (LLVOAvatarDictionary::Textures::const_iterator tex_iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); tex_iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); @@ -6987,9 +6996,9 @@ void LLVOAvatar::dumpArchetypeXML( void* ) apr_file_printf( file, "\n\t<archetype name=\"???\">\n" ); // only body parts, not clothing. - for (S32 type = WT_SHAPE; type <= WT_EYES; type++) + for (S32 type = LLWearableType::WT_SHAPE; type <= LLWearableType::WT_EYES; type++) { - const std::string& wearable_name = LLWearableDictionary::getTypeName((EWearableType)type); + const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type); apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() ); for (LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam()) @@ -7795,7 +7804,7 @@ void LLVOAvatar::idleUpdateRenderCost() { const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); ETextureIndex tex_index = baked_dict->mTextureIndex; - if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(WT_SKIRT))) + if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT))) { if (isTextureVisible(tex_index)) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index bf075a199c..a1d2e0baaa 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -71,9 +71,10 @@ class LLTexGlobalColor; class LLVOAvatarBoneInfo; class LLVOAvatarSkeletonInfo; -//------------------------------------------------------------------------ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar -//------------------------------------------------------------------------ +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatar : public LLViewerObject, public LLCharacter @@ -138,13 +139,13 @@ public: virtual void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax); virtual void getSpatialExtents(LLVector3& newMin, LLVector3& newMax); virtual BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, - S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - S32* face_hit = NULL, // which face was hit - LLVector3* intersection = NULL, // return the intersection point - LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point - LLVector3* normal = NULL, // return the surface normal at the intersection point - LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point + S32 face = -1, // which face to check, -1 = ALL_SIDES + BOOL pick_transparent = FALSE, + S32* face_hit = NULL, // which face was hit + LLVector3* intersection = NULL, // return the intersection point + LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point + LLVector3* normal = NULL, // return the surface normal at the intersection point + LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point //-------------------------------------------------------------------- // LLCharacter interface and related @@ -648,7 +649,7 @@ public: **/ public: - virtual BOOL isWearingWearableType(EWearableType type ) const; + virtual BOOL isWearingWearableType(LLWearableType::EType type ) const; //-------------------------------------------------------------------- // Attachments diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp index 49c4a1a6c8..ed0a4f147d 100644 --- a/indra/newview/llvoavatardefines.cpp +++ b/indra/newview/llvoavatardefines.cpp @@ -46,31 +46,31 @@ using namespace LLVOAvatarDefines; LLVOAvatarDictionary::Textures::Textures() { - addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", WT_SHIRT)); - addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", WT_PANTS)); - addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", WT_EYES)); - addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", WT_HAIR)); - addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN)); - addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", WT_SHOES)); - addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", WT_SOCKS)); - addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET)); - addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET)); - addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", WT_GLOVES)); - addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERSHIRT)); - addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERPANTS)); - addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", WT_SKIRT)); + addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT)); + addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS)); + addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES)); + addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR)); + addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES)); + addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS)); + addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES)); + addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT)); + addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS)); + addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT)); - addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); - addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA)); + addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); - addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); - addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", WT_TATTOO)); + addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD)); addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER)); @@ -86,34 +86,34 @@ LLVOAvatarDictionary::BakedTextures::BakedTextures() addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED, "head", "a4b9dc38-e13b-4df9-b284-751efb0566ff", 3, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA, - 5, WT_SHAPE, WT_SKIN, WT_HAIR, WT_TATTOO, WT_ALPHA)); + 5, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED, "upper_body", "5943ff64-d26c-4a90-a8c0-d61f56bd98d4", 7, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET, TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA, - 8, WT_SHAPE, WT_SKIN, WT_SHIRT, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT, WT_TATTOO, WT_ALPHA)); + 8, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED, "lower_body", "2944ee70-90a7-425d-a5fb-d749c782ed7d", 8, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS, TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA, - 9, WT_SHAPE, WT_SKIN, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_UNDERPANTS, WT_TATTOO, WT_ALPHA)); + 9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA)); addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED, "eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788", 2, TEX_EYES_IRIS, TEX_EYES_ALPHA, - 2, WT_EYES, WT_ALPHA)); + 2, LLWearableType::WT_EYES, LLWearableType::WT_ALPHA)); addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED, "skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63", 1, TEX_SKIRT, - 1, WT_SKIRT)); + 1, LLWearableType::WT_SKIRT)); addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED, "hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61", 2, TEX_HAIR, TEX_HAIR_ALPHA, - 2, WT_HAIR, WT_ALPHA)); + 2, LLWearableType::WT_HAIR, LLWearableType::WT_ALPHA)); } LLVOAvatarDictionary::Meshes::Meshes() @@ -170,7 +170,7 @@ LLVOAvatarDictionary::TextureEntry::TextureEntry(const std::string &name, bool is_local_texture, EBakedTextureIndex baked_texture_index, const std::string &default_image_name, - EWearableType wearable_type) : + LLWearableType::EType wearable_type) : LLDictionaryEntry(name), mIsLocalTexture(is_local_texture), mIsBakedTexture(!is_local_texture), @@ -216,7 +216,7 @@ LLVOAvatarDictionary::BakedEntry::BakedEntry(ETextureIndex tex_index, // Read in wearables for (U8 i=0; i < num_wearables; i++) { - EWearableType t = (EWearableType)va_arg(argp,int); + LLWearableType::EType t = (LLWearableType::EType)va_arg(argp,int); mWearables.push_back(t); } } @@ -261,7 +261,7 @@ const LLUUID LLVOAvatarDictionary::getDefaultTextureImageID(ETextureIndex index) } // static -EWearableType LLVOAvatarDictionary::getTEWearableType(ETextureIndex index ) +LLWearableType::EType LLVOAvatarDictionary::getTEWearableType(ETextureIndex index ) { return getInstance()->getTexture(index)->mWearableType; } diff --git a/indra/newview/llvoavatardefines.h b/indra/newview/llvoavatardefines.h index cf3d318159..9c4ee7e716 100644 --- a/indra/newview/llvoavatardefines.h +++ b/indra/newview/llvoavatardefines.h @@ -114,7 +114,7 @@ enum EMeshIndex typedef std::vector<ETextureIndex> texture_vec_t; typedef std::vector<EBakedTextureIndex> bakedtexture_vec_t; typedef std::vector<EMeshIndex> mesh_vec_t; -typedef std::vector<EWearableType> wearables_vec_t; +typedef std::vector<LLWearableType::EType> wearables_vec_t; //------------------------------------------------------------------------ // LLVOAvatarDictionary @@ -145,9 +145,9 @@ public: bool is_local_texture, EBakedTextureIndex baked_texture_index = BAKED_NUM_INDICES, const std::string& default_image_name = "", - EWearableType wearable_type = WT_INVALID); + LLWearableType::EType wearable_type = LLWearableType::WT_INVALID); const std::string mDefaultImageName; - const EWearableType mWearableType; + const LLWearableType::EType mWearableType; // It's either a local texture xor baked BOOL mIsLocalTexture; BOOL mIsBakedTexture; @@ -225,7 +225,7 @@ public: static const LLUUID getDefaultTextureImageID(ETextureIndex index); // Given a texture entry, determine which wearable type owns it. - static EWearableType getTEWearableType(ETextureIndex index); + static LLWearableType::EType getTEWearableType(ETextureIndex index); }; // End LLVOAvatarDictionary diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 9bed75c0a6..f35152b0b5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -185,7 +185,7 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - if (param->getWearableType() != WT_INVALID) + if (param->getWearableType() != LLWearableType::WT_INVALID) { param->setIsDummy(TRUE); } @@ -681,7 +681,7 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL if (param->getCrossWearable()) { - EWearableType type = (EWearableType)param->getWearableType(); + LLWearableType::EType type = (LLWearableType::EType)param->getWearableType(); U32 size = gAgentWearables.getWearableCount(type); for (U32 count = 0; count < size; ++count) { @@ -709,9 +709,9 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation() gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); // apply wearable visual params to avatar - for (U32 type = 0; type < WT_COUNT; type++) + for (U32 type = 0; type < LLWearableType::WT_COUNT; type++) { - LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); + LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type); if (wearable) { wearable->writeToAvatar(); @@ -945,17 +945,17 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) } } -/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(EWearableType type ) const +/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(LLWearableType::EType type ) const { return gAgentWearables.getWearableCount(type) > 0; } //----------------------------------------------------------------------------- -// updatedWearable( EWearableType type ) +// updatedWearable( LLWearableType::EType type ) // forces an update to any baked textures relevant to type. // will force an upload of the resulting bake if the second parameter is TRUE //----------------------------------------------------------------------------- -void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) +void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_result ) { for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); @@ -976,7 +976,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) type_iter != baked_dict->mWearables.end(); ++type_iter) { - const EWearableType comp_type = *type_iter; + const LLWearableType::EType comp_type = *type_iter; if (comp_type == type) { if (mBakedTextureDatas[index].mTexLayerSet) @@ -1112,7 +1112,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) U32 LLVOAvatarSelf::getNumWearables(LLVOAvatarDefines::ETextureIndex i) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); return gAgentWearables.getWearableCount(type); } @@ -1240,7 +1240,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { @@ -1272,7 +1272,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { @@ -1295,7 +1295,7 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 BOOL isDefined = TRUE; if (isIndexLocalTexture(type)) { - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); if (index >= wearable_count) { @@ -1437,7 +1437,7 @@ void LLVOAvatarSelf::updateComposites() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (mBakedTextureDatas[i].mTexLayerSet - && ((i != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT))) + && ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT))) { mBakedTextureDatas[i].mTexLayerSet->updateComposite(); } @@ -1516,7 +1516,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl; return; } - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); if (!gAgentWearables.getWearable(wearable_type,index)) { // no wearable is loaded, cannot set the texture. @@ -1702,10 +1702,10 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() BOOL LLVOAvatarSelf::getIsCloud() { // do we have our body parts? - if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 || - gAgentWearables.getWearableCount(WT_HAIR) == 0 || - gAgentWearables.getWearableCount(WT_EYES) == 0 || - gAgentWearables.getWearableCount(WT_SKIN) == 0) + if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0) { return TRUE; } @@ -1731,7 +1731,7 @@ BOOL LLVOAvatarSelf::getIsCloud() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - if (i == BAKED_SKIRT && !isWearingWearableType(WT_SKIRT)) + if (i == BAKED_SKIRT && !isWearingWearableType(LLWearableType::WT_SKIRT)) continue; const BakedTextureData& texture_data = mBakedTextureDatas[i]; @@ -1854,7 +1854,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe LLLocalTextureObject* LLVOAvatarSelf::getLocalTextureObject(LLVOAvatarDefines::ETextureIndex i, U32 wearable_index) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); LLWearable* wearable = gAgentWearables.getWearable(type, wearable_index); if (wearable) { @@ -2240,7 +2240,6 @@ LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, S32& components, U3 { case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; - case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; case GL_RGB: components = 3; internal_format = GL_RGB8; break; case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 337d445eac..460291a929 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -39,9 +39,10 @@ struct LocalTextureData; -//------------------------------------------------------------------------ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatarSelf -//------------------------------------------------------------------------ +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatarSelf : public LLVOAvatar { @@ -272,8 +273,8 @@ protected: **/ public: - /*virtual*/ BOOL isWearingWearableType(EWearableType type) const; - void wearableUpdated(EWearableType type, BOOL upload_result); + /*virtual*/ BOOL isWearingWearableType(LLWearableType::EType type) const; + void wearableUpdated(LLWearableType::EType type, BOOL upload_result); protected: U32 getNumWearables(LLVOAvatarDefines::ETextureIndex i) const; diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 7bb1006e93..25b46f8e55 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -72,9 +72,9 @@ private: void LLVoiceCallCapResponder::error(U32 status, const std::string& reason) { - llwarns << "LLVoiceCallCapResponder::error(" + LL_WARNS("Voice") << "LLVoiceCallCapResponder::error(" << status << ": " << reason << ")" - << llendl; + << LL_ENDL; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID); if ( channelp ) { @@ -104,8 +104,8 @@ void LLVoiceCallCapResponder::result(const LLSD& content) LLSD::map_const_iterator iter; for(iter = content.beginMap(); iter != content.endMap(); ++iter) { - llinfos << "LLVoiceCallCapResponder::result got " - << iter->first << llendl; + LL_DEBUGS("Voice") << "LLVoiceCallCapResponder::result got " + << iter->first << LL_ENDL; } channelp->setChannelInfo( @@ -131,10 +131,8 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess { // a voice channel already exists for this session id, so this instance will be orphaned // the end result should simply be the failure to make voice calls - llwarns << "Duplicate voice channels registered for session_id " << session_id << llendl; + LL_WARNS("Voice") << "Duplicate voice channels registered for session_id " << session_id << LL_ENDL; } - - LLVoiceClient::getInstance()->addObserver(this); } LLVoiceChannel::~LLVoiceChannel() @@ -142,7 +140,7 @@ LLVoiceChannel::~LLVoiceChannel() // Must check instance exists here, the singleton MAY have already been destroyed. if(LLVoiceClient::instanceExists()) { - LLVoiceClient::instance().removeObserver(this); + LLVoiceClient::getInstance()->removeObserver(this); } sVoiceChannelMap.erase(mSessionID); @@ -162,13 +160,13 @@ void LLVoiceChannel::setChannelInfo( if (mURI.empty()) { LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); - llwarns << "Received empty URI for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received empty URI for channel " << mSessionName << LL_ENDL; deactivate(); } else if (mCredentials.empty()) { LLNotificationsUtil::add("VoiceChannelJoinFailed", mNotifyArgs); - llwarns << "Received empty credentials for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received empty credentials for channel " << mSessionName << LL_ENDL; deactivate(); } else @@ -283,13 +281,14 @@ void LLVoiceChannel::deactivate() //Default mic is OFF when leaving voice calls if (gSavedSettings.getBOOL("AutoDisengageMic") && sCurrentVoiceChannel == this && - gVoiceClient->getUserPTTState()) + LLVoiceClient::getInstance()->getUserPTTState()) { gSavedSettings.setBOOL("PTTCurrentlyEnabled", true); - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } - + LLVoiceClient::getInstance()->removeObserver(this); + if (sCurrentVoiceChannel == this) { // default channel is proximal channel @@ -329,7 +328,9 @@ void LLVoiceChannel::activate() { setState(STATE_CALL_STARTED); } - + + LLVoiceClient::getInstance()->addObserver(this); + //do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state sCurrentVoiceChannelChangedSignal(this->mSessionID); } @@ -371,6 +372,11 @@ LLVoiceChannel* LLVoiceChannel::getChannelByURI(std::string uri) } } +LLVoiceChannel* LLVoiceChannel::getCurrentVoiceChannel() +{ + return sCurrentVoiceChannel; +} + void LLVoiceChannel::updateSessionID(const LLUUID& new_session_id) { sVoiceChannelMap.erase(sVoiceChannelMap.find(mSessionID)); @@ -422,7 +428,6 @@ void LLVoiceChannel::initClass() sCurrentVoiceChannel = LLVoiceChannelProximal::getInstance(); } - //static void LLVoiceChannel::suspend() { @@ -438,7 +443,7 @@ void LLVoiceChannel::resume() { if (sSuspended) { - if (gVoiceClient->voiceEnabled()) + if (LLVoiceClient::getInstance()->voiceEnabled()) { if (sSuspendedVoiceChannel) { @@ -508,9 +513,9 @@ void LLVoiceChannelGroup::activate() #endif //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls - if (gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle()) + if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) { - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } @@ -557,7 +562,7 @@ void LLVoiceChannelGroup::setChannelInfo( else { //*TODO: notify user - llwarns << "Received invalid credentials for channel " << mSessionName << llendl; + LL_WARNS("Voice") << "Received invalid credentials for channel " << mSessionName << LL_ENDL; deactivate(); } } @@ -656,7 +661,6 @@ void LLVoiceChannelGroup::setState(EState state) LLVoiceChannelProximal::LLVoiceChannelProximal() : LLVoiceChannel(LLUUID::null, LLStringUtil::null) { - activate(); } BOOL LLVoiceChannelProximal::isActive() @@ -668,13 +672,13 @@ void LLVoiceChannelProximal::activate() { if (callStarted()) return; - LLVoiceChannel::activate(); - - if (callStarted()) + if((LLVoiceChannel::sCurrentVoiceChannel != this) && (LLVoiceChannel::getState() == STATE_CONNECTED)) { - // this implicitly puts you back in the spatial channel - LLVoiceClient::getInstance()->leaveNonSpatialChannel(); + // we're connected to a non-spatial channel, so disconnect. + LLVoiceClient::getInstance()->leaveNonSpatialChannel(); } + LLVoiceChannel::activate(); + } void LLVoiceChannelProximal::onChange(EStatusType type, const std::string &channelURI, bool proximal) @@ -704,7 +708,7 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) return; case STATUS_VOICE_DISABLED: //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) - if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) { //TODO: remove or redirect this call status notification // LLCallInfoDialog::show("unavailable", mNotifyArgs); @@ -764,7 +768,7 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { - llinfos << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << llendl; + LL_INFOS("Voice") << "P2P CALL CHANNEL STATUS CHANGE: incoming=" << int(mReceivedCall) << " newstatus=" << LLVoiceClientStatusObserver::status2string(type) << " (mState=" << mState << ")" << LL_ENDL; // status updates switch(type) @@ -838,9 +842,9 @@ void LLVoiceChannelP2P::activate() LLRecentPeople::instance().add(mOtherUserID); //Default mic is ON on initiating/joining P2P calls - if (!gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle()) + if (!LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) { - gVoiceClient->inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(true); } } } @@ -903,7 +907,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s void LLVoiceChannelP2P::setState(EState state) { - llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl; + LL_INFOS("Voice") << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << LL_ENDL; if (mReceivedCall) // incoming call { diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 941cccacc3..573fab1f4f 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -98,7 +98,8 @@ public: static LLVoiceChannel* getChannelByID(const LLUUID& session_id); static LLVoiceChannel* getChannelByURI(std::string uri); - static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } + static LLVoiceChannel* getCurrentVoiceChannel(); + static void initClass(); static void suspend(); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 298ce3fcec..91353281a8 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1,6 +1,6 @@ /** * @file llvoiceclient.cpp - * @brief Implementation of LLVoiceClient class which is the interface to the voice client process. + * @brief Voice client delegation class implementation. * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -17,8 +17,7 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this 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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -32,5421 +31,311 @@ #include "llviewerprecompiledheaders.h" #include "llvoiceclient.h" - -#include <boost/tokenizer.hpp> - -// library includes -#include "llnotificationsutil.h" -#include "llsdserialize.h" -#include "llsdutil.h" - - -// project includes -#include "llvoavatar.h" -#include "llbufferstream.h" -#include "llfile.h" -#ifdef LL_STANDALONE -# include "expat.h" -#else -# include "expat/expat.h" -#endif -#include "llcallbacklist.h" -#include "llcallingcard.h" // for LLFriendObserver -#include "llviewerregion.h" -#include "llviewernetwork.h" // for gGridChoice -#include "llbase64.h" #include "llviewercontrol.h" -#include "llkeyboard.h" -#include "llappviewer.h" // for gDisconnected, gDisableVoice -#include "llmutelist.h" // to check for muted avatars -#include "llagent.h" -#include "llvoavatarself.h" -#include "llcachename.h" -#include "llimview.h" // for LLIMMgr -#include "llparcel.h" -#include "llviewerparcelmgr.h" -//#include "llfirstuse.h" -#include "llspeakers.h" -#include "lltrans.h" #include "llviewerwindow.h" -#include "llviewercamera.h" -#include "llvoavatarself.h" -#include "llvoicechannel.h" - -// for base64 decoding -#include "apr_base64.h" - -// for SHA1 hash -#include "apr_sha1.h" - -// for MD5 hash -#include "llmd5.h" - -#define USE_SESSION_GROUPS 0 +#include "llvoicevivox.h" +#include "llviewernetwork.h" +#include "llhttpnode.h" +#include "llnotificationsutil.h" +#include "llsdserialize.h" +#include "llui.h" -static bool sConnectingToAgni = false; -F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; +const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; const F32 LLVoiceClient::VOLUME_MIN = 0.f; const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f; const F32 LLVoiceClient::VOLUME_MAX = 1.0f; -const F32 VOLUME_SCALE_VIVOX = 0.01f; - -const F32 SPEAKING_TIMEOUT = 1.f; - -const int VOICE_MAJOR_VERSION = 1; -const int VOICE_MINOR_VERSION = 0; - -LLVoiceClient *gVoiceClient = NULL; - -// Don't retry connecting to the daemon more frequently than this: -const F32 CONNECT_THROTTLE_SECONDS = 1.0f; - -// Don't send positional updates more frequently than this: -const F32 UPDATE_THROTTLE_SECONDS = 0.1f; - -const F32 LOGIN_RETRY_SECONDS = 10.0f; -const int MAX_LOGIN_RETRIES = 12; - -// Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() -// which is treated as normal. If this number is exceeded we suspect there is a problem with connection -// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen -// to make sure we don't make mistake when slight connection problems happen- situation when connection to server is -// blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. -const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; - -static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) -{ - LLMD5 md5_uuid; - md5_uuid.update((const unsigned char*)str.data(), str.size()); - md5_uuid.finalize(); - md5_uuid.raw_digest(uuid.mData); -} - -static int scale_mic_volume(float volume) -{ - // incoming volume has the range [0.0 ... 2.0], with 1.0 as the default. - // 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 to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70 - return 30 + (int)(volume * 40.0f); -} - -class LLViewerVoiceAccountProvisionResponder : - public LLHTTPClient::Responder -{ -public: - LLViewerVoiceAccountProvisionResponder(int retries) - { - mRetries = retries; - } - - virtual void error(U32 status, const std::string& reason) - { - if ( mRetries > 0 ) - { - LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; - if ( gVoiceClient ) gVoiceClient->requestVoiceAccountProvision( - mRetries - 1); - } - else - { - LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; - if ( gVoiceClient ) gVoiceClient->giveUp(); - } - } - - virtual void result(const LLSD& content) - { - if ( gVoiceClient ) - { - std::string voice_sip_uri_hostname; - std::string voice_account_server_uri; - - LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; - - if(content.has("voice_sip_uri_hostname")) - voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); - - // this key is actually misnamed -- it will be an entire URI, not just a hostname. - if(content.has("voice_account_server_name")) - voice_account_server_uri = content["voice_account_server_name"].asString(); - - gVoiceClient->login( - content["username"].asString(), - content["password"].asString(), - voice_sip_uri_hostname, - voice_account_server_uri); - } - } - -private: - int mRetries; -}; - -/** - * @class LLVivoxProtocolParser - * @brief This class helps construct new LLIOPipe specializations - * @see LLIOPipe - * - * THOROUGH_DESCRIPTION - */ -class LLVivoxProtocolParser : public LLIOPipe -{ - LOG_CLASS(LLVivoxProtocolParser); -public: - LLVivoxProtocolParser(); - virtual ~LLVivoxProtocolParser(); - -protected: - /* @name LLIOPipe virtual implementations - */ - //@{ - /** - * @brief Process the data in buffer - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} - - std::string mInput; - - // Expat control members - XML_Parser parser; - int responseDepth; - bool ignoringTags; - bool isEvent; - int ignoreDepth; - - // Members for processing responses. The values are transient and only valid within a call to processResponse(). - bool squelchDebugOutput; - int returnCode; - int statusCode; - std::string statusString; - std::string requestId; - std::string actionString; - std::string connectorHandle; - std::string versionID; - std::string accountHandle; - std::string sessionHandle; - std::string sessionGroupHandle; - std::string alias; - std::string applicationString; - - // Members for processing events. The values are transient and only valid within a call to processResponse(). - std::string eventTypeString; - int state; - std::string uriString; - bool isChannel; - bool incoming; - bool enabled; - std::string nameString; - std::string audioMediaString; - std::string displayNameString; - std::string deviceString; - int participantType; - bool isLocallyMuted; - bool isModeratorMuted; - bool isSpeaking; - int volume; - F32 energy; - std::string messageHeader; - std::string messageBody; - std::string notificationType; - bool hasText; - bool hasAudio; - bool hasVideo; - bool terminated; - std::string blockMask; - std::string presenceOnly; - std::string autoAcceptMask; - std::string autoAddAsBuddy; - int numberOfAliases; - std::string subscriptionHandle; - std::string subscriptionType; - - - // Members for processing text between tags - std::string textBuffer; - bool accumulateText; - - void reset(); - - void processResponse(std::string tag); - -static void XMLCALL ExpatStartTag(void *data, const char *el, const char **attr); -static void XMLCALL ExpatEndTag(void *data, const char *el); -static void XMLCALL ExpatCharHandler(void *data, const XML_Char *s, int len); - - void StartTag(const char *tag, const char **attr); - void EndTag(const char *tag); - void CharData(const char *buffer, int length); - -}; - -LLVivoxProtocolParser::LLVivoxProtocolParser() -{ - parser = NULL; - parser = XML_ParserCreate(NULL); - - reset(); -} - -void LLVivoxProtocolParser::reset() -{ - responseDepth = 0; - ignoringTags = false; - accumulateText = false; - energy = 0.f; - hasText = false; - hasAudio = false; - hasVideo = false; - terminated = false; - ignoreDepth = 0; - isChannel = false; - incoming = false; - enabled = false; - isEvent = false; - isLocallyMuted = false; - isModeratorMuted = false; - isSpeaking = false; - participantType = 0; - squelchDebugOutput = false; - returnCode = -1; - state = 0; - statusCode = 0; - volume = 0; - textBuffer.clear(); - alias.clear(); - numberOfAliases = 0; - applicationString.clear(); -} - -//virtual -LLVivoxProtocolParser::~LLVivoxProtocolParser() -{ - if (parser) - XML_ParserFree(parser); -} - -// virtual -LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump) -{ - LLBufferStream istr(channels, buffer.get()); - std::ostringstream ostr; - while (istr.good()) - { - char buf[1024]; - istr.read(buf, sizeof(buf)); - mInput.append(buf, istr.gcount()); - } - - // Look for input delimiter(s) in the input buffer. If one is found, send the message to the xml parser. - int start = 0; - int delim; - while((delim = mInput.find("\n\n\n", start)) != std::string::npos) - { - - // Reset internal state of the LLVivoxProtocolParser (no effect on the expat parser) - reset(); - - XML_ParserReset(parser, NULL); - XML_SetElementHandler(parser, ExpatStartTag, ExpatEndTag); - XML_SetCharacterDataHandler(parser, ExpatCharHandler); - XML_SetUserData(parser, this); - XML_Parse(parser, mInput.data() + start, delim - start, false); - - // If this message isn't set to be squelched, output the raw XML received. - if(!squelchDebugOutput) - { - LL_DEBUGS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; - } - - start = delim + 3; - } - - if(start != 0) - mInput = mInput.substr(start); - - LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL; - - if(!gVoiceClient->mConnected) - { - // If voice has been disabled, we just want to close the socket. This does so. - LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL; - return STATUS_STOP; - } - - return STATUS_OK; -} - -void XMLCALL LLVivoxProtocolParser::ExpatStartTag(void *data, const char *el, const char **attr) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->StartTag(el, attr); - } -} - -// -------------------------------------------------------------------------------- - -void XMLCALL LLVivoxProtocolParser::ExpatEndTag(void *data, const char *el) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->EndTag(el); - } -} - -// -------------------------------------------------------------------------------- - -void XMLCALL LLVivoxProtocolParser::ExpatCharHandler(void *data, const XML_Char *s, int len) -{ - if (data) - { - LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; - object->CharData(s, len); - } -} - -// -------------------------------------------------------------------------------- - - -void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) -{ - // Reset the text accumulator. We shouldn't have strings that are inturrupted by new tags - textBuffer.clear(); - // only accumulate text if we're not ignoring tags. - accumulateText = !ignoringTags; - - if (responseDepth == 0) - { - isEvent = !stricmp("Event", tag); - - if (!stricmp("Response", tag) || isEvent) - { - // Grab the attributes - while (*attr) - { - const char *key = *attr++; - const char *value = *attr++; - - if (!stricmp("requestId", key)) - { - requestId = value; - } - else if (!stricmp("action", key)) - { - actionString = value; - } - else if (!stricmp("type", key)) - { - eventTypeString = value; - } - } - } - LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; - } - else - { - if (ignoringTags) - { - LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - } - else - { - LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; - - // Ignore the InputXml stuff so we don't get confused - if (!stricmp("InputXml", tag)) - { - ignoringTags = true; - ignoreDepth = responseDepth; - accumulateText = false; - - LL_DEBUGS("VivoxProtocolParser") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL; - } - else if (!stricmp("CaptureDevices", tag)) - { - gVoiceClient->clearCaptureDevices(); - } - else if (!stricmp("RenderDevices", tag)) - { - gVoiceClient->clearRenderDevices(); - } - else if (!stricmp("CaptureDevice", tag)) - { - deviceString.clear(); - } - else if (!stricmp("RenderDevice", tag)) - { - deviceString.clear(); - } - else if (!stricmp("Buddies", tag)) - { - gVoiceClient->deleteAllBuddies(); - } - else if (!stricmp("BlockRules", tag)) - { - gVoiceClient->deleteAllBlockRules(); - } - else if (!stricmp("AutoAcceptRules", tag)) - { - gVoiceClient->deleteAllAutoAcceptRules(); - } - - } - } - responseDepth++; -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::EndTag(const char *tag) -{ - const std::string& string = textBuffer; - - responseDepth--; - - if (ignoringTags) - { - if (ignoreDepth == responseDepth) - { - LL_DEBUGS("VivoxProtocolParser") << "end of ignore" << LL_ENDL; - ignoringTags = false; - } - else - { - LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - } - } - - if (!ignoringTags) - { - LL_DEBUGS("VivoxProtocolParser") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; - - // Closing a tag. Finalize the text we've accumulated and reset - if (!stricmp("ReturnCode", tag)) - returnCode = strtol(string.c_str(), NULL, 10); - else if (!stricmp("SessionHandle", tag)) - sessionHandle = string; - else if (!stricmp("SessionGroupHandle", tag)) - sessionGroupHandle = string; - else if (!stricmp("StatusCode", tag)) - statusCode = strtol(string.c_str(), NULL, 10); - else if (!stricmp("StatusString", tag)) - statusString = string; - else if (!stricmp("ParticipantURI", tag)) - uriString = string; - else if (!stricmp("Volume", tag)) - volume = strtol(string.c_str(), NULL, 10); - else if (!stricmp("Energy", tag)) - energy = (F32)strtod(string.c_str(), NULL); - else if (!stricmp("IsModeratorMuted", tag)) - isModeratorMuted = !stricmp(string.c_str(), "true"); - else if (!stricmp("IsSpeaking", tag)) - isSpeaking = !stricmp(string.c_str(), "true"); - else if (!stricmp("Alias", tag)) - alias = string; - else if (!stricmp("NumberOfAliases", tag)) - numberOfAliases = strtol(string.c_str(), NULL, 10); - else if (!stricmp("Application", tag)) - applicationString = string; - else if (!stricmp("ConnectorHandle", tag)) - connectorHandle = string; - else if (!stricmp("VersionID", tag)) - versionID = string; - else if (!stricmp("AccountHandle", tag)) - accountHandle = string; - else if (!stricmp("State", tag)) - state = strtol(string.c_str(), NULL, 10); - else if (!stricmp("URI", tag)) - uriString = string; - else if (!stricmp("IsChannel", tag)) - isChannel = !stricmp(string.c_str(), "true"); - else if (!stricmp("Incoming", tag)) - incoming = !stricmp(string.c_str(), "true"); - else if (!stricmp("Enabled", tag)) - enabled = !stricmp(string.c_str(), "true"); - else if (!stricmp("Name", tag)) - nameString = string; - else if (!stricmp("AudioMedia", tag)) - audioMediaString = string; - else if (!stricmp("ChannelName", tag)) - nameString = string; - else if (!stricmp("DisplayName", tag)) - displayNameString = string; - else if (!stricmp("Device", tag)) - deviceString = string; - else if (!stricmp("AccountName", tag)) - nameString = string; - else if (!stricmp("ParticipantType", tag)) - participantType = strtol(string.c_str(), NULL, 10); - else if (!stricmp("IsLocallyMuted", tag)) - isLocallyMuted = !stricmp(string.c_str(), "true"); - else if (!stricmp("MicEnergy", tag)) - energy = (F32)strtod(string.c_str(), NULL); - else if (!stricmp("ChannelName", tag)) - nameString = string; - else if (!stricmp("ChannelURI", tag)) - uriString = string; - else if (!stricmp("BuddyURI", tag)) - uriString = string; - else if (!stricmp("Presence", tag)) - statusString = string; - else if (!stricmp("CaptureDevice", tag)) - { - gVoiceClient->addCaptureDevice(deviceString); - } - else if (!stricmp("RenderDevice", tag)) - { - gVoiceClient->addRenderDevice(deviceString); - } - else if (!stricmp("Buddy", tag)) - { - gVoiceClient->processBuddyListEntry(uriString, displayNameString); - } - else if (!stricmp("BlockRule", tag)) - { - gVoiceClient->addBlockRule(blockMask, presenceOnly); - } - else if (!stricmp("BlockMask", tag)) - blockMask = string; - else if (!stricmp("PresenceOnly", tag)) - presenceOnly = string; - else if (!stricmp("AutoAcceptRule", tag)) - { - gVoiceClient->addAutoAcceptRule(autoAcceptMask, autoAddAsBuddy); - } - else if (!stricmp("AutoAcceptMask", tag)) - autoAcceptMask = string; - else if (!stricmp("AutoAddAsBuddy", tag)) - autoAddAsBuddy = string; - else if (!stricmp("MessageHeader", tag)) - messageHeader = string; - else if (!stricmp("MessageBody", tag)) - messageBody = string; - else if (!stricmp("NotificationType", tag)) - notificationType = string; - else if (!stricmp("HasText", tag)) - hasText = !stricmp(string.c_str(), "true"); - else if (!stricmp("HasAudio", tag)) - hasAudio = !stricmp(string.c_str(), "true"); - else if (!stricmp("HasVideo", tag)) - hasVideo = !stricmp(string.c_str(), "true"); - else if (!stricmp("Terminated", tag)) - terminated = !stricmp(string.c_str(), "true"); - else if (!stricmp("SubscriptionHandle", tag)) - subscriptionHandle = string; - else if (!stricmp("SubscriptionType", tag)) - subscriptionType = string; - - textBuffer.clear(); - accumulateText= false; - - if (responseDepth == 0) - { - // We finished all of the XML, process the data - processResponse(tag); - } - } -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::CharData(const char *buffer, int length) -{ - /* - This method is called for anything that isn't a tag, which can be text you - want that lies between tags, and a lot of stuff you don't want like file formatting - (tabs, spaces, CR/LF, etc). - - Only copy text if we are in accumulate mode... - */ - if (accumulateText) - textBuffer.append(buffer, length); -} - -// -------------------------------------------------------------------------------- - -void LLVivoxProtocolParser::processResponse(std::string tag) -{ - LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; - - // SLIM SDK: the SDK now returns a statusCode of "200" (OK) for success. This is a change vs. previous SDKs. - // According to Mike S., "The actual API convention is that responses with return codes of 0 are successful, regardless of the status code returned", - // so I believe this will give correct behavior. - - if(returnCode == 0) - statusCode = 0; - - if (isEvent) - { - const char *eventTypeCstr = eventTypeString.c_str(); - if (!stricmp(eventTypeCstr, "AccountLoginStateChangeEvent")) - { - gVoiceClient->accountLoginStateChangeEvent(accountHandle, statusCode, statusString, state); - } - else if (!stricmp(eventTypeCstr, "SessionAddedEvent")) - { - /* - <Event type="SessionAddedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <Uri>sip:confctl-1408789@bhr.vivox.com</Uri> - <IsChannel>true</IsChannel> - <Incoming>false</Incoming> - <ChannelName /> - </Event> - */ - gVoiceClient->sessionAddedEvent(uriString, alias, sessionHandle, sessionGroupHandle, isChannel, incoming, nameString, applicationString); - } - else if (!stricmp(eventTypeCstr, "SessionRemovedEvent")) - { - gVoiceClient->sessionRemovedEvent(sessionHandle, sessionGroupHandle); - } - else if (!stricmp(eventTypeCstr, "SessionGroupAddedEvent")) - { - gVoiceClient->sessionGroupAddedEvent(sessionGroupHandle); - } - else if (!stricmp(eventTypeCstr, "MediaStreamUpdatedEvent")) - { - /* - <Event type="MediaStreamUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <StatusCode>200</StatusCode> - <StatusString>OK</StatusString> - <State>2</State> - <Incoming>false</Incoming> - </Event> - */ - gVoiceClient->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); - } - else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) - { - /* - <Event type="TextStreamUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg1</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==1</SessionHandle> - <Enabled>true</Enabled> - <State>1</State> - <Incoming>true</Incoming> - </Event> - */ - gVoiceClient->textStreamUpdatedEvent(sessionHandle, sessionGroupHandle, enabled, state, incoming); - } - else if (!stricmp(eventTypeCstr, "ParticipantAddedEvent")) - { - /* - <Event type="ParticipantAddedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> - <ParticipantUri>sip:xI5auBZ60SJWIk606-1JGRQ==@bhr.vivox.com</ParticipantUri> - <AccountName>xI5auBZ60SJWIk606-1JGRQ==</AccountName> - <DisplayName /> - <ParticipantType>0</ParticipantType> - </Event> - */ - gVoiceClient->participantAddedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString, displayNameString, participantType); - } - else if (!stricmp(eventTypeCstr, "ParticipantRemovedEvent")) - { - /* - <Event type="ParticipantRemovedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> - <ParticipantUri>sip:xtx7YNV-3SGiG7rA1fo5Ndw==@bhr.vivox.com</ParticipantUri> - <AccountName>xtx7YNV-3SGiG7rA1fo5Ndw==</AccountName> - </Event> - */ - gVoiceClient->participantRemovedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString); - } - else if (!stricmp(eventTypeCstr, "ParticipantUpdatedEvent")) - { - /* - <Event type="ParticipantUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <ParticipantUri>sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com</ParticipantUri> - <IsModeratorMuted>false</IsModeratorMuted> - <IsSpeaking>true</IsSpeaking> - <Volume>44</Volume> - <Energy>0.0879437</Energy> - </Event> - */ - - // These happen so often that logging them is pretty useless. - squelchDebugOutput = true; - - gVoiceClient->participantUpdatedEvent(sessionHandle, sessionGroupHandle, uriString, alias, isModeratorMuted, isSpeaking, volume, energy); - } - else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) - { - gVoiceClient->auxAudioPropertiesEvent(energy); - } - else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) - { - gVoiceClient->buddyPresenceEvent(uriString, alias, statusString, applicationString); - } - else if (!stricmp(eventTypeCstr, "BuddyAndGroupListChangedEvent")) - { - // The buddy list was updated during parsing. - // Need to recheck against the friends list. - gVoiceClient->buddyListChanged(); - } - else if (!stricmp(eventTypeCstr, "BuddyChangedEvent")) - { - /* - <Event type="BuddyChangedEvent"> - <AccountHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==</AccountHandle> - <BuddyURI>sip:x9fFHFZjOTN6OESF1DUPrZQ==@bhr.vivox.com</BuddyURI> - <DisplayName>Monroe Tester</DisplayName> - <BuddyData /> - <GroupID>0</GroupID> - <ChangeType>Set</ChangeType> - </Event> - */ - // TODO: Question: Do we need to process this at all? - } - else if (!stricmp(eventTypeCstr, "MessageEvent")) - { - gVoiceClient->messageEvent(sessionHandle, uriString, alias, messageHeader, messageBody, applicationString); - } - else if (!stricmp(eventTypeCstr, "SessionNotificationEvent")) - { - gVoiceClient->sessionNotificationEvent(sessionHandle, uriString, notificationType); - } - else if (!stricmp(eventTypeCstr, "SubscriptionEvent")) - { - gVoiceClient->subscriptionEvent(uriString, subscriptionHandle, alias, displayNameString, applicationString, subscriptionType); - } - else if (!stricmp(eventTypeCstr, "SessionUpdatedEvent")) - { - /* - <Event type="SessionUpdatedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> - <Uri>sip:confctl-9@bhd.vivox.com</Uri> - <IsMuted>0</IsMuted> - <Volume>50</Volume> - <TransmitEnabled>1</TransmitEnabled> - <IsFocused>0</IsFocused> - <SpeakerPosition><Position><X>0</X><Y>0</Y><Z>0</Z></Position></SpeakerPosition> - <SessionFontID>0</SessionFontID> - </Event> - */ - // We don't need to process this, but we also shouldn't warn on it, since that confuses people. - } - - else if (!stricmp(eventTypeCstr, "SessionGroupRemovedEvent")) - { - /* - <Event type="SessionGroupRemovedEvent"> - <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> - </Event> - */ - // We don't need to process this, but we also shouldn't warn on it, since that confuses people. - } - else - { - LL_WARNS("VivoxProtocolParser") << "Unknown event type " << eventTypeString << LL_ENDL; - } - } - else - { - const char *actionCstr = actionString.c_str(); - if (!stricmp(actionCstr, "Connector.Create.1")) - { - gVoiceClient->connectorCreateResponse(statusCode, statusString, connectorHandle, versionID); - } - else if (!stricmp(actionCstr, "Account.Login.1")) - { - gVoiceClient->loginResponse(statusCode, statusString, accountHandle, numberOfAliases); - } - else if (!stricmp(actionCstr, "Session.Create.1")) - { - gVoiceClient->sessionCreateResponse(requestId, statusCode, statusString, sessionHandle); - } - else if (!stricmp(actionCstr, "SessionGroup.AddSession.1")) - { - gVoiceClient->sessionGroupAddSessionResponse(requestId, statusCode, statusString, sessionHandle); - } - else if (!stricmp(actionCstr, "Session.Connect.1")) - { - gVoiceClient->sessionConnectResponse(requestId, statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.Logout.1")) - { - gVoiceClient->logoutResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Connector.InitiateShutdown.1")) - { - gVoiceClient->connectorShutdownResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.ListBlockRules.1")) - { - gVoiceClient->accountListBlockRulesResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Account.ListAutoAcceptRules.1")) - { - gVoiceClient->accountListAutoAcceptRulesResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Session.Set3DPosition.1")) - { - // We don't need to process these, but they're so spammy we don't want to log them. - squelchDebugOutput = true; - } -/* - else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) - { - gVoiceClient->channelGetListResponse(statusCode, statusString); - } - else if (!stricmp(actionCstr, "Connector.AccountCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.MuteLocalMic.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.MuteLocalSpeaker.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.SetLocalMicVolume.1")) - { - - } - else if (!stricmp(actionCstr, "Connector.SetLocalSpeakerVolume.1")) - { - - } - else if (!stricmp(actionCstr, "Session.ListenerSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.SpeakerSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.AudioSourceSetPosition.1")) - { - - } - else if (!stricmp(actionCstr, "Session.GetChannelParticipants.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelUpdate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelDelete.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelCreateAndInvite.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderCreate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderUpdate.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelFolderDelete.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelAddModerator.1")) - { - - } - else if (!stricmp(actionCstr, "Account.ChannelDeleteModerator.1")) - { - - } -*/ - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////// - -class LLVoiceClientMuteListObserver : public LLMuteListObserver -{ - /* virtual */ void onChange() { gVoiceClient->muteListChanged();} -}; - -class LLVoiceClientFriendsObserver : public LLFriendObserver -{ -public: - /* virtual */ void changed(U32 mask) { gVoiceClient->updateFriends(mask);} -}; - -static LLVoiceClientMuteListObserver mutelist_listener; -static bool sMuteListListener_listening = false; - -static LLVoiceClientFriendsObserver *friendslist_listener = NULL; - -/////////////////////////////////////////////////////////////////////////////////////////////// - -class LLVoiceClientCapResponder : public LLHTTPClient::Responder -{ -public: - LLVoiceClientCapResponder(void){}; - - virtual void error(U32 status, const std::string& reason); // called with bad status codes - virtual void result(const LLSD& content); - -private: -}; - -void LLVoiceClientCapResponder::error(U32 status, const std::string& reason) -{ - LL_WARNS("Voice") << "LLVoiceClientCapResponder::error(" - << status << ": " << reason << ")" - << LL_ENDL; -} - -void LLVoiceClientCapResponder::result(const LLSD& content) -{ - LLSD::map_const_iterator iter; - - LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; - - if ( content.has("voice_credentials") ) - { - LLSD voice_credentials = content["voice_credentials"]; - std::string uri; - std::string credentials; - - if ( voice_credentials.has("channel_uri") ) - { - uri = voice_credentials["channel_uri"].asString(); - } - if ( voice_credentials.has("channel_credentials") ) - { - credentials = - voice_credentials["channel_credentials"].asString(); - } - - gVoiceClient->setSpatialChannel(uri, credentials); - } -} - - - -#if LL_WINDOWS -static HANDLE sGatewayHandle = 0; - -static bool isGatewayRunning() -{ - bool result = false; - if(sGatewayHandle != 0) - { - DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); - if(waitresult != WAIT_OBJECT_0) - { - result = true; - } - } - return result; -} -static void killGateway() -{ - if(sGatewayHandle != 0) - { - TerminateProcess(sGatewayHandle,0); - } -} - -#else // Mac and linux - -static pid_t sGatewayPID = 0; -static bool isGatewayRunning() -{ - bool result = false; - if(sGatewayPID != 0) - { - // A kill with signal number 0 has no effect, just does error checking. It should return an error if the process no longer exists. - if(kill(sGatewayPID, 0) == 0) - { - result = true; - } - } - return result; -} - -static void killGateway() -{ - if(sGatewayPID != 0) - { - kill(sGatewayPID, SIGTERM); - } -} - -#endif - -class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> -{ - LOG_CLASS(LLSpeakerVolumeStorage); -public: - - /** - * Stores volume level for specified user. - * - * @param[in] speaker_id - LLUUID of user to store volume level for. - * @param[in] volume - volume level to be stored for user. - */ - void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); - - /** - * Gets stored volume level for specified speaker - * - * @param[in] speaker_id - LLUUID of user to retrieve volume level for. - * @param[out] volume - set to stored volume if found, otherwise unmodified. - * @return - true if a stored volume is found. - */ - bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); - - /** - * Removes stored volume level for specified user. - * - * @param[in] speaker_id - LLUUID of user to remove. - */ - void removeSpeakerVolume(const LLUUID& speaker_id); - -private: - friend class LLSingleton<LLSpeakerVolumeStorage>; - LLSpeakerVolumeStorage(); - ~LLSpeakerVolumeStorage(); - - const static std::string SETTINGS_FILE_NAME; - - void load(); - void save(); - - static F32 transformFromLegacyVolume(F32 volume_in); - static F32 transformToLegacyVolume(F32 volume_in); - - typedef std::map<LLUUID, F32> speaker_data_map_t; - speaker_data_map_t mSpeakersData; -}; - -const std::string LLSpeakerVolumeStorage::SETTINGS_FILE_NAME = "volume_settings.xml"; - -LLSpeakerVolumeStorage::LLSpeakerVolumeStorage() -{ - load(); -} - -LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() -{ - save(); -} - -void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) -{ - if ((volume >= LLVoiceClient::VOLUME_MIN) && (volume <= LLVoiceClient::VOLUME_MAX)) - { - mSpeakersData[speaker_id] = volume; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Stored volume = " << volume << " for " << id << LL_ENDL; - } - else - { - LL_WARNS("Voice") << "Attempted to store out of range volume " << volume << " for " << speaker_id << LL_ENDL; - llassert(0); - } -} - -bool LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id, F32& volume) -{ - speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); - - if (it != mSpeakersData.end()) - { - volume = it->second; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Retrieved stored volume = " << volume << " for " << id << LL_ENDL; - - return true; - } - - return false; -} - -void LLSpeakerVolumeStorage::removeSpeakerVolume(const LLUUID& speaker_id) -{ - mSpeakersData.erase(speaker_id); - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "Removing stored volume for " << id << LL_ENDL; -} - -/* static */ F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in) -{ - // Convert to linear-logarithmic [0.0..1.0] with 0.5 = 0dB - // from legacy characteristic composed of two square-curves - // that intersect at volume_in = 0.5, volume_out = 0.56 - - F32 volume_out = 0.f; - volume_in = llclamp(volume_in, 0.f, 1.0f); - - if (volume_in <= 0.5f) - { - volume_out = volume_in * volume_in * 4.f * 0.56f; - } - else - { - volume_out = (1.f - 0.56f) * (4.f * volume_in * volume_in - 1.f) / 3.f + 0.56f; - } - - return volume_out; -} - -/* static */ F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in) -{ - // Convert from linear-logarithmic [0.0..1.0] with 0.5 = 0dB - // to legacy characteristic composed of two square-curves - // that intersect at volume_in = 0.56, volume_out = 0.5 - - F32 volume_out = 0.f; - volume_in = llclamp(volume_in, 0.f, 1.0f); - - if (volume_in <= 0.56f) - { - volume_out = sqrt(volume_in / (4.f * 0.56f)); - } - else - { - volume_out = sqrt((3.f * (volume_in - 0.56f) / (1.f - 0.56f) + 1.f) / 4.f); - } - - return volume_out; -} - -void LLSpeakerVolumeStorage::load() -{ - // load per-resident voice volume information - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); - - LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; - - LLSD settings_llsd; - llifstream file; - file.open(filename); - if (file.is_open()) - { - LLSDSerialize::fromXML(settings_llsd, file); - } - - for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); - iter != settings_llsd.endMap(); ++iter) - { - // Maintain compatibility with 1.23 non-linear saved volume levels - F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); - - storeSpeakerVolume(LLUUID(iter->first), volume); - } -} - -void LLSpeakerVolumeStorage::save() -{ - // If we quit from the login screen we will not have an SL account - // name. Don't try to save, otherwise we'll dump a file in - // C:\Program Files\SecondLife\ or similar. JC - std::string user_dir = gDirUtilp->getLindenUserDir(); - if (!user_dir.empty()) - { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); - LLSD settings_llsd; - - LL_INFOS("Voice") << "Saving stored speaker volumes to: " << filename << LL_ENDL; - - for(speaker_data_map_t::const_iterator iter = mSpeakersData.begin(); iter != mSpeakersData.end(); ++iter) - { - // Maintain compatibility with 1.23 non-linear saved volume levels - F32 volume = transformToLegacyVolume(iter->second); - - settings_llsd[iter->first.asString()] = volume; - } - - llofstream file; - file.open(filename); - LLSDSerialize::toPrettyXML(settings_llsd, file); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////// - -LLVoiceClient::LLVoiceClient() : - mState(stateDisabled), - mSessionTerminateRequested(false), - mRelogRequested(false), - mConnected(false), - mPump(NULL), - mSpatialJoiningNum(0), - - mTuningMode(false), - mTuningEnergy(0.0f), - mTuningMicVolume(0), - mTuningMicVolumeDirty(true), - mTuningSpeakerVolume(0), - mTuningSpeakerVolumeDirty(true), - mTuningExitState(stateDisabled), - - mAreaVoiceDisabled(false), - mAudioSession(NULL), - mAudioSessionChanged(false), - mNextAudioSession(NULL), - - mCurrentParcelLocalID(0), - mNumberOfAliases(0), - mCommandCookie(0), - mLoginRetryCount(0), - - mBuddyListMapPopulated(false), - mBlockRulesListReceived(false), - mAutoAcceptRulesListReceived(false), - mCaptureDeviceDirty(false), - mRenderDeviceDirty(false), - mSpatialCoordsDirty(false), - - mPTTDirty(true), - mPTT(true), - mUsePTT(true), - mPTTIsMiddleMouse(false), - mPTTKey(0), - mPTTIsToggle(false), - mUserPTTState(false), - mMuteMic(false), - mFriendsListDirty(true), - - mEarLocation(0), - mSpeakerVolumeDirty(true), - mSpeakerMuteDirty(true), - mMicVolume(0), - mMicVolumeDirty(true), - - mVoiceEnabled(false), - mWriteInProgress(false), - - mLipSyncEnabled(false) -{ - gVoiceClient = this; - - mAPIVersion = LLTrans::getString("NotConnected"); - - mSpeakerVolume = scale_speaker_volume(0); - -#if LL_DARWIN || LL_LINUX || LL_SOLARIS - // HACK: THIS DOES NOT BELONG HERE - // When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us. - // This should cause us to ignore SIGPIPE and handle the error through proper channels. - // This should really be set up elsewhere. Where should it go? - signal(SIGPIPE, SIG_IGN); - - // Since we're now launching the gateway with fork/exec instead of system(), we need to deal with zombie processes. - // Ignoring SIGCHLD should prevent zombies from being created. Alternately, we could use wait(), but I'd rather not do that. - signal(SIGCHLD, SIG_IGN); -#endif - - // set up state machine - setState(stateDisabled); - - gIdleCallbacks.addFunction(idle, this); -} - -//--------------------------------------------------- - -LLVoiceClient::~LLVoiceClient() -{ -} - -//---------------------------------------------- - -void LLVoiceClient::init(LLPumpIO *pump) -{ - // constructor will set up gVoiceClient - LLVoiceClient::getInstance()->mPump = pump; - LLVoiceClient::getInstance()->updateSettings(); -} - -void LLVoiceClient::terminate() -{ - if(gVoiceClient) - { -// gVoiceClient->leaveAudioSession(); - gVoiceClient->logout(); - // As of SDK version 4885, this should no longer be necessary. It will linger after the socket close if it needs to. - // ms_sleep(2000); - gVoiceClient->connectorShutdown(); - gVoiceClient->closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. - - // This will do unpleasant things on windows. -// killGateway(); - - // Don't do this anymore -- LLSingleton will take care of deleting the object. -// delete gVoiceClient; - - // Hint to other code not to access the voice client anymore. - gVoiceClient = NULL; - } -} - -//--------------------------------------------------- - -void LLVoiceClient::updateSettings() -{ - setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); - setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); - std::string keyString = gSavedSettings.getString("PushToTalkButton"); - setPTTKey(keyString); - setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); - setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); - - std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); - setCaptureDevice(inputDevice); - std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - setRenderDevice(outputDevice); - F32 mic_level = gSavedSettings.getF32("AudioLevelMic"); - setMicGain(mic_level); - setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); -} - -///////////////////////////// -// utility functions - -bool LLVoiceClient::writeString(const std::string &str) -{ - bool result = false; - if(mConnected) - { - apr_status_t err; - apr_size_t size = (apr_size_t)str.size(); - apr_size_t written = size; - - //MARK: Turn this on to log outgoing XML -// LL_DEBUGS("Voice") << "sending: " << str << LL_ENDL; - - // check return code - sockets will fail (broken, etc.) - err = apr_socket_send( - mSocket->getSocket(), - (const char*)str.data(), - &written); - - if(err == 0) - { - // Success. - result = true; - } - // TODO: handle partial writes (written is number of bytes written) - // Need to set socket to non-blocking before this will work. -// else if(APR_STATUS_IS_EAGAIN(err)) -// { -// // -// } - else - { - // Assume any socket error means something bad. For now, just close the socket. - char buf[MAX_STRING]; - LL_WARNS("Voice") << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL; - daemonDied(); - } - } - - return result; -} - - -///////////////////////////// -// session control messages -void LLVoiceClient::connectorCreate() -{ - std::ostringstream stream; - std::string logpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); - std::string loglevel = "0"; - - // Transition to stateConnectorStarted when the connector handle comes back. - setState(stateConnectorStarting); - - std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel"); - - if(savedLogLevel != "-1") - { - LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL; - loglevel = "10"; - } - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.Create.1\">" - << "<ClientName>V2 SDK</ClientName>" - << "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>" - << "<Mode>Normal</Mode>" - << "<Logging>" - << "<Folder>" << logpath << "</Folder>" - << "<FileNamePrefix>Connector</FileNamePrefix>" - << "<FileNameSuffix>.log</FileNameSuffix>" - << "<LogLevel>" << loglevel << "</LogLevel>" - << "</Logging>" - << "<Application>SecondLifeViewer.1</Application>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::connectorShutdown() -{ - setState(stateConnectorStopping); - - if(!mConnectorHandle.empty()) - { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.InitiateShutdown.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "</Request>" - << "\n\n\n"; - - mConnectorHandle.clear(); - - writeString(stream.str()); - } -} - -void LLVoiceClient::userAuthorized(const std::string& firstName, const std::string& lastName, const LLUUID &agentID) -{ - mAccountFirstName = firstName; - mAccountLastName = lastName; - - mAccountDisplayName = firstName; - mAccountDisplayName += " "; - mAccountDisplayName += lastName; - - LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL; - - sConnectingToAgni = LLViewerLogin::getInstance()->isInProductionGrid(); - - mAccountName = nameFromID(agentID); -} - -void LLVoiceClient::requestVoiceAccountProvision(S32 retries) -{ - if ( gAgent.getRegion() && mVoiceEnabled ) - { - std::string url = - gAgent.getRegion()->getCapability( - "ProvisionVoiceAccountRequest"); - - if ( url == "" ) return; - - LLHTTPClient::post( - url, - LLSD(), - new LLViewerVoiceAccountProvisionResponder(retries)); - } -} - -void LLVoiceClient::login( - const std::string& account_name, - const std::string& password, - const std::string& voice_sip_uri_hostname, - const std::string& voice_account_server_uri) -{ - mVoiceSIPURIHostName = voice_sip_uri_hostname; - mVoiceAccountServerURI = voice_account_server_uri; - - if(!mAccountHandle.empty()) - { - // Already logged in. - LL_WARNS("Voice") << "Called while already logged in." << LL_ENDL; - - // Don't process another login. - return; - } - else if ( account_name != mAccountName ) - { - //TODO: error? - LL_WARNS("Voice") << "Wrong account name! " << account_name - << " instead of " << mAccountName << LL_ENDL; - } - else - { - mAccountPassword = password; - } - - std::string debugSIPURIHostName = gSavedSettings.getString("VivoxDebugSIPURIHostName"); - - if( !debugSIPURIHostName.empty() ) - { - mVoiceSIPURIHostName = debugSIPURIHostName; - } - - if( mVoiceSIPURIHostName.empty() ) - { - // we have an empty account server name - // so we fall back to hardcoded defaults - - if(sConnectingToAgni) - { - // Use the release account server - mVoiceSIPURIHostName = "bhr.vivox.com"; - } - else - { - // Use the development account server - mVoiceSIPURIHostName = "bhd.vivox.com"; - } - } - - std::string debugAccountServerURI = gSavedSettings.getString("VivoxDebugVoiceAccountServerURI"); - - if( !debugAccountServerURI.empty() ) - { - mVoiceAccountServerURI = debugAccountServerURI; - } - - if( mVoiceAccountServerURI.empty() ) - { - // If the account server URI isn't specified, construct it from the SIP URI hostname - mVoiceAccountServerURI = "https://www." + mVoiceSIPURIHostName + "/api2/"; - } -} - -void LLVoiceClient::idle(void* user_data) -{ - LLVoiceClient* self = (LLVoiceClient*)user_data; - self->stateMachine(); -} - -std::string LLVoiceClient::state2string(LLVoiceClient::state inState) -{ - std::string result = "UNKNOWN"; - - // Prevent copy-paste errors when updating this list... -#define CASE(x) case x: result = #x; break - - switch(inState) - { - CASE(stateDisableCleanup); - CASE(stateDisabled); - CASE(stateStart); - CASE(stateDaemonLaunched); - CASE(stateConnecting); - CASE(stateConnected); - CASE(stateIdle); - CASE(stateMicTuningStart); - CASE(stateMicTuningRunning); - CASE(stateMicTuningStop); - CASE(stateConnectorStart); - CASE(stateConnectorStarting); - CASE(stateConnectorStarted); - CASE(stateLoginRetry); - CASE(stateLoginRetryWait); - CASE(stateNeedsLogin); - CASE(stateLoggingIn); - CASE(stateLoggedIn); - CASE(stateCreatingSessionGroup); - CASE(stateNoChannel); - CASE(stateJoiningSession); - CASE(stateSessionJoined); - CASE(stateRunning); - CASE(stateLeavingSession); - CASE(stateSessionTerminated); - CASE(stateLoggingOut); - CASE(stateLoggedOut); - CASE(stateConnectorStopping); - CASE(stateConnectorStopped); - CASE(stateConnectorFailed); - CASE(stateConnectorFailedWaiting); - CASE(stateLoginFailed); - CASE(stateLoginFailedWaiting); - CASE(stateJoinSessionFailed); - CASE(stateJoinSessionFailedWaiting); - CASE(stateJail); - } - -#undef CASE - - return result; -} - std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus) { std::string result = "UNKNOWN"; - // Prevent copy-paste errors when updating this list... + // Prevent copy-paste errors when updating this list... #define CASE(x) case x: result = #x; break - + switch(inStatus) { - CASE(STATUS_LOGIN_RETRY); - CASE(STATUS_LOGGED_IN); - CASE(STATUS_JOINING); - CASE(STATUS_JOINED); - CASE(STATUS_LEFT_CHANNEL); - CASE(STATUS_VOICE_DISABLED); - CASE(STATUS_VOICE_ENABLED); - CASE(BEGIN_ERROR_STATUS); - CASE(ERROR_CHANNEL_FULL); - CASE(ERROR_CHANNEL_LOCKED); - CASE(ERROR_NOT_AVAILABLE); - CASE(ERROR_UNKNOWN); - default: - break; + CASE(STATUS_LOGIN_RETRY); + CASE(STATUS_LOGGED_IN); + CASE(STATUS_JOINING); + CASE(STATUS_JOINED); + CASE(STATUS_LEFT_CHANNEL); + CASE(STATUS_VOICE_DISABLED); + CASE(BEGIN_ERROR_STATUS); + CASE(ERROR_CHANNEL_FULL); + CASE(ERROR_CHANNEL_LOCKED); + CASE(ERROR_NOT_AVAILABLE); + CASE(ERROR_UNKNOWN); + default: + break; } - + #undef CASE return result; } -void LLVoiceClient::setState(state inState) -{ - LL_DEBUGS("Voice") << "entering state " << state2string(inState) << LL_ENDL; - - mState = inState; -} -void LLVoiceClient::stateMachine() -{ - if(gDisconnected) - { - // The viewer has been disconnected from the sim. Disable voice. - setVoiceEnabled(false); - } - - if(mVoiceEnabled) - { - updatePosition(); - } - else if(mTuningMode) - { - // Tuning mode is special -- it needs to launch SLVoice even if voice is disabled. - } - else - { - if((getState() != stateDisabled) && (getState() != stateDisableCleanup)) - { - // User turned off voice support. Send the cleanup messages, close the socket, and reset. - if(!mConnected) - { - // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. - LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; - killGateway(); - } - - logout(); - connectorShutdown(); - - setState(stateDisableCleanup); - } - } - - // Check for parcel boundary crossing - { - LLViewerRegion *region = gAgent.getRegion(); - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - - if(region && parcel) - { - S32 parcelLocalID = parcel->getLocalID(); - std::string regionName = region->getName(); - std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); - -// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; - - // The region name starts out empty and gets filled in later. - // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. - // If either is empty, wait for the next time around. - if(!regionName.empty()) - { - if(!capURI.empty()) - { - if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) - { - // We have changed parcels. Initiate a parcel channel lookup. - mCurrentParcelLocalID = parcelLocalID; - mCurrentRegionName = regionName; - - parcelChanged(); - } - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; - } - } - } - } - - switch(getState()) - { - //MARK: stateDisableCleanup - case stateDisableCleanup: - // Clean up and reset everything. - closeSocket(); - deleteAllSessions(); - deleteAllBuddies(); - - mConnectorHandle.clear(); - mAccountHandle.clear(); - mAccountPassword.clear(); - mVoiceAccountServerURI.clear(); - - setState(stateDisabled); - break; - - //MARK: stateDisabled - case stateDisabled: - if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) - { - setState(stateStart); - } - break; - - //MARK: stateStart - case stateStart: - if(gSavedSettings.getBOOL("CmdLineDisableVoice")) - { - // Voice is locked out, we must not launch the vivox daemon. - setState(stateJail); - } - else if(!isGatewayRunning()) - { - if(true) - { - // Launch the voice daemon - - // *FIX:Mani - Using the executable dir instead - // of mAppRODataDir, the working directory from which the app - // is launched. - //std::string exe_path = gDirUtilp->getAppRODataDir(); - std::string exe_path = gDirUtilp->getExecutableDir(); - exe_path += gDirUtilp->getDirDelimiter(); -#if LL_WINDOWS - exe_path += "SLVoice.exe"; -#elif LL_DARWIN - exe_path += "../Resources/SLVoice"; -#else - exe_path += "SLVoice"; -#endif - // See if the vivox executable exists - llstat s; - if(!LLFile::stat(exe_path, &s)) - { - // vivox executable exists. Build the command line and launch the daemon. - // SLIM SDK: these arguments are no longer necessary. -// std::string args = " -p tcp -h -c"; - std::string args; - std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); - - if(loglevel.empty()) - { - loglevel = "-1"; // turn logging off completely - } - - args += " -ll "; - args += loglevel; - - LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; - -#if LL_WINDOWS - PROCESS_INFORMATION pinfo; - STARTUPINFOW sinfo; - memset(&sinfo, 0, sizeof(sinfo)); - - std::string exe_dir = gDirUtilp->getExecutableDir(); - - llutf16string exe_path16 = utf8str_to_utf16str(exe_path); - llutf16string exe_dir16 = utf8str_to_utf16str(exe_dir); - llutf16string args16 = utf8str_to_utf16str(args); - // Create a writeable copy to keep Windows happy. - U16 *argscpy_16 = new U16[args16.size() + 1]; - wcscpy_s(argscpy_16,args16.size()+1,args16.c_str()); - if(!CreateProcessW(exe_path16.c_str(), argscpy_16, NULL, NULL, FALSE, 0, NULL, exe_dir16.c_str(), &sinfo, &pinfo)) - { -// DWORD dwErr = GetLastError(); - } - else - { - // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on - // CloseHandle(pinfo.hProcess); // stops leaks - nothing else - sGatewayHandle = pinfo.hProcess; - CloseHandle(pinfo.hThread); // stops leaks - nothing else - } - - delete[] argscpy_16; -#else // LL_WINDOWS - // This should be the same for mac and linux - { - std::vector<std::string> arglist; - arglist.push_back(exe_path); - - // Split the argument string into separate strings for each argument - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> sep(" "); - tokenizer tokens(args, sep); - tokenizer::iterator token_iter; - - for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - arglist.push_back(*token_iter); - } - - // create an argv vector for the child process - char **fakeargv = new char*[arglist.size() + 1]; - int i; - for(i=0; i < arglist.size(); i++) - fakeargv[i] = const_cast<char*>(arglist[i].c_str()); - - fakeargv[i] = NULL; - - fflush(NULL); // flush all buffers before the child inherits them - pid_t id = vfork(); - if(id == 0) - { - // child - execv(exe_path.c_str(), fakeargv); - - // If we reach this point, the exec failed. - // Use _exit() instead of exit() per the vfork man page. - _exit(0); - } - - // parent - delete[] fakeargv; - sGatewayPID = id; - } -#endif // LL_WINDOWS - mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost").c_str(), gSavedSettings.getU32("VoicePort")); - } - else - { - LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; - } - } - else - { - // SLIM SDK: port changed from 44124 to 44125. - // We can connect to a client gateway running on another host. This is useful for testing. - // To do this, launch the gateway on a nearby host like this: - // vivox-gw.exe -p tcp -i 0.0.0.0:44125 - // and put that host's IP address here. - mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost"), gSavedSettings.getU32("VoicePort")); - } - - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); - - setState(stateDaemonLaunched); - - // Dirty the states we'll need to sync with the daemon when it comes up. - mPTTDirty = true; - mMicVolumeDirty = true; - mSpeakerVolumeDirty = true; - mSpeakerMuteDirty = true; - // These only need to be set if they're not default (i.e. empty string). - mCaptureDeviceDirty = !mCaptureDevice.empty(); - mRenderDeviceDirty = !mRenderDevice.empty(); - - mMainSessionGroupHandle.clear(); - } - break; - - //MARK: stateDaemonLaunched - case stateDaemonLaunched: - if(mUpdateTimer.hasExpired()) - { - LL_DEBUGS("Voice") << "Connecting to vivox daemon" << LL_ENDL; - - mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); - - if(!mSocket) - { - mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); - } - - mConnected = mSocket->blockingConnect(mDaemonHost); - if(mConnected) - { - setState(stateConnecting); - } - else - { - // If the connect failed, the socket may have been put into a bad state. Delete it. - closeSocket(); - } - } - break; - - //MARK: stateConnecting - case stateConnecting: - // Can't do this until we have the pump available. - if(mPump) - { - // MBW -- Note to self: pumps and pipes examples in - // indra/test/io.cpp - // indra/test/llpipeutil.{cpp|h} - - // Attach the pumps and pipes - - LLPumpIO::chain_t readChain; - - readChain.push_back(LLIOPipe::ptr_t(new LLIOSocketReader(mSocket))); - readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser())); - - mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS); - - setState(stateConnected); - } - - break; - - //MARK: stateConnected - case stateConnected: - // Initial devices query - getCaptureDevicesSendMessage(); - getRenderDevicesSendMessage(); - - mLoginRetryCount = 0; - - setState(stateIdle); - break; - - //MARK: stateIdle - case stateIdle: - // This is the idle state where we're connected to the daemon but haven't set up a connector yet. - if(mTuningMode) - { - mTuningExitState = stateIdle; - setState(stateMicTuningStart); - } - else if(!mVoiceEnabled) - { - // We never started up the connector. This will shut down the daemon. - setState(stateConnectorStopped); - } - else if(!mAccountName.empty()) - { - LLViewerRegion *region = gAgent.getRegion(); - - if(region) - { - if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) - { - if ( mAccountPassword.empty() ) - { - requestVoiceAccountProvision(); - } - setState(stateConnectorStart); - } - else - { - LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; - } - } - } - break; - - //MARK: stateMicTuningStart - case stateMicTuningStart: - if(mUpdateTimer.hasExpired()) - { - if(mCaptureDeviceDirty || mRenderDeviceDirty) - { - // These can't be changed while in tuning mode. Set them before starting. - std::ostringstream stream; - - buildSetCaptureDevice(stream); - buildSetRenderDevice(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - - // This will come around again in the same state and start the capture, after the timer expires. - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - } - else - { - // duration parameter is currently unused, per Mike S. - tuningCaptureStartSendMessage(10000); - - setState(stateMicTuningRunning); - } - } - - break; - - //MARK: stateMicTuningRunning - case stateMicTuningRunning: - if(!mTuningMode || mCaptureDeviceDirty || mRenderDeviceDirty) - { - // All of these conditions make us leave tuning mode. - setState(stateMicTuningStop); - } - else - { - // process mic/speaker volume changes - if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) - { - std::ostringstream stream; - - if(mTuningMicVolumeDirty) - { - LL_INFOS("Voice") << "setting tuning mic level to " << mTuningMicVolume << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetMicLevel.1\">" - << "<Level>" << mTuningMicVolume << "</Level>" - << "</Request>\n\n\n"; - } - - if(mTuningSpeakerVolumeDirty) - { - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">" - << "<Level>" << mTuningSpeakerVolume << "</Level>" - << "</Request>\n\n\n"; - } - - mTuningMicVolumeDirty = false; - mTuningSpeakerVolumeDirty = false; - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - } - } - break; - - //MARK: stateMicTuningStop - case stateMicTuningStop: - { - // transition out of mic tuning - tuningCaptureStopSendMessage(); - - setState(mTuningExitState); - - // if we exited just to change devices, this will keep us from re-entering too fast. - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - - } - break; - - //MARK: stateConnectorStart - case stateConnectorStart: - if(!mVoiceEnabled) - { - // We were never logged in. This will shut down the connector. - setState(stateLoggedOut); - } - else if(!mVoiceAccountServerURI.empty()) - { - connectorCreate(); - } - break; - - //MARK: stateConnectorStarting - case stateConnectorStarting: // waiting for connector handle - // connectorCreateResponse() will transition from here to stateConnectorStarted. - break; - - //MARK: stateConnectorStarted - case stateConnectorStarted: // connector handle received - if(!mVoiceEnabled) - { - // We were never logged in. This will shut down the connector. - setState(stateLoggedOut); - } - else - { - // The connector is started. Send a login message. - setState(stateNeedsLogin); - } - break; - - //MARK: stateLoginRetry - case stateLoginRetry: - if(mLoginRetryCount == 0) - { - // First retry -- display a message to the user - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGIN_RETRY); - } - - mLoginRetryCount++; - - if(mLoginRetryCount > MAX_LOGIN_RETRIES) - { - LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; - setState(stateLoginFailed); - } - else - { - LL_INFOS("Voice") << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << LL_ENDL; - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(LOGIN_RETRY_SECONDS); - setState(stateLoginRetryWait); - } - break; - - //MARK: stateLoginRetryWait - case stateLoginRetryWait: - if(mUpdateTimer.hasExpired()) - { - setState(stateNeedsLogin); - } - break; - - //MARK: stateNeedsLogin - case stateNeedsLogin: - if(!mAccountPassword.empty()) - { - setState(stateLoggingIn); - loginSendMessage(); - } - break; - - //MARK: stateLoggingIn - case stateLoggingIn: // waiting for account handle - // loginResponse() will transition from here to stateLoggedIn. - break; - - //MARK: stateLoggedIn - case stateLoggedIn: // account handle received - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); - - // request the current set of block rules (we'll need them when updating the friends list) - accountListBlockRulesSendMessage(); - - // request the current set of auto-accept rules - accountListAutoAcceptRulesSendMessage(); - - // Set up the mute list observer if it hasn't been set up already. - if((!sMuteListListener_listening)) - { - LLMuteList::getInstance()->addObserver(&mutelist_listener); - sMuteListListener_listening = true; - } - - // Set up the friends list observer if it hasn't been set up already. - if(friendslist_listener == NULL) - { - friendslist_listener = new LLVoiceClientFriendsObserver; - LLAvatarTracker::instance().addObserver(friendslist_listener); - } - - // Set the initial state of mic mute, local speaker volume, etc. - { - std::ostringstream stream; - - buildLocalAudioUpdates(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - } - -#if USE_SESSION_GROUPS - // create the main session group - sessionGroupCreateSendMessage(); - - setState(stateCreatingSessionGroup); -#else - // Not using session groups -- skip the stateCreatingSessionGroup state. - setState(stateNoChannel); - - // Initial kick-off of channel lookup logic - parcelChanged(); -#endif - break; - - //MARK: stateCreatingSessionGroup - case stateCreatingSessionGroup: - if(mSessionTerminateRequested || !mVoiceEnabled) - { - // TODO: Question: is this the right way out of this state - setState(stateSessionTerminated); - } - else if(!mMainSessionGroupHandle.empty()) - { - setState(stateNoChannel); - - // Start looped recording (needed for "panic button" anti-griefing tool) - recordingLoopStart(); - // Initial kick-off of channel lookup logic - parcelChanged(); - } - break; - - //MARK: stateNoChannel - case stateNoChannel: - - mSpatialJoiningNum = 0; - // Do this here as well as inside sendPositionalUpdate(). - // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. - sendFriendsListUpdates(); - - if(mSessionTerminateRequested || !mVoiceEnabled) - { - // TODO: Question: Is this the right way out of this state? - setState(stateSessionTerminated); - } - else if(mTuningMode) - { - mTuningExitState = stateNoChannel; - setState(stateMicTuningStart); - } - else if(sessionNeedsRelog(mNextAudioSession)) - { - requestRelog(); - setState(stateSessionTerminated); - } - else if(mNextAudioSession) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = mNextAudioSession; - if(!mAudioSession->mReconnect) - { - mNextAudioSession = NULL; - } - - // The old session may now need to be deleted. - reapSession(oldSession); - - if(!mAudioSession->mHandle.empty()) - { - // Connect to a session by session handle - - sessionMediaConnectSendMessage(mAudioSession); - } - else - { - // Connect to a session by URI - sessionCreateSendMessage(mAudioSession, true, false); - } - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); - setState(stateJoiningSession); - } - else if(!mSpatialSessionURI.empty()) - { - // If we're not headed elsewhere and have a spatial URI, return to spatial. - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } - break; - - //MARK: stateJoiningSession - case stateJoiningSession: // waiting for session handle - - // If this is true we have problem with connection to voice server (EXT-4313). - // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. - if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) - { - // Notify observers to let them know there is problem with voice - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; - } - // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for - // example for p2p many times while waiting for response, so it can't be used to detect errors - if(mAudioSession && mAudioSession->mIsSpatial) - { - mSpatialJoiningNum++; - } - - // joinedAudioSession() will transition from here to stateSessionJoined. - if(!mVoiceEnabled) - { - // User bailed out during connect -- jump straight to teardown. - setState(stateSessionTerminated); - } - else if(mSessionTerminateRequested) - { - if(mAudioSession && !mAudioSession->mHandle.empty()) - { - // Only allow direct exits from this state in p2p calls (for cancelling an invite). - // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. - if(mAudioSession->mIsP2P) - { - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateSessionTerminated); - } - } - } - break; - - //MARK: stateSessionJoined - case stateSessionJoined: // session handle received - - mSpatialJoiningNum = 0; - // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 - // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. - // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. - // This is a cheap way to make sure both have happened before proceeding. - if(mAudioSession && mAudioSession->mVoiceEnabled) - { - // Dirty state that may need to be sync'ed with the daemon. - mPTTDirty = true; - mSpeakerVolumeDirty = true; - mSpatialCoordsDirty = true; - - setState(stateRunning); - - // Start the throttle timer - mUpdateTimer.start(); - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - - // Events that need to happen when a session is joined could go here. - // Maybe send initial spatial data? - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); - - } - else if(!mVoiceEnabled) - { - // User bailed out during connect -- jump straight to teardown. - setState(stateSessionTerminated); - } - else if(mSessionTerminateRequested) - { - // Only allow direct exits from this state in p2p calls (for cancelling an invite). - // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. - if(mAudioSession && mAudioSession->mIsP2P) - { - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateSessionTerminated); - } - } - break; - - //MARK: stateRunning - case stateRunning: // steady state - // Disabling voice or disconnect requested. - if(!mVoiceEnabled || mSessionTerminateRequested) - { - leaveAudioSession(); - } - else - { - - // Figure out whether the PTT state needs to change - { - bool newPTT; - if(mUsePTT) - { - // If configured to use PTT, track the user state. - newPTT = mUserPTTState; - } - else - { - // If not configured to use PTT, it should always be true (otherwise the user will be unable to speak). - newPTT = true; - } - - if(mMuteMic) - { - // This always overrides any other PTT setting. - newPTT = false; - } - - // Dirty if state changed. - if(newPTT != mPTT) - { - mPTT = newPTT; - mPTTDirty = true; - } - } - - if(!inSpatialChannel()) - { - // When in a non-spatial channel, never send positional updates. - mSpatialCoordsDirty = false; - } - else - { - // Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position) - enforceTether(); - } - - // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often - // -- the user can only click so fast) or every 10hz, whichever is sooner. - // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. - if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired()) - { - mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); - sendPositionalUpdate(); - } - } - break; - - //MARK: stateLeavingSession - case stateLeavingSession: // waiting for terminate session response - // The handler for the Session.Terminate response will transition from here to stateSessionTerminated. - break; - - //MARK: stateSessionTerminated - case stateSessionTerminated: - - // Must do this first, since it uses mAudioSession. - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); - - if(mAudioSession) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = NULL; - // We just notified status observers about this change. Don't do it again. - mAudioSessionChanged = false; - - // The old session may now need to be deleted. - reapSession(oldSession); - } - else - { - LL_WARNS("Voice") << "stateSessionTerminated with NULL mAudioSession" << LL_ENDL; - } - - // Always reset the terminate request flag when we get here. - mSessionTerminateRequested = false; - - if(mVoiceEnabled && !mRelogRequested) - { - // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). - setState(stateNoChannel); - } - else - { - // Shutting down voice, continue with disconnecting. - logout(); - - // The state machine will take it from here - mRelogRequested = false; - } - - break; - - //MARK: stateLoggingOut - case stateLoggingOut: // waiting for logout response - // The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut. - break; - - //MARK: stateLoggedOut - case stateLoggedOut: // logout response received - - // Once we're logged out, all these things are invalid. - mAccountHandle.clear(); - deleteAllSessions(); - deleteAllBuddies(); - - if(mVoiceEnabled && !mRelogRequested) - { - // User was logged out, but wants to be logged in. Send a new login request. - setState(stateNeedsLogin); - } - else - { - // shut down the connector - connectorShutdown(); - } - break; - - //MARK: stateConnectorStopping - case stateConnectorStopping: // waiting for connector stop - // The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped. - break; - - //MARK: stateConnectorStopped - case stateConnectorStopped: // connector stop received - setState(stateDisableCleanup); - break; - - //MARK: stateConnectorFailed - case stateConnectorFailed: - setState(stateConnectorFailedWaiting); - break; - //MARK: stateConnectorFailedWaiting - case stateConnectorFailedWaiting: - if(!mVoiceEnabled) - { - setState(stateDisableCleanup); - } - break; - - //MARK: stateLoginFailed - case stateLoginFailed: - setState(stateLoginFailedWaiting); - break; - //MARK: stateLoginFailedWaiting - case stateLoginFailedWaiting: - if(!mVoiceEnabled) - { - setState(stateDisableCleanup); - } - break; - - //MARK: stateJoinSessionFailed - case stateJoinSessionFailed: - // Transition to error state. Send out any notifications here. - if(mAudioSession) - { - LL_WARNS("Voice") << "stateJoinSessionFailed: (" << mAudioSession->mErrorStatusCode << "): " << mAudioSession->mErrorStatusString << LL_ENDL; - } - else - { - LL_WARNS("Voice") << "stateJoinSessionFailed with no current session" << LL_ENDL; - } - - notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN); - setState(stateJoinSessionFailedWaiting); - break; - - //MARK: stateJoinSessionFailedWaiting - case stateJoinSessionFailedWaiting: - // Joining a channel failed, either due to a failed channel name -> sip url lookup or an error from the join message. - // Region crossings may leave this state and try the join again. - if(mSessionTerminateRequested) - { - setState(stateSessionTerminated); - } - break; - - //MARK: stateJail - case stateJail: - // We have given up. Do nothing. - break; - - } - - if(mAudioSession && mAudioSession->mParticipantsChanged) - { - mAudioSession->mParticipantsChanged = false; - mAudioSessionChanged = true; - } - - if(mAudioSessionChanged) - { - mAudioSessionChanged = false; - notifyParticipantObservers(); - } -} - -void LLVoiceClient::closeSocket(void) -{ - mSocket.reset(); - mConnected = false; -} - -void LLVoiceClient::loginSendMessage() -{ - std::ostringstream stream; - - bool autoPostCrashDumps = gSavedSettings.getBOOL("VivoxAutoPostCrashDumps"); - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Login.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<AccountName>" << mAccountName << "</AccountName>" - << "<AccountPassword>" << mAccountPassword << "</AccountPassword>" - << "<AudioSessionAnswerMode>VerifyAnswer</AudioSessionAnswerMode>" - << "<EnableBuddiesAndPresence>true</EnableBuddiesAndPresence>" - << "<BuddyManagementMode>Application</BuddyManagementMode>" - << "<ParticipantPropertyFrequency>5</ParticipantPropertyFrequency>" - << (autoPostCrashDumps?"<AutopostCrashDumps>true</AutopostCrashDumps>":"") - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::logout() -{ - // Ensure that we'll re-request provisioning before logging in again - mAccountPassword.clear(); - mVoiceAccountServerURI.clear(); - - setState(stateLoggingOut); - logoutSendMessage(); -} - -void LLVoiceClient::logoutSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Logout.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - mAccountHandle.clear(); - - writeString(stream.str()); - } -} - -void LLVoiceClient::accountListBlockRulesSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "requesting block rules" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListBlockRules.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::accountListAutoAcceptRulesSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "requesting auto-accept rules" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListAutoAcceptRules.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::sessionGroupCreateSendMessage() -{ - if(!mAccountHandle.empty()) - { - std::ostringstream stream; - - LL_DEBUGS("Voice") << "creating session group" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Create.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<Type>Normal</Type>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) -{ - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - - session->mCreateInProgress = true; - if(startAudio) - { - session->mMediaConnectInProgress = true; - } - - std::ostringstream stream; - stream - << "<Request requestId=\"" << session->mSIPURI << "\" action=\"Session.Create.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<URI>" << session->mSIPURI << "</URI>"; - - static const std::string allowed_chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789" - "-._~"; - - if(!session->mHash.empty()) - { - stream - << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" - << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; - } - - stream - << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" - << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" - << "<Name>" << mChannelName << "</Name>" - << "</Request>\n\n\n"; - writeString(stream.str()); -} - -void LLVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) -{ - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - - session->mCreateInProgress = true; - if(startAudio) - { - session->mMediaConnectInProgress = true; - } - - std::string password; - if(!session->mHash.empty()) - { - static const std::string allowed_chars = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789" - "-._~" - ; - password = LLURI::escape(session->mHash, allowed_chars); - } - - std::ostringstream stream; - stream - << "<Request requestId=\"" << session->mSIPURI << "\" action=\"SessionGroup.AddSession.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<URI>" << session->mSIPURI << "</URI>" - << "<Name>" << mChannelName << "</Name>" - << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" - << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" - << "<Password>" << password << "</Password>" - << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" - << "</Request>\n\n\n" - ; - - writeString(stream.str()); -} +/////////////////////////////////////////////////////////////////////////////////////////////// -void LLVoiceClient::sessionMediaConnectSendMessage(sessionState *session) +LLVoiceClient::LLVoiceClient() { - LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; - - session->mMediaConnectInProgress = true; - - std::ostringstream stream; - - stream - << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<Media>Audio</Media>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + mVoiceModule = NULL; } -void LLVoiceClient::sessionTextConnectSendMessage(sessionState *session) -{ - LL_DEBUGS("Voice") << "connecting text to session handle: " << session->mHandle << LL_ENDL; - - std::ostringstream stream; - - stream - << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.TextConnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} +//--------------------------------------------------- +// Basic setup/shutdown -void LLVoiceClient::sessionTerminate() +LLVoiceClient::~LLVoiceClient() { - mSessionTerminateRequested = true; } -void LLVoiceClient::requestRelog() +void LLVoiceClient::init(LLPumpIO *pump) { - mSessionTerminateRequested = true; - mRelogRequested = true; + // Initialize all of the voice modules + m_servicePump = pump; } - -void LLVoiceClient::leaveAudioSession() +void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) { - if(mAudioSession) + // In the future, we should change this to allow voice module registration + // with a table lookup of sorts. + std::string voice_server = gSavedSettings.getString("VoiceServerType"); + LL_DEBUGS("Voice") << "voice server type " << voice_server << LL_ENDL; + if(voice_server == "vivox") { - LL_DEBUGS("Voice") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; - - switch(getState()) - { - case stateNoChannel: - // In this case, we want to pretend the join failed so our state machine doesn't get stuck. - // Skip the join failed transition state so we don't send out error notifications. - setState(stateJoinSessionFailedWaiting); - break; - case stateJoiningSession: - case stateSessionJoined: - case stateRunning: - if(!mAudioSession->mHandle.empty()) - { - -#if RECORD_EVERYTHING - // HACK: for testing only - // Save looped recording - std::string savepath("/tmp/vivoxrecording"); - { - time_t now = time(NULL); - const size_t BUF_SIZE = 64; - char time_str[BUF_SIZE]; /* Flawfinder: ignore */ - - strftime(time_str, BUF_SIZE, "%Y-%m-%dT%H:%M:%SZ", gmtime(&now)); - savepath += time_str; - } - recordingLoopSave(savepath); -#endif - - sessionMediaDisconnectSendMessage(mAudioSession); - setState(stateLeavingSession); - } - else - { - LL_WARNS("Voice") << "called with no session handle" << LL_ENDL; - setState(stateSessionTerminated); - } - break; - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - setState(stateSessionTerminated); - break; - - default: - LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; - break; - } + mVoiceModule = (LLVoiceModuleInterface *)LLVivoxVoiceClient::getInstance(); } else { - LL_WARNS("Voice") << "called with no active session" << LL_ENDL; - setState(stateSessionTerminated); + mVoiceModule = NULL; + return; } + mVoiceModule->init(m_servicePump); + mVoiceModule->userAuthorized(user_id, agentID); } -void LLVoiceClient::sessionTerminateSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::sessionGroupTerminateSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} -void LLVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<Media>Audio</Media>" - << "</Request>\n\n\n"; - - writeString(stream.str()); - -} - -void LLVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) -{ - std::ostringstream stream; - - LL_DEBUGS("Voice") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" - << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::getCaptureDevicesSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetCaptureDevices.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::getRenderDevicesSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetRenderDevices.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::clearCaptureDevices() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - mCaptureDevices.clear(); -} - -void LLVoiceClient::addCaptureDevice(const std::string& name) -{ - LL_DEBUGS("Voice") << name << LL_ENDL; - - mCaptureDevices.push_back(name); -} - -LLVoiceClient::deviceList *LLVoiceClient::getCaptureDevices() +void LLVoiceClient::terminate() { - return &mCaptureDevices; + if (mVoiceModule) mVoiceModule->terminate(); + mVoiceModule = NULL; } -void LLVoiceClient::setCaptureDevice(const std::string& name) +const LLVoiceVersionInfo LLVoiceClient::getVersion() { - if(name == "Default") + if (mVoiceModule) { - if(!mCaptureDevice.empty()) - { - mCaptureDevice.clear(); - mCaptureDeviceDirty = true; - } + return mVoiceModule->getVersion(); } else { - if(mCaptureDevice != name) - { - mCaptureDevice = name; - mCaptureDeviceDirty = true; - } + LLVoiceVersionInfo result; + result.serverVersion = std::string(); + result.serverType = std::string(); + return result; } } -void LLVoiceClient::clearRenderDevices() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - mRenderDevices.clear(); -} - -void LLVoiceClient::addRenderDevice(const std::string& name) +void LLVoiceClient::updateSettings() { - LL_DEBUGS("Voice") << name << LL_ENDL; - mRenderDevices.push_back(name); + if (mVoiceModule) mVoiceModule->updateSettings(); } -LLVoiceClient::deviceList *LLVoiceClient::getRenderDevices() -{ - return &mRenderDevices; -} - -void LLVoiceClient::setRenderDevice(const std::string& name) -{ - if(name == "Default") - { - if(!mRenderDevice.empty()) - { - mRenderDevice.clear(); - mRenderDeviceDirty = true; - } - } - else - { - if(mRenderDevice != name) - { - mRenderDevice = name; - mRenderDeviceDirty = true; - } - } - -} +//-------------------------------------------------- +// tuning void LLVoiceClient::tuningStart() { - mTuningMode = true; - if(getState() >= stateNoChannel) - { - sessionTerminate(); - } + if (mVoiceModule) mVoiceModule->tuningStart(); } void LLVoiceClient::tuningStop() { - mTuningMode = false; + if (mVoiceModule) mVoiceModule->tuningStop(); } bool LLVoiceClient::inTuningMode() { - bool result = false; - switch(getState()) - { - case stateMicTuningRunning: - result = true; - break; - default: - break; - } - return result; -} - -void LLVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool loop) -{ - mTuningAudioFile = name; - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStart.1\">" - << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" - << "<Loop>" << (loop?"1":"0") << "</Loop>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningRenderStopSendMessage() -{ - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" - << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningCaptureStartSendMessage(int duration) -{ - LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; - - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStart.1\">" - << "<Duration>" << duration << "</Duration>" - << "</Request>\n\n\n"; - - writeString(stream.str()); -} - -void LLVoiceClient::tuningCaptureStopSendMessage() -{ - LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL; - - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" - << "</Request>\n\n\n"; - - writeString(stream.str()); - - mTuningEnergy = 0.0f; -} - -void LLVoiceClient::tuningSetMicVolume(float volume) -{ - int scaled_volume = scale_mic_volume(volume); - - if(scaled_volume != mTuningMicVolume) - { - mTuningMicVolume = scaled_volume; - mTuningMicVolumeDirty = true; - } -} - -void LLVoiceClient::tuningSetSpeakerVolume(float volume) -{ - int scaled_volume = scale_speaker_volume(volume); - - if(scaled_volume != mTuningSpeakerVolume) + if (mVoiceModule) { - mTuningSpeakerVolume = scaled_volume; - mTuningSpeakerVolumeDirty = true; - } -} - -float LLVoiceClient::tuningGetEnergy(void) -{ - return mTuningEnergy; -} - -bool LLVoiceClient::deviceSettingsAvailable() -{ - bool result = true; - - if(!mConnected) - result = false; - - if(mRenderDevices.empty()) - result = false; - - return result; -} - -void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) -{ - if(clearCurrentList) - { - clearCaptureDevices(); - clearRenderDevices(); - } - getCaptureDevicesSendMessage(); - getRenderDevicesSendMessage(); -} - -void LLVoiceClient::daemonDied() -{ - // The daemon died, so the connection is gone. Reset everything and start over. - LL_WARNS("Voice") << "Connection to vivox daemon lost. Resetting state."<< LL_ENDL; - - // Try to relaunch the daemon - setState(stateDisableCleanup); -} - -void LLVoiceClient::giveUp() -{ - // All has failed. Clean up and stop trying. - closeSocket(); - deleteAllSessions(); - deleteAllBuddies(); - - setState(stateJail); -} - -static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) -{ - F32 nat[3], nup[3], nl[3], nvel[3]; // the new at, up, left vectors and the new position and velocity - F64 npos[3]; - - // The original XML command was sent like this: - /* - << "<Position>" - << "<X>" << pos[VX] << "</X>" - << "<Y>" << pos[VZ] << "</Y>" - << "<Z>" << pos[VY] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << mAvatarVelocity[VX] << "</X>" - << "<Y>" << mAvatarVelocity[VZ] << "</Y>" - << "<Z>" << mAvatarVelocity[VY] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << l.mV[VX] << "</X>" - << "<Y>" << u.mV[VX] << "</Y>" - << "<Z>" << a.mV[VX] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << l.mV[VZ] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VY] << "</X>" - << "<Y>" << u.mV [VZ] << "</Y>" - << "<Z>" << a.mV [VY] << "</Z>" - << "</LeftOrientation>"; - */ - -#if 1 - // This was the original transform done when building the XML command - nat[0] = left.mV[VX]; - nat[1] = up.mV[VX]; - nat[2] = at.mV[VX]; - - nup[0] = left.mV[VZ]; - nup[1] = up.mV[VY]; - nup[2] = at.mV[VZ]; - - nl[0] = left.mV[VY]; - nl[1] = up.mV[VZ]; - nl[2] = at.mV[VY]; - - npos[0] = pos.mdV[VX]; - npos[1] = pos.mdV[VZ]; - npos[2] = pos.mdV[VY]; - - nvel[0] = vel.mV[VX]; - nvel[1] = vel.mV[VZ]; - nvel[2] = vel.mV[VY]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; + return mVoiceModule->inTuningMode(); } - - // This was the original transform done in the SDK - nat[0] = at.mV[2]; - nat[1] = 0; // y component of at vector is always 0, this was up[2] - nat[2] = -1 * left.mV[2]; - - // We override whatever the application gives us - nup[0] = 0; // x component of up vector is always 0 - nup[1] = 1; // y component of up vector is always 1 - nup[2] = 0; // z component of up vector is always 0 - - nl[0] = at.mV[0]; - nl[1] = 0; // y component of left vector is always zero, this was up[0] - nl[2] = -1 * left.mV[0]; - - npos[2] = pos.mdV[2] * -1.0; - npos[1] = pos.mdV[1]; - npos[0] = pos.mdV[0]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; - } -#else - // This is the compose of the two transforms (at least, that's what I'm trying for) - nat[0] = at.mV[VX]; - nat[1] = 0; // y component of at vector is always 0, this was up[2] - nat[2] = -1 * up.mV[VZ]; - - // We override whatever the application gives us - nup[0] = 0; // x component of up vector is always 0 - nup[1] = 1; // y component of up vector is always 1 - nup[2] = 0; // z component of up vector is always 0 - - nl[0] = left.mV[VX]; - nl[1] = 0; // y component of left vector is always zero, this was up[0] - nl[2] = -1 * left.mV[VY]; - - npos[0] = pos.mdV[VX]; - npos[1] = pos.mdV[VZ]; - npos[2] = pos.mdV[VY] * -1.0; - - nvel[0] = vel.mV[VX]; - nvel[1] = vel.mV[VZ]; - nvel[2] = vel.mV[VY]; - - for(int i=0;i<3;++i) { - at.mV[i] = nat[i]; - up.mV[i] = nup[i]; - left.mV[i] = nl[i]; - pos.mdV[i] = npos[i]; - } - -#endif -} - -void LLVoiceClient::sendPositionalUpdate(void) -{ - std::ostringstream stream; - - if(mSpatialCoordsDirty) - { - LLVector3 l, u, a, vel; - LLVector3d pos; - - mSpatialCoordsDirty = false; - - // Always send both speaker and listener positions together. - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Set3DPosition.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>"; - - stream << "<SpeakerPosition>"; - -// LL_DEBUGS("Voice") << "Sending speaker position " << mAvatarPosition << LL_ENDL; - l = mAvatarRot.getLeftRow(); - u = mAvatarRot.getUpRow(); - a = mAvatarRot.getFwdRow(); - pos = mAvatarPosition; - vel = mAvatarVelocity; - - // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. - // The old transform is replicated by this function. - oldSDKTransform(l, u, a, pos, vel); - - stream - << "<Position>" - << "<X>" << pos.mdV[VX] << "</X>" - << "<Y>" << pos.mdV[VY] << "</Y>" - << "<Z>" << pos.mdV[VZ] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << vel.mV[VX] << "</X>" - << "<Y>" << vel.mV[VY] << "</Y>" - << "<Z>" << vel.mV[VZ] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << a.mV[VX] << "</X>" - << "<Y>" << a.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << u.mV[VX] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << u.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VX] << "</X>" - << "<Y>" << l.mV [VY] << "</Y>" - << "<Z>" << l.mV [VZ] << "</Z>" - << "</LeftOrientation>"; - - stream << "</SpeakerPosition>"; - - stream << "<ListenerPosition>"; - - LLVector3d earPosition; - LLVector3 earVelocity; - LLMatrix3 earRot; - - switch(mEarLocation) - { - case earLocCamera: - default: - earPosition = mCameraPosition; - earVelocity = mCameraVelocity; - earRot = mCameraRot; - break; - - case earLocAvatar: - earPosition = mAvatarPosition; - earVelocity = mAvatarVelocity; - earRot = mAvatarRot; - break; - - case earLocMixed: - earPosition = mAvatarPosition; - earVelocity = mAvatarVelocity; - earRot = mCameraRot; - break; - } - - l = earRot.getLeftRow(); - u = earRot.getUpRow(); - a = earRot.getFwdRow(); - pos = earPosition; - vel = earVelocity; - -// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; - - oldSDKTransform(l, u, a, pos, vel); - - stream - << "<Position>" - << "<X>" << pos.mdV[VX] << "</X>" - << "<Y>" << pos.mdV[VY] << "</Y>" - << "<Z>" << pos.mdV[VZ] << "</Z>" - << "</Position>" - << "<Velocity>" - << "<X>" << vel.mV[VX] << "</X>" - << "<Y>" << vel.mV[VY] << "</Y>" - << "<Z>" << vel.mV[VZ] << "</Z>" - << "</Velocity>" - << "<AtOrientation>" - << "<X>" << a.mV[VX] << "</X>" - << "<Y>" << a.mV[VY] << "</Y>" - << "<Z>" << a.mV[VZ] << "</Z>" - << "</AtOrientation>" - << "<UpOrientation>" - << "<X>" << u.mV[VX] << "</X>" - << "<Y>" << u.mV[VY] << "</Y>" - << "<Z>" << u.mV[VZ] << "</Z>" - << "</UpOrientation>" - << "<LeftOrientation>" - << "<X>" << l.mV [VX] << "</X>" - << "<Y>" << l.mV [VY] << "</Y>" - << "<Z>" << l.mV [VZ] << "</Z>" - << "</LeftOrientation>"; - - - stream << "</ListenerPosition>"; - - stream << "</Request>\n\n\n"; - } - - if(mAudioSession && (mAudioSession->mVolumeDirty || mAudioSession->mMuteDirty)) - { - participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); - - mAudioSession->mVolumeDirty = false; - mAudioSession->mMuteDirty = false; - - for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) - { - participantState *p = iter->second; - - if(p->mVolumeDirty) - { - // Can't set volume/mute for yourself - if(!p->mIsSelf) - { - // scale from the range 0.0-1.0 to vivox volume in the range 0-100 - S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); - - bool mute = p->mOnMuteList; - - if(mute) - { - // SetParticipantMuteForMe doesn't work in p2p sessions. - // If we want the user to be muted, set their volume to 0 as well. - // This isn't perfect, but it will at least reduce their volume to a minimum. - volume = 0; - - // Mark the current volume level as set to prevent incoming events - // changing it to 0, so that we can return to it when unmuting. - p->mVolumeSet = true; - } - - if(volume == 0) - { - mute = true; - } - - LL_DEBUGS("Voice") << "Setting volume/mute for avatar " << p->mAvatarID << " to " << volume << (mute?"/true":"/false") << LL_ENDL; - - // SLIM SDK: Send both volume and mute commands. - - // Send a "volume for me" command for the user. - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantVolumeForMe.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" - << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" - << "<Volume>" << volume << "</Volume>" - << "</Request>\n\n\n"; - - if(!mAudioSession->mIsP2P) - { - // Send a "mute for me" command for the user - // Doesn't work in P2P sessions - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantMuteForMe.1\">" - << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" - << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" - << "<Mute>" << (mute?"1":"0") << "</Mute>" - << "<Scope>Audio</Scope>" - << "</Request>\n\n\n"; - } - } - - p->mVolumeDirty = false; - } - } - } - - buildLocalAudioUpdates(stream); - - if(!stream.str().empty()) - { - writeString(stream.str()); - } - - // Friends list updates can be huge, especially on the first voice login of an account with lots of friends. - // Batching them all together can choke SLVoice, so send them in separate writes. - sendFriendsListUpdates(); -} - -void LLVoiceClient::buildSetCaptureDevice(std::ostringstream &stream) -{ - if(mCaptureDeviceDirty) + else { - LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" - << "<CaptureDeviceSpecifier>" << mCaptureDevice << "</CaptureDeviceSpecifier>" - << "</Request>" - << "\n\n\n"; - - mCaptureDeviceDirty = false; + return false; } } -void LLVoiceClient::buildSetRenderDevice(std::ostringstream &stream) +void LLVoiceClient::tuningSetMicVolume(float volume) { - if(mRenderDeviceDirty) - { - LL_DEBUGS("Voice") << "Setting output device = \"" << mRenderDevice << "\"" << LL_ENDL; - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetRenderDevice.1\">" - << "<RenderDeviceSpecifier>" << mRenderDevice << "</RenderDeviceSpecifier>" - << "</Request>" - << "\n\n\n"; - mRenderDeviceDirty = false; - } + if (mVoiceModule) mVoiceModule->tuningSetMicVolume(volume); } -void LLVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream) +void LLVoiceClient::tuningSetSpeakerVolume(float volume) { - buildSetCaptureDevice(stream); - - buildSetRenderDevice(stream); - - if(mPTTDirty) - { - mPTTDirty = false; - - // Send a local mute command. - // NOTE that the state of "PTT" is the inverse of "local mute". - // (i.e. when PTT is true, we send a mute command with "false", and vice versa) - - LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << (mPTT?"false":"true") << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mSpeakerMuteDirty) - { - const char *muteval = ((mSpeakerVolume <= scale_speaker_volume(0))?"true":"false"); - - mSpeakerMuteDirty = false; - - LL_INFOS("Voice") << "Setting speaker mute to " << muteval << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalSpeaker.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << muteval << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mSpeakerVolumeDirty) - { - mSpeakerVolumeDirty = false; - - LL_INFOS("Voice") << "Setting speaker volume to " << mSpeakerVolume << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalSpeakerVolume.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << mSpeakerVolume << "</Value>" - << "</Request>\n\n\n"; - - } - - if(mMicVolumeDirty) - { - mMicVolumeDirty = false; - - LL_INFOS("Voice") << "Setting mic volume to " << mMicVolume << LL_ENDL; - - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalMicVolume.1\">" - << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" - << "<Value>" << mMicVolume << "</Value>" - << "</Request>\n\n\n"; - } - - + if (mVoiceModule) mVoiceModule->tuningSetSpeakerVolume(volume); } -void LLVoiceClient::checkFriend(const LLUUID& id) +float LLVoiceClient::tuningGetEnergy(void) { - std::string name; - buddyListEntry *buddy = findBuddy(id); - - // Make sure we don't add a name before it's been looked up. - if(gCacheName->getFullName(id, name)) + if (mVoiceModule) { - - const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); - bool canSeeMeOnline = false; - if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) - canSeeMeOnline = true; - - // When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary. - - if(buddy) - { - // This buddy is already in both lists. - - if(name != buddy->mDisplayName) - { - // The buddy is in the list with the wrong name. Update it with the correct name. - LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL; - buddy->mDisplayName = name; - buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent. - } - } - else - { - // This buddy was not in the vivox list, needs to be added. - buddy = addBuddy(sipURIFromID(id), name); - buddy->mUUID = id; - } - - // In all the above cases, the buddy is in the SL friends list (which is how we got here). - buddy->mInSLFriends = true; - buddy->mCanSeeMeOnline = canSeeMeOnline; - buddy->mNameResolved = true; - + return mVoiceModule->tuningGetEnergy(); } else { - // This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has. - if(buddy) - { - buddy->mNameResolved = false; - } - - // Initiate a lookup. - // The "lookup completed" callback will ensure that the friends list is rechecked after it completes. - lookupName(id); + return 0.0; } } -void LLVoiceClient::clearAllLists() -{ - // FOR TESTING ONLY - - // This will send the necessary commands to delete ALL buddies, autoaccept rules, and block rules SLVoice tells us about. - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) - { - buddyListEntry *buddy = buddy_it->second; - buddy_it++; - - std::ostringstream stream; - if(buddy->mInVivoxBuddies) - { - // delete this entry from the vivox buddy list - buddy->mInVivoxBuddies = false; - LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "</Request>\n\n\n"; - } +//------------------------------------------------ +// devices - if(buddy->mHasBlockListEntry) - { - // Delete the associated block list entry (so the block list doesn't fill up with junk) - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - } - if(buddy->mHasAutoAcceptListEntry) - { - // Delete the associated auto-accept list entry (so the auto-accept list doesn't fill up with junk) - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - } - - writeString(stream.str()); - - } -} - -void LLVoiceClient::sendFriendsListUpdates() +bool LLVoiceClient::deviceSettingsAvailable() { - if(mBuddyListMapPopulated && mBlockRulesListReceived && mAutoAcceptRulesListReceived && mFriendsListDirty) + if (mVoiceModule) { - mFriendsListDirty = false; - - if(0) - { - // FOR TESTING ONLY -- clear all buddy list, block list, and auto-accept list entries. - clearAllLists(); - return; - } - - LL_INFOS("Voice") << "Checking vivox buddy list against friends list..." << LL_ENDL; - - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - // reset the temp flags in the local buddy list - buddy_it->second->mInSLFriends = false; - } - - // correlate with the friends list - { - LLCollectAllBuddies collect; - LLAvatarTracker::instance().applyFunctor(collect); - LLCollectAllBuddies::buddy_map_t::const_iterator it = collect.mOnline.begin(); - LLCollectAllBuddies::buddy_map_t::const_iterator end = collect.mOnline.end(); - - for ( ; it != end; ++it) - { - checkFriend(it->second); - } - it = collect.mOffline.begin(); - end = collect.mOffline.end(); - for ( ; it != end; ++it) - { - checkFriend(it->second); - } - } - - LL_INFOS("Voice") << "Sending friend list updates..." << LL_ENDL; - - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) - { - buddyListEntry *buddy = buddy_it->second; - buddy_it++; - - // Ignore entries that aren't resolved yet. - if(buddy->mNameResolved) - { - std::ostringstream stream; - - if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate)) - { - if(mNumberOfAliases > 0) - { - // Add (or update) this entry in the vivox buddy list - buddy->mInVivoxBuddies = true; - buddy->mNeedsNameUpdate = false; - LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddySet.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "<DisplayName>" << buddy->mDisplayName << "</DisplayName>" - << "<BuddyData></BuddyData>" // Without this, SLVoice doesn't seem to parse the command. - << "<GroupID>0</GroupID>" - << "</Request>\n\n\n"; - } - } - else if(!buddy->mInSLFriends) - { - // This entry no longer exists in your SL friends list. Remove all traces of it from the Vivox buddy list. - if(buddy->mInVivoxBuddies) - { - // delete this entry from the vivox buddy list - buddy->mInVivoxBuddies = false; - LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "</Request>\n\n\n"; - } - - if(buddy->mHasBlockListEntry) - { - // Delete the associated block list entry, if any - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - } - if(buddy->mHasAutoAcceptListEntry) - { - // Delete the associated auto-accept list entry, if any - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - } - } - - if(buddy->mInSLFriends) - { - - if(buddy->mCanSeeMeOnline) - { - // Buddy should not be blocked. - - // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. - - // If the buddy has a block list entry, delete it. - if(buddy->mHasBlockListEntry) - { - buddy->mHasBlockListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "</Request>\n\n\n"; - - - // If we just deleted a block list entry, add an auto-accept entry. - if(!buddy->mHasAutoAcceptListEntry) - { - buddy->mHasAutoAcceptListEntry = true; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "<AutoAddAsBuddy>0</AutoAddAsBuddy>" - << "</Request>\n\n\n"; - } - } - } - else - { - // Buddy should be blocked. - - // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. - - // If this buddy has an autoaccept entry, delete it - if(buddy->mHasAutoAcceptListEntry) - { - buddy->mHasAutoAcceptListEntry = false; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" - << "</Request>\n\n\n"; - - // If we just deleted an auto-accept entry, add a block list entry. - if(!buddy->mHasBlockListEntry) - { - buddy->mHasBlockListEntry = true; - stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateBlockRule.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BlockMask>" << buddy->mURI << "</BlockMask>" - << "<PresenceOnly>1</PresenceOnly>" - << "</Request>\n\n\n"; - } - } - } - - if(!buddy->mInSLFriends && !buddy->mInVivoxBuddies) - { - // Delete this entry from the local buddy list. This should NOT invalidate the iterator, - // since it has already been incremented to the next entry. - deleteBuddy(buddy->mURI); - } - - } - writeString(stream.str()); - } - } - } -} - -///////////////////////////// -// Response/Event handlers - -void LLVoiceClient::connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID) -{ - if(statusCode != 0) - { - LL_WARNS("Voice") << "Connector.Create response failure: " << statusString << LL_ENDL; - setState(stateConnectorFailed); + return mVoiceModule->deviceSettingsAvailable(); } else { - // Connector created, move forward. - LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; - mAPIVersion = versionID; - mConnectorHandle = connectorHandle; - if(getState() == stateConnectorStarting) - { - setState(stateConnectorStarted); - } + return false; } } -void LLVoiceClient::loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases) -{ - LL_DEBUGS("Voice") << "Account.Login response (" << statusCode << "): " << statusString << LL_ENDL; - - // Status code of 20200 means "bad password". We may want to special-case that at some point. - - if ( statusCode == 401 ) - { - // Login failure which is probably caused by the delay after a user's password being updated. - LL_INFOS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; - setState(stateLoginRetry); - } - else if(statusCode != 0) - { - LL_WARNS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; - setState(stateLoginFailed); - } - else - { - // Login succeeded, move forward. - mAccountHandle = accountHandle; - mNumberOfAliases = numberOfAliases; - // This needs to wait until the AccountLoginStateChangeEvent is received. -// if(getState() == stateLoggingIn) -// { -// setState(stateLoggedIn); -// } - } -} - -void LLVoiceClient::sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) -{ - sessionState *session = findSessionBeingCreatedByURI(requestId); - - if(session) - { - session->mCreateInProgress = false; - } - - if(statusCode != 0) - { - LL_WARNS("Voice") << "Session.Create response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - { - setState(stateJoinSessionFailed); - } - else - { - reapSession(session); - } - } - } - else - { - LL_INFOS("Voice") << "Session.Create response received (success), session handle is " << sessionHandle << LL_ENDL; - if(session) - { - setSessionHandle(session, sessionHandle); - } - } -} - -void LLVoiceClient::sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) -{ - sessionState *session = findSessionBeingCreatedByURI(requestId); - - if(session) - { - session->mCreateInProgress = false; - } - - if(statusCode != 0) - { - LL_WARNS("Voice") << "SessionGroup.AddSession response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - { - setState(stateJoinSessionFailed); - } - else - { - reapSession(session); - } - } - } - else - { - LL_DEBUGS("Voice") << "SessionGroup.AddSession response received (success), session handle is " << sessionHandle << LL_ENDL; - if(session) - { - setSessionHandle(session, sessionHandle); - } - } -} - -void LLVoiceClient::sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString) +void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { - sessionState *session = findSession(requestId); - if(statusCode != 0) - { - LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL; - if(session) - { - session->mMediaConnectInProgress = false; - session->mErrorStatusCode = statusCode; - session->mErrorStatusString = statusString; - if(session == mAudioSession) - setState(stateJoinSessionFailed); - } - } - else - { - LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL; - } + if (mVoiceModule) mVoiceModule->refreshDeviceLists(clearCurrentList); } -void LLVoiceClient::logoutResponse(int statusCode, std::string &statusString) -{ - if(statusCode != 0) - { - LL_WARNS("Voice") << "Account.Logout response failure: " << statusString << LL_ENDL; - // Should this ever fail? do we care if it does? - } -} - -void LLVoiceClient::connectorShutdownResponse(int statusCode, std::string &statusString) +void LLVoiceClient::setCaptureDevice(const std::string& name) { - if(statusCode != 0) - { - LL_WARNS("Voice") << "Connector.InitiateShutdown response failure: " << statusString << LL_ENDL; - // Should this ever fail? do we care if it does? - } - - mConnected = false; + if (mVoiceModule) mVoiceModule->setCaptureDevice(name); - if(getState() == stateConnectorStopping) - { - setState(stateConnectorStopped); - } } -void LLVoiceClient::sessionAddedEvent( - std::string &uriString, - std::string &alias, - std::string &sessionHandle, - std::string &sessionGroupHandle, - bool isChannel, - bool incoming, - std::string &nameString, - std::string &applicationString) +void LLVoiceClient::setRenderDevice(const std::string& name) { - sessionState *session = NULL; - - LL_INFOS("Voice") << "session " << uriString << ", alias " << alias << ", name " << nameString << " handle " << sessionHandle << LL_ENDL; - - session = addSession(uriString, sessionHandle); - if(session) - { - session->mGroupHandle = sessionGroupHandle; - session->mIsChannel = isChannel; - session->mIncoming = incoming; - session->mAlias = alias; - - // Generate a caller UUID -- don't need to do this for channels - if(!session->mIsChannel) - { - if(IDFromName(session->mSIPURI, session->mCallerID)) - { - // Normal URI(base64-encoded UUID) - } - else if(!session->mAlias.empty() && IDFromName(session->mAlias, session->mCallerID)) - { - // Wrong URI, but an alias is available. Stash the incoming URI as an alternate - session->mAlternateSIPURI = session->mSIPURI; - - // and generate a proper URI from the ID. - setSessionURI(session, sipURIFromID(session->mCallerID)); - } - else - { - LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; - setUUIDFromStringHash(session->mCallerID, session->mSIPURI); - session->mSynthesizedCallerID = true; - - // Can't look up the name in this case -- we have to extract it from the URI. - std::string namePortion = nameFromsipURI(session->mSIPURI); - if(namePortion.empty()) - { - // Didn't seem to be a SIP URI, just use the whole provided name. - namePortion = nameString; - } - - // Some incoming names may be separated with an underscore instead of a space. Fix this. - LLStringUtil::replaceChar(namePortion, '_', ' '); - - // Act like we just finished resolving the name (this stores it in all the right places) - avatarNameResolved(session->mCallerID, namePortion); - } - - LL_INFOS("Voice") << "caller ID: " << session->mCallerID << LL_ENDL; - - if(!session->mSynthesizedCallerID) - { - // If we got here, we don't have a proper name. Initiate a lookup. - lookupName(session->mCallerID); - } - } - } + if (mVoiceModule) mVoiceModule->setRenderDevice(name); } -void LLVoiceClient::sessionGroupAddedEvent(std::string &sessionGroupHandle) +const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { - LL_DEBUGS("Voice") << "handle " << sessionGroupHandle << LL_ENDL; - -#if USE_SESSION_GROUPS - if(mMainSessionGroupHandle.empty()) + static LLVoiceDeviceList nullCaptureDevices; + if (mVoiceModule) { - // This is the first (i.e. "main") session group. Save its handle. - mMainSessionGroupHandle = sessionGroupHandle; + return mVoiceModule->getCaptureDevices(); } else { - LL_DEBUGS("Voice") << "Already had a session group handle " << mMainSessionGroupHandle << LL_ENDL; - } -#endif -} - -void LLVoiceClient::joinedAudioSession(sessionState *session) -{ - if(mAudioSession != session) - { - sessionState *oldSession = mAudioSession; - - mAudioSession = session; - mAudioSessionChanged = true; - - // The old session may now need to be deleted. - reapSession(oldSession); - } - - // This is the session we're joining. - if(getState() == stateJoiningSession) - { - setState(stateSessionJoined); - - // SLIM SDK: we don't always receive a participant state change for ourselves when joining a channel now. - // Add the current user as a participant here. - participantState *participant = session->addParticipant(sipURIFromName(mAccountName)); - if(participant) - { - participant->mIsSelf = true; - lookupName(participant->mAvatarID); - - LL_INFOS("Voice") << "added self as participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - } - - if(!session->mIsChannel) - { - // this is a p2p session. Make sure the other end is added as a participant. - participantState *participant = session->addParticipant(session->mSIPURI); - if(participant) - { - if(participant->mAvatarIDValid) - { - lookupName(participant->mAvatarID); - } - else if(!session->mName.empty()) - { - participant->mDisplayName = session->mName; - avatarNameResolved(participant->mAvatarID, session->mName); - } - - // TODO: Question: Do we need to set up mAvatarID/mAvatarIDValid here? - LL_INFOS("Voice") << "added caller as participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - } - } + return nullCaptureDevices; } } -void LLVoiceClient::sessionRemovedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle) -{ - LL_INFOS("Voice") << "handle " << sessionHandle << LL_ENDL; - - sessionState *session = findSession(sessionHandle); - if(session) - { - leftAudioSession(session); - - // This message invalidates the session's handle. Set it to empty. - setSessionHandle(session); - - // This also means that the session's session group is now empty. - // Terminate the session group so it doesn't leak. - sessionGroupTerminateSendMessage(session); - - // Reset the media state (we now have no info) - session->mMediaStreamState = streamStateUnknown; - session->mTextStreamState = streamStateUnknown; - - // Conditionally delete the session - reapSession(session); - } - else - { - LL_WARNS("Voice") << "unknown session " << sessionHandle << " removed" << LL_ENDL; - } -} -void LLVoiceClient::reapSession(sessionState *session) +const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { - if(session) + static LLVoiceDeviceList nullRenderDevices; + if (mVoiceModule) { - if(!session->mHandle.empty()) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; - } - else if(session->mCreateInProgress) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; - } - else if(session->mMediaConnectInProgress) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; - } - else if(session == mAudioSession) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; - } - else if(session == mNextAudioSession) - { - LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; - } - else - { - // TODO: Question: Should we check for queued text messages here? - // We don't have a reason to keep tracking this session, so just delete it. - LL_DEBUGS("Voice") << "deleting session " << session->mSIPURI << LL_ENDL; - deleteSession(session); - session = NULL; - } + return mVoiceModule->getRenderDevices(); } else { -// LL_DEBUGS("Voice") << "session is NULL" << LL_ENDL; + return nullRenderDevices; } } -// Returns true if the session seems to indicate we've moved to a region on a different voice server -bool LLVoiceClient::sessionNeedsRelog(sessionState *session) -{ - bool result = false; - - if(session != NULL) - { - // Only make this check for spatial channels (so it won't happen for group or p2p calls) - if(session->mIsSpatial) - { - std::string::size_type atsign; - - atsign = session->mSIPURI.find("@"); - - if(atsign != std::string::npos) - { - std::string urihost = session->mSIPURI.substr(atsign + 1); - if(stricmp(urihost.c_str(), mVoiceSIPURIHostName.c_str())) - { - // The hostname in this URI is different from what we expect. This probably means we need to relog. - - // We could make a ProvisionVoiceAccountRequest and compare the result with the current values of - // mVoiceSIPURIHostName and mVoiceAccountServerURI to be really sure, but this is a pretty good indicator. - - result = true; - } - } - } - } - - return result; -} -void LLVoiceClient::leftAudioSession( - sessionState *session) -{ - if(mAudioSession == session) - { - switch(getState()) - { - case stateJoiningSession: - case stateSessionJoined: - case stateRunning: - case stateLeavingSession: - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - // normal transition - LL_DEBUGS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; - setState(stateSessionTerminated); - break; - - case stateSessionTerminated: - // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. - LL_WARNS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; - break; - - default: - LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; - setState(stateSessionTerminated); - break; - } - } -} +//-------------------------------------------------- +// participants -void LLVoiceClient::accountLoginStateChangeEvent( - std::string &accountHandle, - int statusCode, - std::string &statusString, - int state) +void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) { - LL_DEBUGS("Voice") << "state is " << state << LL_ENDL; - /* - According to Mike S., status codes for this event are: - login_state_logged_out=0, - login_state_logged_in = 1, - login_state_logging_in = 2, - login_state_logging_out = 3, - login_state_resetting = 4, - login_state_error=100 - */ - - switch(state) + if (mVoiceModule) { - case 1: - if(getState() == stateLoggingIn) - { - setState(stateLoggedIn); - } - break; - - case 3: - // The user is in the process of logging out. - setState(stateLoggingOut); - break; - - case 0: - // The user has been logged out. - setState(stateLoggedOut); - break; - - default: - //Used to be a commented out warning - LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL; - break; - } -} - -void LLVoiceClient::mediaStreamUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - int statusCode, - std::string &statusString, - int state, - bool incoming) -{ - sessionState *session = findSession(sessionHandle); - - LL_DEBUGS("Voice") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; - - if(session) - { - // We know about this session - - // Save the state for later use - session->mMediaStreamState = state; - - switch(statusCode) - { - case 0: - case 200: - // generic success - // Don't change the saved error code (it may have been set elsewhere) - break; - default: - // save the status code for later - session->mErrorStatusCode = statusCode; - break; - } - - switch(state) - { - case streamStateIdle: - // Standard "left audio session" - session->mVoiceEnabled = false; - session->mMediaConnectInProgress = false; - leftAudioSession(session); - break; - - case streamStateConnected: - session->mVoiceEnabled = true; - session->mMediaConnectInProgress = false; - joinedAudioSession(session); - break; - - case streamStateRinging: - if(incoming) - { - // Send the voice chat invite to the GUI layer - // *TODO: Question: Should we correlate with the mute list here? - session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); - session->mVoiceInvitePending = true; - if(session->mName.empty()) - { - lookupName(session->mCallerID); - } - else - { - // Act like we just finished resolving the name - avatarNameResolved(session->mCallerID, session->mName); - } - } - break; - - default: - LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; - break; - - } - + mVoiceModule->getParticipantList(participants); } else { - LL_WARNS("Voice") << "session " << sessionHandle << "not found"<< LL_ENDL; + participants = std::set<LLUUID>(); } } -void LLVoiceClient::textStreamUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - bool enabled, - int state, - bool incoming) +bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) { - sessionState *session = findSession(sessionHandle); - - if(session) - { - // Save the state for later use - session->mTextStreamState = state; - - // We know about this session - switch(state) - { - case 0: // We see this when the text stream closes - LL_DEBUGS("Voice") << "stream closed" << LL_ENDL; - break; - - case 1: // We see this on an incoming call from the Connector - // Try to send any text messages queued for this session. - sendQueuedTextMessages(session); - - // Send the text chat invite to the GUI layer - // TODO: Question: Should we correlate with the mute list here? - session->mTextInvitePending = true; - if(session->mName.empty()) - { - lookupName(session->mCallerID); - } - else - { - // Act like we just finished resolving the name - avatarNameResolved(session->mCallerID, session->mName); - } - break; - - default: - LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; - break; - - } - } + if(mVoiceModule) + { + return mVoiceModule->isParticipant(speaker_id); + } + return false; } -void LLVoiceClient::participantAddedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - std::string &nameString, - std::string &displayNameString, - int participantType) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - participantState *participant = session->addParticipant(uriString); - if(participant) - { - participant->mAccountName = nameString; - - LL_DEBUGS("Voice") << "added participant \"" << participant->mAccountName - << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; - - if(participant->mAvatarIDValid) - { - // Initiate a lookup - lookupName(participant->mAvatarID); - } - else - { - // If we don't have a valid avatar UUID, we need to fill in the display name to make the active speakers floater work. - std::string namePortion = nameFromsipURI(uriString); - if(namePortion.empty()) - { - // Problem with the SIP URI, fall back to the display name - namePortion = displayNameString; - } - if(namePortion.empty()) - { - // Problems with both of the above, fall back to the account name - namePortion = nameString; - } - - // Set the display name (which is a hint to the active speakers window not to do its own lookup) - participant->mDisplayName = namePortion; - avatarNameResolved(participant->mAvatarID, namePortion); - } - } - } -} -void LLVoiceClient::participantRemovedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - std::string &nameString) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - participantState *participant = session->findParticipant(uriString); - if(participant) - { - session->removeParticipant(participant); - } - else - { - LL_DEBUGS("Voice") << "unknown participant " << uriString << LL_ENDL; - } - } - else - { - LL_DEBUGS("Voice") << "unknown session " << sessionHandle << LL_ENDL; - } -} +//-------------------------------------------------- +// text chat -void LLVoiceClient::participantUpdatedEvent( - std::string &sessionHandle, - std::string &sessionGroupHandle, - std::string &uriString, - std::string &alias, - bool isModeratorMuted, - bool isSpeaking, - int volume, - F32 energy) +BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id) { - sessionState *session = findSession(sessionHandle); - if(session) + if (mVoiceModule) { - participantState *participant = session->findParticipant(uriString); - - if(participant) - { - participant->mIsSpeaking = isSpeaking; - participant->mIsModeratorMuted = isModeratorMuted; - - // SLIM SDK: convert range: ensure that energy is set to zero if is_speaking is false - if (isSpeaking) - { - participant->mSpeakingTimeout.reset(); - participant->mPower = energy; - } - else - { - participant->mPower = 0.0f; - } - - // Ignore incoming volume level if it has been explicitly set, or there - // is a volume or mute change pending. - if ( !participant->mVolumeSet && !participant->mVolumeDirty) - { - participant->mVolume = (F32)volume * VOLUME_SCALE_VIVOX; - } - - // *HACK: mantipov: added while working on EXT-3544 - /* - Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE - LLViewerChatterBoxSessionAgentListUpdates::post() sometimes AFTER. - - participantUpdatedEvent updates voice participant state in particular participantState::mIsModeratorMuted - Originally we wanted to update session Speaker Manager to fire LLSpeakerVoiceModerationEvent to fix the EXT-3544 bug. - Calling of the LLSpeakerMgr::update() method was added into LLIMMgr::processAgentListUpdates. - - But in case participantUpdatedEvent() is called after LLViewerChatterBoxSessionAgentListUpdates::post() - voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager - and event is not fired. - - So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it - in LLCallFloater::draw() - */ - LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); - - // ignore session ID of local chat - if (voice_cnl && voice_cnl->getSessionID().notNull()) - { - LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(voice_cnl->getSessionID()); - if (speaker_manager) - { - speaker_manager->update(true); - } - } - } - else - { - LL_WARNS("Voice") << "unknown participant: " << uriString << LL_ENDL; - } + return mVoiceModule->isSessionTextIMPossible(id); } else { - LL_INFOS("Voice") << "unknown session " << sessionHandle << LL_ENDL; - } + return FALSE; + } } -void LLVoiceClient::buddyPresenceEvent( - std::string &uriString, - std::string &alias, - std::string &statusString, - std::string &applicationString) +BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) { - buddyListEntry *buddy = findBuddy(uriString); - - if(buddy) + if (mVoiceModule) { - LL_DEBUGS("Voice") << "Presence event for " << buddy->mDisplayName << " status \"" << statusString << "\", application \"" << applicationString << "\""<< LL_ENDL; - LL_DEBUGS("Voice") << "before: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; - - if(applicationString.empty()) - { - // This presence event is from a client that doesn't set up the Application string. Do things the old-skool way. - // NOTE: this will be needed to support people who aren't on the 3010-class SDK yet. - - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // User went offline with a non-SLim-enabled viewer. - buddy->mOnlineSL = false; - } - else if ( stricmp("Online", statusString.c_str())== 0) - { - // User came online with a non-SLim-enabled viewer. - buddy->mOnlineSL = true; - } - else - { - // If the user is online through SLim, their status will be "Online-slc", "Away", or something else. - // NOTE: we should never see this unless someone is running an OLD version of SLim -- the versions that should be in use now all set the application string. - buddy->mOnlineSLim = true; - } - } - else if(applicationString.find("SecondLifeViewer") != std::string::npos) - { - // This presence event is from a viewer that sets the application string - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // Viewer says they're offline - buddy->mOnlineSL = false; - } - else - { - // Viewer says they're online - buddy->mOnlineSL = true; - } - } - else - { - // This presence event is from something which is NOT the SL viewer (assume it's SLim). - if ( stricmp("Unknown", statusString.c_str())== 0) - { - // SLim says they're offline - buddy->mOnlineSLim = false; - } - else - { - // SLim says they're online - buddy->mOnlineSLim = true; - } - } - - LL_DEBUGS("Voice") << "after: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; - - // HACK -- increment the internal change serial number in the LLRelationship (without changing the actual status), so the UI notices the change. - LLAvatarTracker::instance().setBuddyOnline(buddy->mUUID,LLAvatarTracker::instance().isBuddyOnline(buddy->mUUID)); - - notifyFriendObservers(); + return mVoiceModule->isSessionCallBackPossible(id); } else { - LL_DEBUGS("Voice") << "Presence for unknown buddy " << uriString << LL_ENDL; + return FALSE; } } -void LLVoiceClient::messageEvent( - std::string &sessionHandle, - std::string &uriString, - std::string &alias, - std::string &messageHeader, - std::string &messageBody, - std::string &applicationString) -{ - LL_DEBUGS("Voice") << "Message event, session " << sessionHandle << " from " << uriString << LL_ENDL; -// LL_DEBUGS("Voice") << " header " << messageHeader << ", body: \n" << messageBody << LL_ENDL; - - if(messageHeader.find("text/html") != std::string::npos) - { - std::string message; - - { - const std::string startMarker = "<body"; - const std::string startMarker2 = ">"; - const std::string endMarker = "</body>"; - const std::string startSpan = "<span"; - const std::string endSpan = "</span>"; - std::string::size_type start; - std::string::size_type end; - - // Default to displaying the raw string, so the message gets through. - message = messageBody; - - // Find the actual message text within the XML fragment - start = messageBody.find(startMarker); - start = messageBody.find(startMarker2, start); - end = messageBody.find(endMarker); - - if(start != std::string::npos) - { - start += startMarker2.size(); - - if(end != std::string::npos) - end -= start; - - message.assign(messageBody, start, end); - } - else - { - // Didn't find a <body>, try looking for a <span> instead. - start = messageBody.find(startSpan); - start = messageBody.find(startMarker2, start); - end = messageBody.find(endSpan); - - if(start != std::string::npos) - { - start += startMarker2.size(); - - if(end != std::string::npos) - end -= start; - - message.assign(messageBody, start, end); - } - } - } - -// LL_DEBUGS("Voice") << " raw message = \n" << message << LL_ENDL; - - // strip formatting tags - { - std::string::size_type start; - std::string::size_type end; - - while((start = message.find('<')) != std::string::npos) - { - if((end = message.find('>', start + 1)) != std::string::npos) - { - // Strip out the tag - message.erase(start, (end + 1) - start); - } - else - { - // Avoid an infinite loop - break; - } - } - } - - // Decode ampersand-escaped chars - { - std::string::size_type mark = 0; - - // The text may contain text encoded with <, >, and & - mark = 0; - while((mark = message.find("<", mark)) != std::string::npos) - { - message.replace(mark, 4, "<"); - mark += 1; - } - - mark = 0; - while((mark = message.find(">", mark)) != std::string::npos) - { - message.replace(mark, 4, ">"); - mark += 1; - } - - mark = 0; - while((mark = message.find("&", mark)) != std::string::npos) - { - message.replace(mark, 5, "&"); - mark += 1; - } - } - - // strip leading/trailing whitespace (since we always seem to get a couple newlines) - LLStringUtil::trim(message); - -// LL_DEBUGS("Voice") << " stripped message = \n" << message << LL_ENDL; - - sessionState *session = findSession(sessionHandle); - if(session) - { - bool is_busy = gAgent.getBusy(); - bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat); - bool is_linden = LLMuteList::getInstance()->isLinden(session->mName); - bool quiet_chat = false; - LLChat chat; - - chat.mMuted = is_muted && !is_linden; - - if(!chat.mMuted) - { - chat.mFromID = session->mCallerID; - chat.mFromName = session->mName; - chat.mSourceType = CHAT_SOURCE_AGENT; - - if(is_busy && !is_linden) - { - quiet_chat = true; - // TODO: Question: Return busy mode response here? Or maybe when session is started instead? - } - - LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL; - gIMMgr->addMessage(session->mIMSessionID, - session->mCallerID, - session->mName.c_str(), - message.c_str(), - LLStringUtil::null, // default arg - IM_NOTHING_SPECIAL, // default arg - 0, // default arg - LLUUID::null, // default arg - LLVector3::zero, // default arg - true); // prepend name and make it a link to the user's profile - } - } - } -} - -void LLVoiceClient::sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType) +BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) { - sessionState *session = findSession(sessionHandle); - - if(session) + if (mVoiceModule) { - participantState *participant = session->findParticipant(uriString); - if(participant) - { - if (!stricmp(notificationType.c_str(), "Typing")) - { - // Other end started typing - // TODO: The proper way to add a typing notification seems to be LLIMMgr::processIMTypingStart(). - // It requires an LLIMInfo for the message, which we don't have here. - } - else if (!stricmp(notificationType.c_str(), "NotTyping")) - { - // Other end stopped typing - // TODO: The proper way to remove a typing notification seems to be LLIMMgr::processIMTypingStop(). - // It requires an LLIMInfo for the message, which we don't have here. - } - else - { - LL_DEBUGS("Voice") << "Unknown notification type " << notificationType << "for participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; - } - } - else - { - LL_DEBUGS("Voice") << "Unknown participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; - } + return mVoiceModule->sendTextMessage(participant_id, message); } else { - LL_DEBUGS("Voice") << "Unknown session handle " << sessionHandle << LL_ENDL; - } -} - -void LLVoiceClient::subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType) -{ - buddyListEntry *buddy = findBuddy(buddyURI); - - if(!buddy) - { - // Couldn't find buddy by URI, try converting the alias... - if(!alias.empty()) - { - LLUUID id; - if(IDFromName(alias, id)) - { - buddy = findBuddy(id); - } - } - } - - if(buddy) - { - std::ostringstream stream; - - if(buddy->mCanSeeMeOnline) - { - // Sending the response will create an auto-accept rule - buddy->mHasAutoAcceptListEntry = true; - } - else - { - // Sending the response will create a block rule - buddy->mHasBlockListEntry = true; - } - - if(buddy->mInSLFriends) - { - buddy->mInVivoxBuddies = true; - } - - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.SendSubscriptionReply.1\">" - << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" - << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" - << "<RuleType>" << (buddy->mCanSeeMeOnline?"Allow":"Hide") << "</RuleType>" - << "<AutoAccept>"<< (buddy->mInSLFriends?"1":"0")<< "</AutoAccept>" - << "<SubscriptionHandle>" << subscriptionHandle << "</SubscriptionHandle>" - << "</Request>" - << "\n\n\n"; - - writeString(stream.str()); - } -} - -void LLVoiceClient::auxAudioPropertiesEvent(F32 energy) -{ - LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; - mTuningEnergy = energy; -} - -void LLVoiceClient::buddyListChanged() -{ - // This is called after we receive a BuddyAndGroupListChangedEvent. - mBuddyListMapPopulated = true; - mFriendsListDirty = true; -} - -void LLVoiceClient::muteListChanged() -{ - // The user's mute list has been updated. Go through the current participant list and sync it with the mute list. - if(mAudioSession) - { - participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); - - for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) - { - participantState *p = iter->second; - - // Check to see if this participant is on the mute list already - if(p->updateMuteState()) - mAudioSession->mMuteDirty = true; - } - } -} - -void LLVoiceClient::updateFriends(U32 mask) -{ - if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::POWERS)) - { - // Just resend the whole friend list to the daemon - mFriendsListDirty = true; - } -} - -///////////////////////////// -// Managing list of participants -LLVoiceClient::participantState::participantState(const std::string &uri) : - mURI(uri), - mPTT(false), - mIsSpeaking(false), - mIsModeratorMuted(false), - mLastSpokeTimestamp(0.f), - mPower(0.f), - mVolume(VOLUME_DEFAULT), - mOnMuteList(false), - mVolumeSet(false), - mVolumeDirty(false), - mAvatarIDValid(false), - mIsSelf(false) -{ -} - -LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(const std::string &uri) -{ - participantState *result = NULL; - bool useAlternateURI = false; - - // Note: this is mostly the body of LLVoiceClient::sessionState::findParticipant(), but since we need to know if it - // matched the alternate SIP URI (so we can add it properly), we need to reproduce it here. - { - participantMap::iterator iter = mParticipantsByURI.find(&uri); - - if(iter == mParticipantsByURI.end()) - { - if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) - { - // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. - // Use mSIPURI instead, since it will be properly encoded. - iter = mParticipantsByURI.find(&(mSIPURI)); - useAlternateURI = true; - } - } - - if(iter != mParticipantsByURI.end()) - { - result = iter->second; - } - } - - if(!result) - { - // participant isn't already in one list or the other. - result = new participantState(useAlternateURI?mSIPURI:uri); - mParticipantsByURI.insert(participantMap::value_type(&(result->mURI), result)); - mParticipantsChanged = true; - - // Try to do a reverse transform on the URI to get the GUID back. - { - LLUUID id; - if(IDFromName(result->mURI, id)) - { - result->mAvatarIDValid = true; - result->mAvatarID = id; - - if(result->updateMuteState()) - mMuteDirty = true; - } - else - { - // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. - // This tells code in LLVoiceClient that the ID will not be in the name cache. - setUUIDFromStringHash(result->mAvatarID, uri); - } - } - - mParticipantsByUUID.insert(participantUUIDMap::value_type(&(result->mAvatarID), result)); - - if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume)) - { - result->mVolumeDirty = true; - mVolumeDirty = true; - } - - LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL; - } - - return result; -} - -bool LLVoiceClient::participantState::updateMuteState() -{ - bool result = false; - - if(mAvatarIDValid) - { - bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat); - if(mOnMuteList != isMuted) - { - mOnMuteList = isMuted; - mVolumeDirty = true; - result = true; - } - } - return result; -} - -bool LLVoiceClient::participantState::isAvatar() -{ - return mAvatarIDValid; -} - -void LLVoiceClient::sessionState::removeParticipant(LLVoiceClient::participantState *participant) -{ - if(participant) - { - participantMap::iterator iter = mParticipantsByURI.find(&(participant->mURI)); - participantUUIDMap::iterator iter2 = mParticipantsByUUID.find(&(participant->mAvatarID)); - - LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL; - - if(iter == mParticipantsByURI.end()) - { - LL_ERRS("Voice") << "Internal error: participant " << participant->mURI << " not in URI map" << LL_ENDL; - } - else if(iter2 == mParticipantsByUUID.end()) - { - LL_ERRS("Voice") << "Internal error: participant ID " << participant->mAvatarID << " not in UUID map" << LL_ENDL; - } - else if(iter->second != iter2->second) - { - LL_ERRS("Voice") << "Internal error: participant mismatch!" << LL_ENDL; - } - else - { - mParticipantsByURI.erase(iter); - mParticipantsByUUID.erase(iter2); - - delete participant; - mParticipantsChanged = true; - } - } -} - -void LLVoiceClient::sessionState::removeAllParticipants() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - - while(!mParticipantsByURI.empty()) - { - removeParticipant(mParticipantsByURI.begin()->second); - } - - if(!mParticipantsByUUID.empty()) - { - LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL; - } -} - -LLVoiceClient::participantMap *LLVoiceClient::getParticipantList(void) -{ - participantMap *result = NULL; - if(mAudioSession) - { - result = &(mAudioSession->mParticipantsByURI); - } - return result; -} - -void LLVoiceClient::getParticipantsUUIDSet(std::set<LLUUID>& participant_uuids) -{ - if (NULL == mAudioSession) return; - - participantUUIDMap::const_iterator it = mAudioSession->mParticipantsByUUID.begin(), - it_end = mAudioSession->mParticipantsByUUID.end(); - for (; it != it_end; ++it) - { - participant_uuids.insert((*(*it).first)); - } -} - -LLVoiceClient::participantState *LLVoiceClient::sessionState::findParticipant(const std::string &uri) -{ - participantState *result = NULL; - - participantMap::iterator iter = mParticipantsByURI.find(&uri); - - if(iter == mParticipantsByURI.end()) - { - if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) - { - // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. - // Look up the other URI - iter = mParticipantsByURI.find(&(mSIPURI)); - } - } - - if(iter != mParticipantsByURI.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::participantState* LLVoiceClient::sessionState::findParticipantByID(const LLUUID& id) -{ - participantState * result = NULL; - participantUUIDMap::iterator iter = mParticipantsByUUID.find(&id); - - if(iter != mParticipantsByUUID.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::participantState* LLVoiceClient::findParticipantByID(const LLUUID& id) -{ - participantState * result = NULL; - - if(mAudioSession) - { - result = mAudioSession->findParticipantByID(id); - } - - return result; + return FALSE; + } } - -void LLVoiceClient::parcelChanged() +void LLVoiceClient::endUserIMSession(const LLUUID& participant_id) { - if(getState() >= stateNoChannel) - { - // If the user is logged in, start a channel lookup. - LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; - - std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); - LLSD data; - LLHTTPClient::post( - url, - data, - new LLVoiceClientCapResponder); - } - else + if (mVoiceModule) { - // The transition to stateNoChannel needs to kick this off again. - LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL; + mVoiceModule->endUserIMSession(participant_id); } } -void LLVoiceClient::switchChannel( - std::string uri, - bool spatial, - bool no_reconnect, - bool is_p2p, - std::string hash) -{ - bool needsSwitch = false; - - LL_DEBUGS("Voice") - << "called in state " << state2string(getState()) - << " with uri \"" << uri << "\"" - << (spatial?", spatial is true":", spatial is false") - << LL_ENDL; - - switch(getState()) - { - case stateJoinSessionFailed: - case stateJoinSessionFailedWaiting: - case stateNoChannel: - // Always switch to the new URI from these states. - needsSwitch = true; - break; - - default: - if(mSessionTerminateRequested) - { - // If a terminate has been requested, we need to compare against where the URI we're already headed to. - if(mNextAudioSession) - { - if(mNextAudioSession->mSIPURI != uri) - needsSwitch = true; - } - else - { - // mNextAudioSession is null -- this probably means we're on our way back to spatial. - if(!uri.empty()) - { - // We do want to process a switch in this case. - needsSwitch = true; - } - } - } - else - { - // Otherwise, compare against the URI we're in now. - if(mAudioSession) - { - if(mAudioSession->mSIPURI != uri) - { - needsSwitch = true; - } - } - else - { - if(!uri.empty()) - { - // mAudioSession is null -- it's not clear what case would cause this. - // For now, log it as a warning and see if it ever crops up. - LL_WARNS("Voice") << "No current audio session." << LL_ENDL; - } - } - } - break; - } - - if(needsSwitch) - { - if(uri.empty()) - { - // Leave any channel we may be in - LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL; - - sessionState *oldSession = mNextAudioSession; - mNextAudioSession = NULL; - - // The old session may now need to be deleted. - reapSession(oldSession); - - notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - } - else - { - LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL; - - mNextAudioSession = addSession(uri); - mNextAudioSession->mHash = hash; - mNextAudioSession->mIsSpatial = spatial; - mNextAudioSession->mReconnect = !no_reconnect; - mNextAudioSession->mIsP2P = is_p2p; - } - - if(getState() <= stateNoChannel) - { - // We're already set up to join a channel, just needed to fill in the session URI - } - else - { - // State machine will come around and rejoin if uri/handle is not empty. - sessionTerminate(); - } - } -} +//---------------------------------------------- +// channels -void LLVoiceClient::joinSession(sessionState *session) +bool LLVoiceClient::inProximalChannel() { - mNextAudioSession = session; - - if(getState() <= stateNoChannel) + if (mVoiceModule) { - // We're already set up to join a channel, just needed to fill in the session handle + return mVoiceModule->inProximalChannel(); } else { - // State machine will come around and rejoin if uri/handle is not empty. - sessionTerminate(); + return false; } } @@ -5454,1884 +343,608 @@ void LLVoiceClient::setNonSpatialChannel( const std::string &uri, const std::string &credentials) { - switchChannel(uri, false, false, false, credentials); + if (mVoiceModule) mVoiceModule->setNonSpatialChannel(uri, credentials); } void LLVoiceClient::setSpatialChannel( const std::string &uri, const std::string &credentials) { - mSpatialSessionURI = uri; - mSpatialSessionCredentials = credentials; - mAreaVoiceDisabled = mSpatialSessionURI.empty(); - - LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; - - if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) - { - // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. - LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; - } - else - { - switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); - } + if (mVoiceModule) mVoiceModule->setSpatialChannel(uri, credentials); } -void LLVoiceClient::callUser(const LLUUID &uuid) -{ - std::string userURI = sipURIFromID(uuid); - - switchChannel(userURI, false, true, true); -} - -LLVoiceClient::sessionState* LLVoiceClient::startUserIMSession(const LLUUID &uuid) +void LLVoiceClient::leaveNonSpatialChannel() { - // Figure out if a session with the user already exists - sessionState *session = findSession(uuid); - if(!session) - { - // No session with user, need to start one. - std::string uri = sipURIFromID(uuid); - session = addSession(uri); - - llassert(session); - if (!session) return NULL; - - session->mIsSpatial = false; - session->mReconnect = false; - session->mIsP2P = true; - session->mCallerID = uuid; - } - - if(session->mHandle.empty()) - { - // Session isn't active -- start it up. - sessionCreateSendMessage(session, false, true); - } - else - { - // Session is already active -- start up text. - sessionTextConnectSendMessage(session); - } - - return session; + if (mVoiceModule) mVoiceModule->leaveNonSpatialChannel(); } -bool LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) +void LLVoiceClient::leaveChannel(void) { - bool result = false; - - // Attempt to locate the indicated session - sessionState *session = startUserIMSession(participant_id); - if(session) - { - // found the session, attempt to send the message - session->mTextMsgQueue.push(message); - - // Try to send queued messages (will do nothing if the session is not open yet) - sendQueuedTextMessages(session); - - // The message is queued, so we succeed. - result = true; - } - else - { - LL_DEBUGS("Voice") << "Session not found for participant ID " << participant_id << LL_ENDL; - } - - return result; + if (mVoiceModule) mVoiceModule->leaveChannel(); } -void LLVoiceClient::sendQueuedTextMessages(sessionState *session) +std::string LLVoiceClient::getCurrentChannel() { - if(session->mTextStreamState == 1) + if (mVoiceModule) { - if(!session->mTextMsgQueue.empty()) - { - std::ostringstream stream; - - while(!session->mTextMsgQueue.empty()) - { - std::string message = session->mTextMsgQueue.front(); - session->mTextMsgQueue.pop(); - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SendMessage.1\">" - << "<SessionHandle>" << session->mHandle << "</SessionHandle>" - << "<MessageHeader>text/HTML</MessageHeader>" - << "<MessageBody>" << message << "</MessageBody>" - << "</Request>" - << "\n\n\n"; - } - writeString(stream.str()); - } + return mVoiceModule->getCurrentChannel(); } else { - // Session isn't connected yet, defer until later. + return std::string(); } } -void LLVoiceClient::endUserIMSession(const LLUUID &uuid) -{ - // Figure out if a session with the user exists - sessionState *session = findSession(uuid); - if(session) - { - // found the session - if(!session->mHandle.empty()) - { - sessionTextDisconnectSendMessage(session); - } - } - else - { - LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; - } -} - -bool LLVoiceClient::answerInvite(std::string &sessionHandle) -{ - // this is only ever used to answer incoming p2p call invites. - - sessionState *session = findSession(sessionHandle); - if(session) - { - session->mIsSpatial = false; - session->mReconnect = false; - session->mIsP2P = true; - joinSession(session); - return true; - } - - return false; -} +//--------------------------------------- +// invitations -bool LLVoiceClient::isOnlineSIP(const LLUUID &id) +void LLVoiceClient::callUser(const LLUUID &uuid) { - bool result = false; - buddyListEntry *buddy = findBuddy(id); - if(buddy) - { - result = buddy->mOnlineSLim; - LL_DEBUGS("Voice") << "Buddy " << buddy->mDisplayName << " is SIP " << (result?"online":"offline") << LL_ENDL; - } - - if(!result) - { - // This user isn't on the buddy list or doesn't show online status through the buddy list, but could be a participant in an existing session if they initiated a text IM. - sessionState *session = findSession(id); - if(session && !session->mHandle.empty()) - { - if((session->mTextStreamState != streamStateUnknown) || (session->mMediaStreamState > streamStateIdle)) - { - LL_DEBUGS("Voice") << "Open session with " << id << " found, returning SIP online state" << LL_ENDL; - // we have a p2p text session open with this user, so by definition they're online. - result = true; - } - } - } - - return result; + if (mVoiceModule) mVoiceModule->callUser(uuid); } -// Returns true if the indicated participant in the current audio session is really an SL avatar. -// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. -bool LLVoiceClient::isParticipantAvatar(const LLUUID &id) +bool LLVoiceClient::isValidChannel(std::string &session_handle) { - bool result = true; - sessionState *session = findSession(id); - - if(session != NULL) + if (mVoiceModule) { - // this is a p2p session with the indicated caller, or the session with the specified UUID. - if(session->mSynthesizedCallerID) - result = false; + return mVoiceModule->isValidChannel(session_handle); } else { - // Didn't find a matching session -- check the current audio session for a matching participant - if(mAudioSession != NULL) - { - participantState *participant = findParticipantByID(id); - if(participant != NULL) - { - result = participant->isAvatar(); - } - } + return false; } - - return result; } -// Returns true if calling back the session URI after the session has closed is possible. -// Currently this will be false only for PSTN P2P calls. -bool LLVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) +bool LLVoiceClient::answerInvite(std::string &channelHandle) { - bool result = true; - sessionState *session = findSession(session_id); - - if(session != NULL) - { - result = session->isCallBackPossible(); - } - - return result; -} - -// Returns true if the session can accepte text IM's. -// Currently this will be false only for PSTN P2P calls. -bool LLVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) -{ - bool result = true; - sessionState *session = findSession(session_id); - - if(session != NULL) + if (mVoiceModule) { - result = session->isTextIMPossible(); + return mVoiceModule->answerInvite(channelHandle); } - - return result; -} - - -void LLVoiceClient::declineInvite(std::string &sessionHandle) -{ - sessionState *session = findSession(sessionHandle); - if(session) - { - sessionMediaDisconnectSendMessage(session); - } -} - -void LLVoiceClient::leaveNonSpatialChannel() -{ - LL_DEBUGS("Voice") - << "called in state " << state2string(getState()) - << LL_ENDL; - - // Make sure we don't rejoin the current session. - sessionState *oldNextSession = mNextAudioSession; - mNextAudioSession = NULL; - - // Most likely this will still be the current session at this point, but check it anyway. - reapSession(oldNextSession); - - verifySessionState(); - - sessionTerminate(); -} - -std::string LLVoiceClient::getCurrentChannel() -{ - std::string result; - - if((getState() == stateRunning) && !mSessionTerminateRequested) - { - result = getAudioSessionURI(); - } - - return result; -} - -bool LLVoiceClient::inProximalChannel() -{ - bool result = false; - - if((getState() == stateRunning) && !mSessionTerminateRequested) - { - result = inSpatialChannel(); - } - - return result; -} - -std::string LLVoiceClient::sipURIFromID(const LLUUID &id) -{ - std::string result; - result = "sip:"; - result += nameFromID(id); - result += "@"; - result += mVoiceSIPURIHostName; - - return result; -} - -std::string LLVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) -{ - std::string result; - if(avatar) - { - result = "sip:"; - result += nameFromID(avatar->getID()); - result += "@"; - result += mVoiceSIPURIHostName; - } - - return result; -} - -std::string LLVoiceClient::nameFromAvatar(LLVOAvatar *avatar) -{ - std::string result; - if(avatar) - { - result = nameFromID(avatar->getID()); - } - return result; -} - -std::string LLVoiceClient::nameFromID(const LLUUID &uuid) -{ - std::string result; - - if (uuid.isNull()) { - //VIVOX, the uuid emtpy look for the mURIString and return that instead. - //result.assign(uuid.mURIStringName); - LLStringUtil::replaceChar(result, '_', ' '); - return result; - } - // Prepending this apparently prevents conflicts with reserved names inside the vivox and diamondware code. - result = "x"; - - // Base64 encode and replace the pieces of base64 that are less compatible - // with e-mail local-parts. - // See RFC-4648 "Base 64 Encoding with URL and Filename Safe Alphabet" - result += LLBase64::encode(uuid.mData, UUID_BYTES); - LLStringUtil::replaceChar(result, '+', '-'); - LLStringUtil::replaceChar(result, '/', '_'); - - // If you need to transform a GUID to this form on the Mac OS X command line, this will do so: - // echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-') - - // The reverse transform can be done with: - // echo 'x5mkTKmxDTuGnjWyC__WfMg==' |cut -b 2- -|tr '_-' '/+' |openssl base64 -d|xxd -p - - return result; -} - -bool LLVoiceClient::IDFromName(const std::string inName, LLUUID &uuid) -{ - bool result = false; - - // SLIM SDK: The "name" may actually be a SIP URI such as: "sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com" - // If it is, convert to a bare name before doing the transform. - std::string name = nameFromsipURI(inName); - - // Doesn't look like a SIP URI, assume it's an actual name. - if(name.empty()) - name = inName; - - // This will only work if the name is of the proper form. - // As an example, the account name for Monroe Linden (UUID 1673cfd3-8229-4445-8d92-ec3570e5e587) is: - // "xFnPP04IpREWNkuw1cOXlhw==" - - if((name.size() == 25) && (name[0] == 'x') && (name[23] == '=') && (name[24] == '=')) - { - // The name appears to have the right form. - - // Reverse the transforms done by nameFromID - std::string temp = name; - LLStringUtil::replaceChar(temp, '-', '+'); - LLStringUtil::replaceChar(temp, '_', '/'); - - U8 rawuuid[UUID_BYTES + 1]; - int len = apr_base64_decode_binary(rawuuid, temp.c_str() + 1); - if(len == UUID_BYTES) - { - // The decode succeeded. Stuff the bits into the result's UUID - memcpy(uuid.mData, rawuuid, UUID_BYTES); - result = true; - } - } - - if(!result) + else { - // VIVOX: not a standard account name, just copy the URI name mURIString field - // and hope for the best. bpj - uuid.setNull(); // VIVOX, set the uuid field to nulls + return false; } - - return result; } -std::string LLVoiceClient::displayNameFromAvatar(LLVOAvatar *avatar) +void LLVoiceClient::declineInvite(std::string &channelHandle) { - return avatar->getFullname(); + if (mVoiceModule) mVoiceModule->declineInvite(channelHandle); } -std::string LLVoiceClient::sipURIFromName(std::string &name) -{ - std::string result; - result = "sip:"; - result += name; - result += "@"; - result += mVoiceSIPURIHostName; -// LLStringUtil::toLower(result); +//------------------------------------------ +// Volume/gain - return result; -} -std::string LLVoiceClient::nameFromsipURI(const std::string &uri) -{ - std::string result; - - std::string::size_type sipOffset, atOffset; - sipOffset = uri.find("sip:"); - atOffset = uri.find("@"); - if((sipOffset != std::string::npos) && (atOffset != std::string::npos)) - { - result = uri.substr(sipOffset + 4, atOffset - (sipOffset + 4)); - } - - return result; -} - -bool LLVoiceClient::inSpatialChannel(void) -{ - bool result = false; - - if(mAudioSession) - result = mAudioSession->mIsSpatial; - - return result; -} - -std::string LLVoiceClient::getAudioSessionURI() +void LLVoiceClient::setVoiceVolume(F32 volume) { - std::string result; - - if(mAudioSession) - result = mAudioSession->mSIPURI; - - return result; + if (mVoiceModule) mVoiceModule->setVoiceVolume(volume); } -std::string LLVoiceClient::getAudioSessionHandle() +void LLVoiceClient::setMicGain(F32 volume) { - std::string result; - - if(mAudioSession) - result = mAudioSession->mHandle; - - return result; + if (mVoiceModule) mVoiceModule->setMicGain(volume); } -///////////////////////////// -// Sending updates of current state +//------------------------------------------ +// enable/disable voice features -void LLVoiceClient::enforceTether(void) +bool LLVoiceClient::voiceEnabled() { - LLVector3d tethered = mCameraRequestedPosition; - - // constrain 'tethered' to within 50m of mAvatarPosition. + if (mVoiceModule) { - F32 max_dist = 50.0f; - LLVector3d camera_offset = mCameraRequestedPosition - mAvatarPosition; - F32 camera_distance = (F32)camera_offset.magVec(); - if(camera_distance > max_dist) - { - tethered = mAvatarPosition + - (max_dist / camera_distance) * camera_offset; - } + return mVoiceModule->voiceEnabled(); } - - if(dist_vec(mCameraPosition, tethered) > 0.1) + else { - mCameraPosition = tethered; - mSpatialCoordsDirty = true; + return false; } } -void LLVoiceClient::updatePosition(void) -{ - if(gVoiceClient) - { - LLViewerRegion *region = gAgent.getRegion(); - if(region && isAgentAvatarValid()) - { - LLMatrix3 rot; - LLVector3d pos; - - // TODO: If camera and avatar velocity are actually used by the voice system, we could compute them here... - // They're currently always set to zero. - - // Send the current camera position to the voice code - rot.setRows(LLViewerCamera::getInstance()->getAtAxis(), LLViewerCamera::getInstance()->getLeftAxis (), LLViewerCamera::getInstance()->getUpAxis()); - pos = gAgent.getRegion()->getPosGlobalFromRegion(LLViewerCamera::getInstance()->getOrigin()); - - gVoiceClient->setCameraPosition( - pos, // position - LLVector3::zero, // velocity - rot); // rotation matrix - - // Send the current avatar position to the voice code - rot = gAgentAvatarp->getRootJoint()->getWorldRotation().getMatrix3(); - - pos = gAgentAvatarp->getPositionGlobal(); - // TODO: Can we get the head offset from outside the LLVOAvatar? -// pos += LLVector3d(mHeadOffset); - pos += LLVector3d(0.f, 0.f, 1.f); - - gVoiceClient->setAvatarPosition( - pos, // position - LLVector3::zero, // velocity - rot); // rotation matrix - } - } -} - -void LLVoiceClient::setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +void LLVoiceClient::setVoiceEnabled(bool enabled) { - mCameraRequestedPosition = position; - - if(mCameraVelocity != velocity) - { - mCameraVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mCameraRot != rot) - { - mCameraRot = rot; - mSpatialCoordsDirty = true; - } + if (mVoiceModule) mVoiceModule->setVoiceEnabled(enabled); } -void LLVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +void LLVoiceClient::setLipSyncEnabled(BOOL enabled) { - if(dist_vec(mAvatarPosition, position) > 0.1) - { - mAvatarPosition = position; - mSpatialCoordsDirty = true; - } - - if(mAvatarVelocity != velocity) - { - mAvatarVelocity = velocity; - mSpatialCoordsDirty = true; - } - - if(mAvatarRot != rot) - { - mAvatarRot = rot; - mSpatialCoordsDirty = true; - } + if (mVoiceModule) mVoiceModule->setLipSyncEnabled(enabled); } -bool LLVoiceClient::channelFromRegion(LLViewerRegion *region, std::string &name) +BOOL LLVoiceClient::lipSyncEnabled() { - bool result = false; - - if(region) + if (mVoiceModule) { - name = region->getName(); + return mVoiceModule->lipSyncEnabled(); } - - if(!name.empty()) - result = true; - - return result; -} - -void LLVoiceClient::leaveChannel(void) -{ - if(getState() == stateRunning) + else { - LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; - mChannelName.clear(); - sessionTerminate(); + return false; } } void LLVoiceClient::setMuteMic(bool muted) { - mMuteMic = muted; + if (mVoiceModule) mVoiceModule->setMuteMic(muted); } -bool LLVoiceClient::getMuteMic() const -{ - return mMuteMic; -} + +// ---------------------------------------------- +// PTT void LLVoiceClient::setUserPTTState(bool ptt) { - mUserPTTState = ptt; + if (mVoiceModule) mVoiceModule->setUserPTTState(ptt); } bool LLVoiceClient::getUserPTTState() { - return mUserPTTState; -} - -void LLVoiceClient::toggleUserPTTState(void) -{ - mUserPTTState = !mUserPTTState; -} - -void LLVoiceClient::setVoiceEnabled(bool enabled) -{ - if (enabled != mVoiceEnabled) - { - mVoiceEnabled = enabled; - LLVoiceClientStatusObserver::EStatusType status; - - if (enabled) - { - LLVoiceChannel::getCurrentVoiceChannel()->activate(); - status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED; - } - else - { - // Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. - LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); - status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; - } - - notifyStatusObservers(status); - } -} - -bool LLVoiceClient::voiceEnabled() -{ - return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); -} - -//AD *TODO: investigate possible merge of voiceWorking() and voiceEnabled() into one non-static method -bool LLVoiceClient::voiceWorking() -{ - //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) - // Condition with joining spatial num was added to take into account possible problems with connection to voice - // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. - return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); -} - -void LLVoiceClient::setLipSyncEnabled(BOOL enabled) -{ - mLipSyncEnabled = enabled; -} - -BOOL LLVoiceClient::lipSyncEnabled() -{ - - if ( mVoiceEnabled && stateDisabled != getState() ) + if (mVoiceModule) { - return mLipSyncEnabled; + return mVoiceModule->getUserPTTState(); } else { - return FALSE; + return false; } } void LLVoiceClient::setUsePTT(bool usePTT) { - if(usePTT && !mUsePTT) - { - // When the user turns on PTT, reset the current state. - mUserPTTState = false; - } - mUsePTT = usePTT; + if (mVoiceModule) mVoiceModule->setUsePTT(usePTT); } void LLVoiceClient::setPTTIsToggle(bool PTTIsToggle) { - if(!PTTIsToggle && mPTTIsToggle) - { - // When the user turns off toggle, reset the current state. - mUserPTTState = false; - } - - mPTTIsToggle = PTTIsToggle; + if (mVoiceModule) mVoiceModule->setPTTIsToggle(PTTIsToggle); } bool LLVoiceClient::getPTTIsToggle() { - return mPTTIsToggle; -} - -void LLVoiceClient::setPTTKey(std::string &key) -{ - if(key == "MiddleMouse") + if (mVoiceModule) { - mPTTIsMiddleMouse = true; + return mVoiceModule->getPTTIsToggle(); } - else - { - mPTTIsMiddleMouse = false; - if(!LLKeyboard::keyFromString(key, &mPTTKey)) - { - // If the call failed, don't match any key. - key = KEY_NONE; - } + else { + return false; } -} -void LLVoiceClient::setEarLocation(S32 loc) -{ - if(mEarLocation != loc) - { - LL_DEBUGS("Voice") << "Setting mEarLocation to " << loc << LL_ENDL; - - mEarLocation = loc; - mSpatialCoordsDirty = true; - } } -void LLVoiceClient::setVoiceVolume(F32 volume) +void LLVoiceClient::inputUserControlState(bool down) { - int scaled_volume = scale_speaker_volume(volume); - - if(scaled_volume != mSpeakerVolume) - { - int min_volume = scale_speaker_volume(0); - if((scaled_volume == min_volume) || (mSpeakerVolume == min_volume)) - { - mSpeakerMuteDirty = true; - } - - mSpeakerVolume = scaled_volume; - mSpeakerVolumeDirty = true; - } + if (mVoiceModule) mVoiceModule->inputUserControlState(down); } -void LLVoiceClient::setMicGain(F32 volume) +void LLVoiceClient::toggleUserPTTState(void) { - int scaled_volume = scale_mic_volume(volume); - - if(scaled_volume != mMicVolume) - { - mMicVolume = scaled_volume; - mMicVolumeDirty = true; - } + if (mVoiceModule) mVoiceModule->toggleUserPTTState(); } void LLVoiceClient::keyDown(KEY key, MASK mask) { - if (gKeyboard->getKeyRepeated(key)) - { - // ignore auto-repeat keys - return; - } - - if(!mPTTIsMiddleMouse) - { - bool down = (mPTTKey != KEY_NONE) - && gKeyboard->getKeyDown(mPTTKey); - inputUserControlState(down); - } + if (mVoiceModule) mVoiceModule->keyDown(key, mask); } void LLVoiceClient::keyUp(KEY key, MASK mask) { - if(!mPTTIsMiddleMouse) - { - bool down = (mPTTKey != KEY_NONE) - && gKeyboard->getKeyDown(mPTTKey); - inputUserControlState(down); - } -} -void LLVoiceClient::inputUserControlState(bool down) -{ - if(mPTTIsToggle) - { - if(down) // toggle open-mic state on 'down' - { - toggleUserPTTState(); - } - } - else // set open-mic state as an absolute - { - setUserPTTState(down); - } + if (mVoiceModule) mVoiceModule->keyUp(key, mask); } void LLVoiceClient::middleMouseState(bool down) { - if(mPTTIsMiddleMouse) - { - inputUserControlState(down); - } + if (mVoiceModule) mVoiceModule->middleMouseState(down); } -///////////////////////////// -// Accessors for data related to nearby speakers + +//------------------------------------------- +// nearby speaker accessors + BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) { - BOOL result = FALSE; - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - // I'm not sure what the semantics of this should be. - // For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled. - result = TRUE; - } - - return result; -} - -BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) -{ - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + return mVoiceModule->getVoiceEnabled(id); + } + else { - if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT) - { - participant->mIsSpeaking = FALSE; - } - result = participant->mIsSpeaking; + return FALSE; } - - return result; } -BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) +std::string LLVoiceClient::getDisplayName(const LLUUID& id) { - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mIsModeratorMuted; + return mVoiceModule->getDisplayName(id); } - - return result; -} - -F32 LLVoiceClient::getCurrentPower(const LLUUID& id) -{ - F32 result = 0; - participantState *participant = findParticipantByID(id); - if(participant) + else { - result = participant->mPower; + return std::string(); } - - return result; } - -std::string LLVoiceClient::getDisplayName(const LLUUID& id) +bool LLVoiceClient::isVoiceWorking() { - std::string result; - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mDisplayName; + return mVoiceModule->isVoiceWorking(); } - - return result; + return false; } - -BOOL LLVoiceClient::getUsingPTT(const LLUUID& id) +BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id) { - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - // I'm not sure what the semantics of this should be. - // Does "using PTT" mean they're configured with a push-to-talk button? - // For now, we know there's no PTT mechanism in place, so nobody is using it. + return mVoiceModule->isParticipantAvatar(id); } - - return result; -} - -BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) -{ - BOOL result = FALSE; - - participantState *participant = findParticipantByID(id); - if(participant) + else { - result = participant->mOnMuteList; + return FALSE; } - - return result; } -// External accessors. -F32 LLVoiceClient::getUserVolume(const LLUUID& id) +BOOL LLVoiceClient::isOnlineSIP(const LLUUID& id) { - // Minimum volume will be returned for users with voice disabled - F32 result = VOLUME_MIN; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mVolume; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. - // LL_DEBUGS("Voice") << "mVolume = " << result << " for " << id << LL_ENDL; + return mVoiceModule->isOnlineSIP(id); } - - return result; -} - -void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) -{ - if(mAudioSession) + else { - participantState *participant = findParticipantByID(id); - if (participant && !participant->mIsSelf) - { - if (!is_approx_equal(volume, VOLUME_DEFAULT)) - { - // Store this volume setting for future sessions if it has been - // changed from the default - LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); - } - else - { - // Remove stored volume setting if it is returned to the default - LLSpeakerVolumeStorage::getInstance()->removeSpeakerVolume(id); - } - - participant->mVolume = llclamp(volume, VOLUME_MIN, VOLUME_MAX); - participant->mVolumeDirty = true; - mAudioSession->mVolumeDirty = true; - } + return FALSE; } } -std::string LLVoiceClient::getGroupID(const LLUUID& id) +BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) { - std::string result; - - participantState *participant = findParticipantByID(id); - if(participant) + if (mVoiceModule) { - result = participant->mGroupID; + return mVoiceModule->getIsSpeaking(id); } - - return result; -} - -BOOL LLVoiceClient::getAreaVoiceDisabled() -{ - return mAreaVoiceDisabled; -} - -void LLVoiceClient::recordingLoopStart(int seconds, int deltaFramesPerControlFrame) -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Start)" << LL_ENDL; - - if(!mMainSessionGroupHandle.empty()) + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Start</RecordingControlType>" - << "<DeltaFramesPerControlFrame>" << deltaFramesPerControlFrame << "</DeltaFramesPerControlFrame>" - << "<Filename>" << "" << "</Filename>" - << "<EnableAudioRecordingEvents>false</EnableAudioRecordingEvents>" - << "<LoopModeDurationSeconds>" << seconds << "</LoopModeDurationSeconds>" - << "</Request>\n\n\n"; - - - writeString(stream.str()); + return FALSE; } } -void LLVoiceClient::recordingLoopSave(const std::string& filename) +BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Flush)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + if (mVoiceModule) { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Flush</RecordingControlType>" - << "<Filename>" << filename << "</Filename>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return mVoiceModule->getIsModeratorMuted(id); } -} - -void LLVoiceClient::recordingStop() -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Stop)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Stop</RecordingControlType>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return FALSE; } } -void LLVoiceClient::filePlaybackStart(const std::string& filename) -{ -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Start)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) +F32 LLVoiceClient::getCurrentPower(const LLUUID& id) +{ + if (mVoiceModule) + { + return mVoiceModule->getCurrentPower(id); + } + else { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Start</RecordingControlType>" - << "<Filename>" << filename << "</Filename>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return 0.0; } } -void LLVoiceClient::filePlaybackStop() +BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) { -// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Stop)" << LL_ENDL; - - if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + if (mVoiceModule) { - std::ostringstream stream; - stream - << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" - << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" - << "<RecordingControlType>Stop</RecordingControlType>" - << "</Request>\n\n\n"; - - writeString(stream.str()); + return mVoiceModule->getOnMuteList(id); + } + else + { + return FALSE; } } -void LLVoiceClient::filePlaybackSetPaused(bool paused) +F32 LLVoiceClient::getUserVolume(const LLUUID& id) { - // TODO: Implement once Vivox gives me a sample + if (mVoiceModule) + { + return mVoiceModule->getUserVolume(id); + } + else + { + return 0.0; + } } -void LLVoiceClient::filePlaybackSetMode(bool vox, float speed) +void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { - // TODO: Implement once Vivox gives me a sample + if (mVoiceModule) mVoiceModule->setUserVolume(id, volume); } -LLVoiceClient::sessionState::sessionState() : - mErrorStatusCode(0), - mMediaStreamState(streamStateUnknown), - mTextStreamState(streamStateUnknown), - mCreateInProgress(false), - mMediaConnectInProgress(false), - mVoiceInvitePending(false), - mTextInvitePending(false), - mSynthesizedCallerID(false), - mIsChannel(false), - mIsSpatial(false), - mIsP2P(false), - mIncoming(false), - mVoiceEnabled(false), - mReconnect(false), - mVolumeDirty(false), - mMuteDirty(false), - mParticipantsChanged(false) -{ -} +//-------------------------------------------------- +// status observers -LLVoiceClient::sessionState::~sessionState() +void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { - removeAllParticipants(); + if (mVoiceModule) mVoiceModule->addObserver(observer); } -bool LLVoiceClient::sessionState::isCallBackPossible() +void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { - // This may change to be explicitly specified by vivox in the future... - // Currently, only PSTN P2P calls cannot be returned. - // Conveniently, this is also the only case where we synthesize a caller UUID. - return !mSynthesizedCallerID; + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -bool LLVoiceClient::sessionState::isTextIMPossible() +void LLVoiceClient::addObserver(LLFriendObserver* observer) { - // This may change to be explicitly specified by vivox in the future... - return !mSynthesizedCallerID; + if (mVoiceModule) mVoiceModule->addObserver(observer); } - -LLVoiceClient::sessionIterator LLVoiceClient::sessionsBegin(void) +void LLVoiceClient::removeObserver(LLFriendObserver* observer) { - return mSessions.begin(); + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -LLVoiceClient::sessionIterator LLVoiceClient::sessionsEnd(void) +void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { - return mSessions.end(); + if (mVoiceModule) mVoiceModule->addObserver(observer); } - -LLVoiceClient::sessionState *LLVoiceClient::findSession(const std::string &handle) -{ - sessionState *result = NULL; - sessionMap::iterator iter = mSessionsByHandle.find(&handle); - if(iter != mSessionsByHandle.end()) - { - result = iter->second; - } - - return result; -} - -LLVoiceClient::sessionState *LLVoiceClient::findSessionBeingCreatedByURI(const std::string &uri) -{ - sessionState *result = NULL; - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *session = *iter; - if(session->mCreateInProgress && (session->mSIPURI == uri)) - { - result = session; - break; - } - } - - return result; -} - -LLVoiceClient::sessionState *LLVoiceClient::findSession(const LLUUID &participant_id) +void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { - sessionState *result = NULL; - - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *session = *iter; - if((session->mCallerID == participant_id) || (session->mIMSessionID == participant_id)) - { - result = session; - break; - } - } - - return result; + if (mVoiceModule) mVoiceModule->removeObserver(observer); } -LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, const std::string &handle) +std::string LLVoiceClient::sipURIFromID(const LLUUID &id) { - sessionState *result = NULL; - - if(handle.empty()) + if (mVoiceModule) { - // No handle supplied. - // Check whether there's already a session with this URI - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) - { - sessionState *s = *iter; - if((s->mSIPURI == uri) || (s->mAlternateSIPURI == uri)) - { - // TODO: I need to think about this logic... it's possible that this case should raise an internal error. - result = s; - break; - } - } - } - else // (!handle.empty()) - { - // Check for an existing session with this handle - sessionMap::iterator iter = mSessionsByHandle.find(&handle); - - if(iter != mSessionsByHandle.end()) - { - result = iter->second; - } - } - - if(!result) - { - // No existing session found. - - LL_DEBUGS("Voice") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; - result = new sessionState(); - result->mSIPURI = uri; - result->mHandle = handle; - - mSessions.insert(result); - - if(!result->mHandle.empty()) - { - mSessionsByHandle.insert(sessionMap::value_type(&(result->mHandle), result)); - } + return mVoiceModule->sipURIFromID(id); } else { - // Found an existing session - - if(uri != result->mSIPURI) - { - // TODO: Should this be an internal error? - LL_DEBUGS("Voice") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; - setSessionURI(result, uri); - } - - if(handle != result->mHandle) - { - if(handle.empty()) - { - // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. - LL_DEBUGS("Voice") << "NOT clearing handle " << result->mHandle << LL_ENDL; - } - else - { - // TODO: Should this be an internal error? - LL_DEBUGS("Voice") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; - setSessionHandle(result, handle); - } - } - - LL_DEBUGS("Voice") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; - } - - verifySessionState(); - - return result; -} - -void LLVoiceClient::setSessionHandle(sessionState *session, const std::string &handle) -{ - // Have to remove the session from the handle-indexed map before changing the handle, or things will break badly. - - if(!session->mHandle.empty()) - { - // Remove session from the map if it should have been there. - sessionMap::iterator iter = mSessionsByHandle.find(&(session->mHandle)); - if(iter != mSessionsByHandle.end()) - { - if(iter->second != session) - { - LL_ERRS("Voice") << "Internal error: session mismatch!" << LL_ENDL; - } - - mSessionsByHandle.erase(iter); - } - else - { - LL_ERRS("Voice") << "Internal error: session handle not found in map!" << LL_ENDL; - } + return std::string(); } - - session->mHandle = handle; - - if(!handle.empty()) - { - mSessionsByHandle.insert(sessionMap::value_type(&(session->mHandle), session)); - } - - verifySessionState(); } -void LLVoiceClient::setSessionURI(sessionState *session, const std::string &uri) -{ - // There used to be a map of session URIs to sessions, which made this complex.... - session->mSIPURI = uri; - verifySessionState(); -} +/////////////////// +// version checking -void LLVoiceClient::deleteSession(sessionState *session) +class LLViewerRequiredVoiceVersion : public LLHTTPNode { - // Remove the session from the handle map - if(!session->mHandle.empty()) + static BOOL sAlertedUser; + virtual void post( + LLHTTPNode::ResponsePtr response, + const LLSD& context, + const LLSD& input) const { - sessionMap::iterator iter = mSessionsByHandle.find(&(session->mHandle)); - if(iter != mSessionsByHandle.end()) + //You received this messsage (most likely on region cross or + //teleport) + if ( input.has("body") && input["body"].has("major_version") ) { - if(iter->second != session) + int major_voice_version = + input["body"]["major_version"].asInteger(); + // int minor_voice_version = + // input["body"]["minor_version"].asInteger(); + LLVoiceVersionInfo versionInfo = LLVoiceClient::getInstance()->getVersion(); + + if (major_voice_version > 1) { - LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; + if (!sAlertedUser) + { + //sAlertedUser = TRUE; + LLNotificationsUtil::add("VoiceVersionMismatch"); + gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener + } } - mSessionsByHandle.erase(iter); } } +}; - // Remove the session from the URI map - mSessions.erase(session); - - // At this point, the session should be unhooked from all lists and all state should be consistent. - verifySessionState(); - - // If this is the current audio session, clean up the pointer which will soon be dangling. - if(mAudioSession == session) - { - mAudioSession = NULL; - mAudioSessionChanged = true; - } - - // ditto for the next audio session - if(mNextAudioSession == session) - { - mNextAudioSession = NULL; - } - - // delete the session - delete session; -} - -void LLVoiceClient::deleteAllSessions() -{ - LL_DEBUGS("Voice") << "called" << LL_ENDL; - - while(!mSessions.empty()) - { - deleteSession(*(sessionsBegin())); - } - - if(!mSessionsByHandle.empty()) - { - LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; - } -} - -void LLVoiceClient::verifySessionState(void) +class LLViewerParcelVoiceInfo : public LLHTTPNode { - // This is mostly intended for debugging problems with session state management. - LL_DEBUGS("Voice") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; - - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + virtual void post( + LLHTTPNode::ResponsePtr response, + const LLSD& context, + const LLSD& input) const { - sessionState *session = *iter; - - LL_DEBUGS("Voice") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; + //the parcel you are in has changed something about its + //voice information - if(!session->mHandle.empty()) + //this is a misnomer, as it can also be when you are not in + //a parcel at all. Should really be something like + //LLViewerVoiceInfoChanged..... + if ( input.has("body") ) { - // every session with a non-empty handle needs to be in the handle map - sessionMap::iterator i2 = mSessionsByHandle.find(&(session->mHandle)); - if(i2 == mSessionsByHandle.end()) - { - LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; - } - else + LLSD body = input["body"]; + + //body has "region_name" (str), "parcel_local_id"(int), + //"voice_credentials" (map). + + //body["voice_credentials"] has "channel_uri" (str), + //body["voice_credentials"] has "channel_credentials" (str) + + //if we really wanted to be extra careful, + //we'd check the supplied + //local parcel id to make sure it's for the same parcel + //we believe we're in + if ( body.has("voice_credentials") ) { - if(i2->second != session) + LLSD voice_credentials = body["voice_credentials"]; + std::string uri; + std::string credentials; + + if ( voice_credentials.has("channel_uri") ) { - LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; + uri = voice_credentials["channel_uri"].asString(); } + if ( voice_credentials.has("channel_credentials") ) + { + credentials = + voice_credentials["channel_credentials"].asString(); + } + + LLVoiceClient::getInstance()->setSpatialChannel(uri, credentials); } } } - - // check that every entry in the handle map points to a valid session in the session set - for(sessionMap::iterator iter = mSessionsByHandle.begin(); iter != mSessionsByHandle.end(); iter++) - { - sessionState *session = iter->second; - sessionIterator i2 = mSessions.find(session); - if(i2 == mSessions.end()) - { - LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; - } - else - { - if(session->mHandle != (*i2)->mHandle) - { - LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; - } - } - } -} +}; -LLVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) : - mURI(uri) -{ - mOnlineSL = false; - mOnlineSLim = false; - mCanSeeMeOnline = true; - mHasBlockListEntry = false; - mHasAutoAcceptListEntry = false; - mNameResolved = false; - mInVivoxBuddies = false; - mInSLFriends = false; - mNeedsNameUpdate = false; -} +const std::string LLSpeakerVolumeStorage::SETTINGS_FILE_NAME = "volume_settings.xml"; -void LLVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName) +LLSpeakerVolumeStorage::LLSpeakerVolumeStorage() { - buddyListEntry *buddy = addBuddy(uri, displayName); - buddy->mInVivoxBuddies = true; + load(); } -LLVoiceClient::buddyListEntry *LLVoiceClient::addBuddy(const std::string &uri) +LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() { - std::string empty; - buddyListEntry *buddy = addBuddy(uri, empty); - if(buddy->mDisplayName.empty()) - { - buddy->mNameResolved = false; - } - return buddy; + save(); } -LLVoiceClient::buddyListEntry *LLVoiceClient::addBuddy(const std::string &uri, const std::string &displayName) +void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) { - buddyListEntry *result = NULL; - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - - if(iter != mBuddyListMap.end()) - { - // Found a matching buddy already in the map. - LL_DEBUGS("Voice") << "adding existing buddy " << uri << LL_ENDL; - result = iter->second; - } - - if(!result) + if ((volume >= LLVoiceClient::VOLUME_MIN) && (volume <= LLVoiceClient::VOLUME_MAX)) { - // participant isn't already in one list or the other. - LL_DEBUGS("Voice") << "adding new buddy " << uri << LL_ENDL; - result = new buddyListEntry(uri); - result->mDisplayName = displayName; - - if(IDFromName(uri, result->mUUID)) - { - // Extracted UUID from name successfully. - } - else - { - LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL; - } - - mBuddyListMap.insert(buddyListMap::value_type(&(result->mURI), result)); - } - - return result; -} + mSpeakersData[speaker_id] = volume; -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddy(const std::string &uri) -{ - buddyListEntry *result = NULL; - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - if(iter != mBuddyListMap.end()) - { - result = iter->second; + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Stored volume = " << volume << " for " << id << LL_ENDL; } - - return result; -} - -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddy(const LLUUID &id) -{ - buddyListEntry *result = NULL; - buddyListMap::iterator iter; - - for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + else { - if(iter->second->mUUID == id) - { - result = iter->second; - break; - } + LL_WARNS("Voice") << "Attempted to store out of range volume " << volume << " for " << speaker_id << LL_ENDL; + llassert(0); } - - return result; } -LLVoiceClient::buddyListEntry *LLVoiceClient::findBuddyByDisplayName(const std::string &name) +bool LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id, F32& volume) { - buddyListEntry *result = NULL; - buddyListMap::iterator iter; - - for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) - { - if(iter->second->mDisplayName == name) - { - result = iter->second; - break; - } - } + speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); - return result; -} - -void LLVoiceClient::deleteBuddy(const std::string &uri) -{ - buddyListMap::iterator iter = mBuddyListMap.find(&uri); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "deleting buddy " << uri << LL_ENDL; - buddyListEntry *buddy = iter->second; - mBuddyListMap.erase(iter); - delete buddy; - } - else + if (it != mSpeakersData.end()) { - LL_DEBUGS("Voice") << "attempt to delete nonexistent buddy " << uri << LL_ENDL; - } - -} + volume = it->second; -void LLVoiceClient::deleteAllBuddies(void) -{ - while(!mBuddyListMap.empty()) - { - deleteBuddy(*(mBuddyListMap.begin()->first)); - } - - // Don't want to correlate with friends list when we've emptied the buddy list. - mBuddyListMapPopulated = false; - - // Don't want to correlate with friends list when we've reset the block rules. - mBlockRulesListReceived = false; - mAutoAcceptRulesListReceived = false; -} + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Retrieved stored volume = " << volume << " for " << id << LL_ENDL; -void LLVoiceClient::deleteAllBlockRules(void) -{ - // Clear the block list entry flags from all local buddy list entries - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - buddy_it->second->mHasBlockListEntry = false; + return true; } -} -void LLVoiceClient::deleteAllAutoAcceptRules(void) -{ - // Clear the auto-accept list entry flags from all local buddy list entries - buddyListMap::iterator buddy_it; - for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) - { - buddy_it->second->mHasAutoAcceptListEntry = false; - } + return false; } -void LLVoiceClient::addBlockRule(const std::string &blockMask, const std::string &presenceOnly) +void LLSpeakerVolumeStorage::removeSpeakerVolume(const LLUUID& speaker_id) { - buddyListEntry *buddy = NULL; - - // blockMask is the SIP URI of a friends list entry - buddyListMap::iterator iter = mBuddyListMap.find(&blockMask); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "block list entry for " << blockMask << LL_ENDL; - buddy = iter->second; - } + mSpeakersData.erase(speaker_id); - if(buddy == NULL) - { - LL_DEBUGS("Voice") << "block list entry for unknown buddy " << blockMask << LL_ENDL; - buddy = addBuddy(blockMask); - } - - if(buddy != NULL) - { - buddy->mHasBlockListEntry = true; - } + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Removing stored volume for " << id << LL_ENDL; } -void LLVoiceClient::addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy) +/* static */ F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in) { - buddyListEntry *buddy = NULL; + // Convert to linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // from legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.5, volume_out = 0.56 - // blockMask is the SIP URI of a friends list entry - buddyListMap::iterator iter = mBuddyListMap.find(&autoAcceptMask); - if(iter != mBuddyListMap.end()) - { - LL_DEBUGS("Voice") << "auto-accept list entry for " << autoAcceptMask << LL_ENDL; - buddy = iter->second; - } + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); - if(buddy == NULL) + if (volume_in <= 0.5f) { - LL_DEBUGS("Voice") << "auto-accept list entry for unknown buddy " << autoAcceptMask << LL_ENDL; - buddy = addBuddy(autoAcceptMask); + volume_out = volume_in * volume_in * 4.f * 0.56f; } - - if(buddy != NULL) + else { - buddy->mHasAutoAcceptListEntry = true; + volume_out = (1.f - 0.56f) * (4.f * volume_in * volume_in - 1.f) / 3.f + 0.56f; } -} - -void LLVoiceClient::accountListBlockRulesResponse(int statusCode, const std::string &statusString) -{ - // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. - mBlockRulesListReceived = true; -} - -void LLVoiceClient::accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString) -{ - // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. - mAutoAcceptRulesListReceived = true; -} -void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) -{ - mParticipantObservers.insert(observer); -} - -void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) -{ - mParticipantObservers.erase(observer); -} - -void LLVoiceClient::notifyParticipantObservers() -{ - for (observer_set_t::iterator it = mParticipantObservers.begin(); - it != mParticipantObservers.end(); - ) - { - LLVoiceClientParticipantObserver* observer = *it; - observer->onChange(); - // In case onChange() deleted an entry. - it = mParticipantObservers.upper_bound(observer); - } + return volume_out; } -void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) +/* static */ F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in) { - mStatusObservers.insert(observer); -} + // Convert from linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // to legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.56, volume_out = 0.5 -void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) -{ - mStatusObservers.erase(observer); -} + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); -void LLVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status) -{ - if(mAudioSession) + if (volume_in <= 0.56f) { - if(status == LLVoiceClientStatusObserver::ERROR_UNKNOWN) - { - switch(mAudioSession->mErrorStatusCode) - { - case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; - case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; - case 20715: - //invalid channel, we may be using a set of poorly cached - //info - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - break; - case 1009: - //invalid username and password - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - break; - } - - // Reset the error code to make sure it won't be reused later by accident. - mAudioSession->mErrorStatusCode = 0; - } - else if(status == LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) - { - switch(mAudioSession->mErrorStatusCode) - { - case 404: // NOT_FOUND - case 480: // TEMPORARILY_UNAVAILABLE - case 408: // REQUEST_TIMEOUT - // call failed because other user was not available - // treat this as an error case - status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; - - // Reset the error code to make sure it won't be reused later by accident. - mAudioSession->mErrorStatusCode = 0; - break; - } - } + volume_out = sqrt(volume_in / (4.f * 0.56f)); } - - LL_DEBUGS("Voice") - << " " << LLVoiceClientStatusObserver::status2string(status) - << ", session URI " << getAudioSessionURI() - << (inSpatialChannel()?", proximal is true":", proximal is false") - << LL_ENDL; - - for (status_observer_set_t::iterator it = mStatusObservers.begin(); - it != mStatusObservers.end(); - ) + else { - LLVoiceClientStatusObserver* observer = *it; - observer->onChange(status, getAudioSessionURI(), inSpatialChannel()); - // In case onError() deleted an entry. - it = mStatusObservers.upper_bound(observer); + volume_out = sqrt((3.f * (volume_in - 0.56f) / (1.f - 0.56f) + 1.f) / 4.f); } + return volume_out; } -void LLVoiceClient::addObserver(LLFriendObserver* observer) -{ - mFriendObservers.insert(observer); -} - -void LLVoiceClient::removeObserver(LLFriendObserver* observer) -{ - mFriendObservers.erase(observer); -} - -void LLVoiceClient::notifyFriendObservers() +void LLSpeakerVolumeStorage::load() { - for (friend_observer_set_t::iterator it = mFriendObservers.begin(); - it != mFriendObservers.end(); - ) - { - LLFriendObserver* observer = *it; - it++; - // The only friend-related thing we notify on is online/offline transitions. - observer->changed(LLFriendObserver::ONLINE); - } -} + // load per-resident voice volume information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); -void LLVoiceClient::lookupName(const LLUUID &id) -{ - BOOL is_group = FALSE; - gCacheName->get(id, is_group, &LLVoiceClient::onAvatarNameLookup); -} + LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; -//static -void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) -{ - if(gVoiceClient) + LLSD settings_llsd; + llifstream file; + file.open(filename); + if (file.is_open()) { - std::string name = llformat("%s %s", first.c_str(), last.c_str()); - gVoiceClient->avatarNameResolved(id, name); + LLSDSerialize::fromXML(settings_llsd, file); } -} -void LLVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) -{ - // If the avatar whose name just resolved is on our friends list, resync the friends list. - if(LLAvatarTracker::instance().getBuddyInfo(id) != NULL) - { - mFriendsListDirty = true; - } - - // Iterate over all sessions. - for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter) { - sessionState *session = *iter; - - // Check for this user as a participant in this session - participantState *participant = session->findParticipantByID(id); - if(participant) - { - // Found -- fill in the name - participant->mAccountName = name; - // and post a "participants updated" message to listeners later. - session->mParticipantsChanged = true; - } - - // Check whether this is a p2p session whose caller name just resolved - if(session->mCallerID == id) - { - // this session's "caller ID" just resolved. Fill in the name. - session->mName = name; - if(session->mTextInvitePending) - { - session->mTextInvitePending = false; + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); - // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel. - } - if(session->mVoiceInvitePending) - { - session->mVoiceInvitePending = false; - - gIMMgr->inviteToSession( - session->mIMSessionID, - session->mName, - session->mCallerID, - session->mName, - IM_SESSION_P2P_INVITE, - LLIMMgr::INVITATION_TYPE_VOICE, - session->mHandle, - session->mSIPURI); - } - - } + storeSpeakerVolume(LLUUID(iter->first), volume); } } -class LLViewerParcelVoiceInfo : public LLHTTPNode +void LLSpeakerVolumeStorage::save() { - virtual void post( - LLHTTPNode::ResponsePtr response, - const LLSD& context, - const LLSD& input) const + // If we quit from the login screen we will not have an SL account + // name. Don't try to save, otherwise we'll dump a file in + // C:\Program Files\SecondLife\ or similar. JC + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (!user_dir.empty()) { - //the parcel you are in has changed something about its - //voice information - - //this is a misnomer, as it can also be when you are not in - //a parcel at all. Should really be something like - //LLViewerVoiceInfoChanged..... - if ( input.has("body") ) - { - LLSD body = input["body"]; - - //body has "region_name" (str), "parcel_local_id"(int), - //"voice_credentials" (map). - - //body["voice_credentials"] has "channel_uri" (str), - //body["voice_credentials"] has "channel_credentials" (str) - - //if we really wanted to be extra careful, - //we'd check the supplied - //local parcel id to make sure it's for the same parcel - //we believe we're in - if ( body.has("voice_credentials") ) - { - LLSD voice_credentials = body["voice_credentials"]; - std::string uri; - std::string credentials; - - if ( voice_credentials.has("channel_uri") ) - { - uri = voice_credentials["channel_uri"].asString(); - } - if ( voice_credentials.has("channel_credentials") ) - { - credentials = - voice_credentials["channel_credentials"].asString(); - } + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); + LLSD settings_llsd; - gVoiceClient->setSpatialChannel(uri, credentials); - } - } - } -}; + LL_INFOS("Voice") << "Saving stored speaker volumes to: " << filename << LL_ENDL; -class LLViewerRequiredVoiceVersion : public LLHTTPNode -{ - static BOOL sAlertedUser; - virtual void post( - LLHTTPNode::ResponsePtr response, - const LLSD& context, - const LLSD& input) const - { - //You received this messsage (most likely on region cross or - //teleport) - if ( input.has("body") && input["body"].has("major_version") ) + for(speaker_data_map_t::const_iterator iter = mSpeakersData.begin(); iter != mSpeakersData.end(); ++iter) { - int major_voice_version = - input["body"]["major_version"].asInteger(); -// int minor_voice_version = -// input["body"]["minor_version"].asInteger(); + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformToLegacyVolume(iter->second); - if (gVoiceClient && - (major_voice_version > VOICE_MAJOR_VERSION) ) - { - if (!sAlertedUser) - { - //sAlertedUser = TRUE; - LLNotificationsUtil::add("VoiceVersionMismatch"); - gSavedSettings.setBOOL("EnableVoiceChat", FALSE); // toggles listener - } - } + settings_llsd[iter->first.asString()] = volume; } + + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); } -}; +} + BOOL LLViewerRequiredVoiceVersion::sAlertedUser = FALSE; LLHTTPRegistration<LLViewerParcelVoiceInfo> - gHTTPRegistrationMessageParcelVoiceInfo( - "/message/ParcelVoiceInfo"); +gHTTPRegistrationMessageParcelVoiceInfo( + "/message/ParcelVoiceInfo"); LLHTTPRegistration<LLViewerRequiredVoiceVersion> - gHTTPRegistrationMessageRequiredVoiceVersion( - "/message/RequiredVoiceVersion"); +gHTTPRegistrationMessageRequiredVoiceVersion( + "/message/RequiredVoiceVersion"); diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index a29c386182..e08fed7ae9 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -17,8 +17,7 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this 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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,7 +32,6 @@ #define LL_VOICE_CLIENT_H class LLVOAvatar; -class LLVivoxProtocolParser; #include "lliopipe.h" #include "llpumpio.h" @@ -42,9 +40,14 @@ class LLVivoxProtocolParser; #include "v3math.h" #include "llframetimer.h" #include "llviewerregion.h" -#include "m3math.h" // LLMatrix3 +#include "llcallingcard.h" // for LLFriendObserver +#include "llsecapi.h" + +// devices + +typedef std::vector<std::string> LLVoiceDeviceList; + -class LLFriendObserver; class LLVoiceClientParticipantObserver { public: @@ -52,6 +55,9 @@ public: virtual void onChange() = 0; }; + +/////////////////////////////////// +/// @class LLVoiceClientStatusObserver class LLVoiceClientStatusObserver { public: @@ -65,11 +71,7 @@ public: STATUS_JOINED, STATUS_LEFT_CHANNEL, STATUS_VOICE_DISABLED, - - // Adding STATUS_VOICE_ENABLED as pair status for STATUS_VOICE_DISABLED - // See LLVoiceClient::setVoiceEnabled() STATUS_VOICE_ENABLED, - BEGIN_ERROR_STATUS, ERROR_CHANNEL_FULL, ERROR_CHANNEL_LOCKED, @@ -83,699 +85,379 @@ public: static std::string status2string(EStatusType inStatus); }; -class LLVoiceClient: public LLSingleton<LLVoiceClient> +struct LLVoiceVersionInfo { - LOG_CLASS(LLVoiceClient); - public: - LLVoiceClient(); - ~LLVoiceClient(); - - public: - static void init(LLPumpIO *pump); // Call this once at application startup (creates connector) - static void terminate(); // Call this to clean up during shutdown - - protected: - bool writeString(const std::string &str); - - public: - - static F32 OVERDRIVEN_POWER_LEVEL; + std::string serverType; + std::string serverVersion; +}; - static const F32 VOLUME_MIN; - static const F32 VOLUME_DEFAULT; - static const F32 VOLUME_MAX; +////////////////////////////////// +/// @class LLVoiceModuleInterface +/// @brief Voice module interface +/// +/// Voice modules should provide an implementation for this interface. +///////////////////////////////// - void updateSettings(); // call after loading settings and whenever they change +class LLVoiceModuleInterface +{ +public: + LLVoiceModuleInterface() {} + virtual ~LLVoiceModuleInterface() {} - void getCaptureDevicesSendMessage(); - void getRenderDevicesSendMessage(); - - void clearCaptureDevices(); - void addCaptureDevice(const std::string& name); - void setCaptureDevice(const std::string& name); - - void clearRenderDevices(); - void addRenderDevice(const std::string& name); - void setRenderDevice(const std::string& name); - - void tuningStart(); - void tuningStop(); - bool inTuningMode(); - bool inTuningStates(); - - void tuningRenderStartSendMessage(const std::string& name, bool loop); - void tuningRenderStopSendMessage(); - - void tuningCaptureStartSendMessage(int duration); - void tuningCaptureStopSendMessage(); - - void tuningSetMicVolume(float volume); - void tuningSetSpeakerVolume(float volume); - float tuningGetEnergy(void); - - // This returns true when it's safe to bring up the "device settings" dialog in the prefs. - // i.e. when the daemon is running and connected, and the device lists are populated. - bool deviceSettingsAvailable(); - - // Requery the vivox daemon for the current list of input/output devices. - // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed - // (use this if you want to know when it's done). - // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. - void refreshDeviceLists(bool clearCurrentList = true); - - // Call this if the connection to the daemon terminates unexpectedly. It will attempt to reset everything and relaunch. - void daemonDied(); - - // Call this if we're just giving up on voice (can't provision an account, etc.). It will clean up and go away. - void giveUp(); - - ///////////////////////////// - // Response/Event handlers - void connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID); - void loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases); - void sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); - void sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); - void sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString); - void logoutResponse(int statusCode, std::string &statusString); - void connectorShutdownResponse(int statusCode, std::string &statusString); - - void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); - void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); - void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); - void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); - void sessionGroupAddedEvent(std::string &sessionGroupHandle); - void sessionRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle); - void participantAddedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString, std::string &displayNameString, int participantType); - void participantRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString); - void participantUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, bool isModeratorMuted, bool isSpeaking, int volume, F32 energy); - void auxAudioPropertiesEvent(F32 energy); - void buddyPresenceEvent(std::string &uriString, std::string &alias, std::string &statusString, std::string &applicationString); - void messageEvent(std::string &sessionHandle, std::string &uriString, std::string &alias, std::string &messageHeader, std::string &messageBody, std::string &applicationString); - void sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType); - void subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType); - - void buddyListChanged(); - void muteListChanged(); - void updateFriends(U32 mask); - - ///////////////////////////// - // Sending updates of current state -static void updatePosition(void); - void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); - void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); - bool channelFromRegion(LLViewerRegion *region, std::string &name); - void leaveChannel(void); // call this on logout or teleport begin - - - void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. - bool getMuteMic() const; - void setUserPTTState(bool ptt); - bool getUserPTTState(); - void toggleUserPTTState(void); - void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs - void setVoiceEnabled(bool enabled); - static bool voiceEnabled(); - // Checks is voice working judging from mState - // Returns true if vivox has successfully logged in and is not in error state - bool voiceWorking(); - void setUsePTT(bool usePTT); - void setPTTIsToggle(bool PTTIsToggle); - bool getPTTIsToggle(); - void setPTTKey(std::string &key); - void setEarLocation(S32 loc); - void setVoiceVolume(F32 volume); - void setMicGain(F32 volume); - void setUserVolume(const LLUUID& id, F32 volume); // sets volume for specified agent, from 0-1 (where .5 is nominal) - void setLipSyncEnabled(BOOL enabled); - BOOL lipSyncEnabled(); - - // PTT key triggering - void keyDown(KEY key, MASK mask); - void keyUp(KEY key, MASK mask); - void middleMouseState(bool down); - - // Return the version of the Vivox library - std::string getAPIVersion() const { return mAPIVersion; } - - ///////////////////////////// - // Accessors for data related to nearby speakers - BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar - BOOL getIsSpeaking(const LLUUID& id); - BOOL getIsModeratorMuted(const LLUUID& id); - F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... - BOOL getOnMuteList(const LLUUID& id); - F32 getUserVolume(const LLUUID& id); - std::string getDisplayName(const LLUUID& id); - - // MBW -- XXX -- Not sure how to get this data out of the TVC - BOOL getUsingPTT(const LLUUID& id); - std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable) - - ///////////////////////////// - BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. - // Use this to determine whether to show a "no speech" icon in the menu bar. - - ///////////////////////////// - // Recording controls - void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200); - void recordingLoopSave(const std::string& filename); - void recordingStop(); - - // Playback controls - void filePlaybackStart(const std::string& filename); - void filePlaybackStop(); - void filePlaybackSetPaused(bool paused); - void filePlaybackSetMode(bool vox = false, float speed = 1.0f); - - - // This is used by the string-keyed maps below, to avoid storing the string twice. - // The 'const std::string *' in the key points to a string actually stored in the object referenced by the map. - // The add and delete operations for each map allocate and delete in the right order to avoid dangling references. - // The default compare operation would just compare pointers, which is incorrect, so they must use this comparitor instead. - struct stringMapComparitor - { - bool operator()(const std::string* a, const std::string * b) const - { - return a->compare(*b) < 0; - } - }; - - struct uuidMapComparitor - { - bool operator()(const LLUUID* a, const LLUUID * b) const - { - return *a < *b; - } - }; - - struct participantState - { - public: - participantState(const std::string &uri); - - bool updateMuteState(); // true if mute state has changed - bool isAvatar(); - - std::string mURI; - LLUUID mAvatarID; - std::string mAccountName; - std::string mDisplayName; - LLFrameTimer mSpeakingTimeout; - F32 mLastSpokeTimestamp; - F32 mPower; - F32 mVolume; - std::string mGroupID; - bool mPTT; - bool mIsSpeaking; - bool mIsModeratorMuted; - bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) - bool mVolumeSet; // true if incoming volume messages should not change the volume - bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) - bool mAvatarIDValid; - bool mIsSelf; - }; - typedef std::map<const std::string *, participantState*, stringMapComparitor> participantMap; - - typedef std::map<const LLUUID *, participantState*, uuidMapComparitor> participantUUIDMap; - - enum streamState - { - streamStateUnknown = 0, - streamStateIdle = 1, - streamStateConnected = 2, - streamStateRinging = 3, - }; - - struct sessionState - { - public: - sessionState(); - ~sessionState(); - - participantState *addParticipant(const std::string &uri); - // Note: after removeParticipant returns, the participant* that was passed to it will have been deleted. - // Take care not to use the pointer again after that. - void removeParticipant(participantState *participant); - void removeAllParticipants(); - - participantState *findParticipant(const std::string &uri); - participantState *findParticipantByID(const LLUUID& id); - - bool isCallBackPossible(); - bool isTextIMPossible(); - - std::string mHandle; - std::string mGroupHandle; - std::string mSIPURI; - std::string mAlias; - std::string mName; - std::string mAlternateSIPURI; - std::string mHash; // Channel password - std::string mErrorStatusString; - std::queue<std::string> mTextMsgQueue; - - LLUUID mIMSessionID; - LLUUID mCallerID; - int mErrorStatusCode; - int mMediaStreamState; - int mTextStreamState; - bool mCreateInProgress; // True if a Session.Create has been sent for this session and no response has been received yet. - bool mMediaConnectInProgress; // True if a Session.MediaConnect has been sent for this session and no response has been received yet. - bool mVoiceInvitePending; // True if a voice invite is pending for this session (usually waiting on a name lookup) - bool mTextInvitePending; // True if a text invite is pending for this session (usually waiting on a name lookup) - bool mSynthesizedCallerID; // True if the caller ID is a hash of the SIP URI -- this means we shouldn't do a name lookup. - bool mIsChannel; // True for both group and spatial channels (false for p2p, PSTN) - bool mIsSpatial; // True for spatial channels - bool mIsP2P; - bool mIncoming; - bool mVoiceEnabled; - bool mReconnect; // Whether we should try to reconnect to this session if it's dropped - // Set to true when the mute state of someone in the participant list changes. - // The code will have to walk the list to find the changed participant(s). - bool mVolumeDirty; - bool mMuteDirty; - - bool mParticipantsChanged; - participantMap mParticipantsByURI; - participantUUIDMap mParticipantsByUUID; - }; - - participantState *findParticipantByID(const LLUUID& id); - participantMap *getParticipantList(void); - void getParticipantsUUIDSet(std::set<LLUUID>& participant_uuids); - - typedef std::map<const std::string*, sessionState*, stringMapComparitor> sessionMap; - typedef std::set<sessionState*> sessionSet; - - typedef sessionSet::iterator sessionIterator; - sessionIterator sessionsBegin(void); - sessionIterator sessionsEnd(void); - - sessionState *findSession(const std::string &handle); - sessionState *findSessionBeingCreatedByURI(const std::string &uri); - sessionState *findSession(const LLUUID &participant_id); - sessionState *findSessionByCreateID(const std::string &create_id); - - sessionState *addSession(const std::string &uri, const std::string &handle = LLStringUtil::null); - void setSessionHandle(sessionState *session, const std::string &handle = LLStringUtil::null); - void setSessionURI(sessionState *session, const std::string &uri); - void deleteSession(sessionState *session); - void deleteAllSessions(void); + virtual void init(LLPumpIO *pump)=0; // Call this once at application startup (creates connector) + virtual void terminate()=0; // Call this to clean up during shutdown + + virtual void updateSettings()=0; // call after loading settings and whenever they change + + virtual bool isVoiceWorking()=0; // connected to a voice server and voice channel - void verifySessionState(void); + virtual const LLVoiceVersionInfo& getVersion()=0; + + ///////////////////// + /// @name Tuning + //@{ + virtual void tuningStart()=0; + virtual void tuningStop()=0; + virtual bool inTuningMode()=0; + + virtual void tuningSetMicVolume(float volume)=0; + virtual void tuningSetSpeakerVolume(float volume)=0; + virtual float tuningGetEnergy(void)=0; + //@} + + ///////////////////// + /// @name Devices + //@{ + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + virtual bool deviceSettingsAvailable()=0; + + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + virtual void refreshDeviceLists(bool clearCurrentList = true)=0; + + virtual void setCaptureDevice(const std::string& name)=0; + virtual void setRenderDevice(const std::string& name)=0; + + virtual LLVoiceDeviceList& getCaptureDevices()=0; + virtual LLVoiceDeviceList& getRenderDevices()=0; + + virtual void getParticipantList(std::set<LLUUID> &participants)=0; + virtual bool isParticipant(const LLUUID& speaker_id)=0; + //@} + + //////////////////////////// + /// @ name Channel stuff + //@{ + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + virtual bool inProximalChannel()=0; + + virtual void setNonSpatialChannel(const std::string &uri, + const std::string &credentials)=0; + + virtual void setSpatialChannel(const std::string &uri, + const std::string &credentials)=0; + + virtual void leaveNonSpatialChannel()=0; + + virtual void leaveChannel(void)=0; + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + virtual std::string getCurrentChannel()=0; + //@} + + + ////////////////////////// + /// @name invitations + //@{ + // start a voice channel with the specified user + virtual void callUser(const LLUUID &uuid)=0; + virtual bool isValidChannel(std::string& channelHandle)=0; + virtual bool answerInvite(std::string &channelHandle)=0; + virtual void declineInvite(std::string &channelHandle)=0; + //@} + + ///////////////////////// + /// @name Volume/gain + //@{ + virtual void setVoiceVolume(F32 volume)=0; + virtual void setMicGain(F32 volume)=0; + //@} + + ///////////////////////// + /// @name enable disable voice and features + //@{ + virtual bool voiceEnabled()=0; + virtual void setVoiceEnabled(bool enabled)=0; + virtual void setLipSyncEnabled(BOOL enabled)=0; + virtual BOOL lipSyncEnabled()=0; + virtual void setMuteMic(bool muted)=0; // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + //@} + + //////////////////////// + /// @name PTT + //@{ + virtual void setUserPTTState(bool ptt)=0; + virtual bool getUserPTTState()=0; + virtual void setUsePTT(bool usePTT)=0; + virtual void setPTTIsToggle(bool PTTIsToggle)=0; + virtual bool getPTTIsToggle()=0; + virtual void toggleUserPTTState(void)=0; + virtual void inputUserControlState(bool down)=0; // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + + virtual void keyDown(KEY key, MASK mask)=0; + virtual void keyUp(KEY key, MASK mask)=0; + virtual void middleMouseState(bool down)=0; + //@} + + ////////////////////////// + /// @name nearby speaker accessors + //@{ + + + virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar + virtual std::string getDisplayName(const LLUUID& id)=0; + virtual BOOL isOnlineSIP(const LLUUID &id)=0; + virtual BOOL isParticipantAvatar(const LLUUID &id)=0; + virtual BOOL getIsSpeaking(const LLUUID& id)=0; + virtual BOOL getIsModeratorMuted(const LLUUID& id)=0; + virtual F32 getCurrentPower(const LLUUID& id)=0; // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + virtual BOOL getOnMuteList(const LLUUID& id)=0; + virtual F32 getUserVolume(const LLUUID& id)=0; + virtual void setUserVolume(const LLUUID& id, F32 volume)=0; // set's volume for specified agent, from 0-1 (where .5 is nominal) + //@} + + ////////////////////////// + /// @name text chat + //@{ + virtual BOOL isSessionTextIMPossible(const LLUUID& id)=0; + virtual BOOL isSessionCallBackPossible(const LLUUID& id)=0; + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; + virtual void endUserIMSession(const LLUUID &uuid)=0; + //@} + + // authorize the user + virtual void userAuthorized(const std::string& user_id, + const LLUUID &agentID)=0; + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceClientStatusObserver* observer)=0; + virtual void removeObserver(LLVoiceClientStatusObserver* observer)=0; + virtual void addObserver(LLFriendObserver* observer)=0; + virtual void removeObserver(LLFriendObserver* observer)=0; + virtual void addObserver(LLVoiceClientParticipantObserver* observer)=0; + virtual void removeObserver(LLVoiceClientParticipantObserver* observer)=0; + //@} + + virtual std::string sipURIFromID(const LLUUID &id)=0; + //@} + +}; - void joinedAudioSession(sessionState *session); - void leftAudioSession(sessionState *session); - // This is called in several places where the session _may_ need to be deleted. - // It contains logic for whether to delete the session or keep it around. - void reapSession(sessionState *session); - - // Returns true if the session seems to indicate we've moved to a region on a different voice server - bool sessionNeedsRelog(sessionState *session); - - struct buddyListEntry - { - buddyListEntry(const std::string &uri); - std::string mURI; - std::string mDisplayName; - LLUUID mUUID; - bool mOnlineSL; - bool mOnlineSLim; - bool mCanSeeMeOnline; - bool mHasBlockListEntry; - bool mHasAutoAcceptListEntry; - bool mNameResolved; - bool mInSLFriends; - bool mInVivoxBuddies; - bool mNeedsNameUpdate; - }; - - typedef std::map<const std::string*, buddyListEntry*, stringMapComparitor> buddyListMap; - - // This should be called when parsing a buddy list entry sent by SLVoice. - void processBuddyListEntry(const std::string &uri, const std::string &displayName); - - buddyListEntry *addBuddy(const std::string &uri); - buddyListEntry *addBuddy(const std::string &uri, const std::string &displayName); - buddyListEntry *findBuddy(const std::string &uri); - buddyListEntry *findBuddy(const LLUUID &id); - buddyListEntry *findBuddyByDisplayName(const std::string &name); - void deleteBuddy(const std::string &uri); - void deleteAllBuddies(void); - - void deleteAllBlockRules(void); - void addBlockRule(const std::string &blockMask, const std::string &presenceOnly); - void deleteAllAutoAcceptRules(void); - void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); - void accountListBlockRulesResponse(int statusCode, const std::string &statusString); - void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); - - ///////////////////////////// - // session control messages - void connectorCreate(); - void connectorShutdown(); - - void requestVoiceAccountProvision(S32 retries = 3); - void userAuthorized( - const std::string& firstName, - const std::string& lastName, - const LLUUID &agentID); - void login( - const std::string& account_name, - const std::string& password, - const std::string& voice_sip_uri_hostname, - const std::string& voice_account_server_uri); - void loginSendMessage(); - void logout(); - void logoutSendMessage(); - - void accountListBlockRulesSendMessage(); - void accountListAutoAcceptRulesSendMessage(); - - void sessionGroupCreateSendMessage(); - void sessionCreateSendMessage(sessionState *session, bool startAudio = true, bool startText = false); - void sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio = true, bool startText = false); - void sessionMediaConnectSendMessage(sessionState *session); // just joins the audio session - void sessionTextConnectSendMessage(sessionState *session); // just joins the text session - void sessionTerminateSendMessage(sessionState *session); - void sessionGroupTerminateSendMessage(sessionState *session); - void sessionMediaDisconnectSendMessage(sessionState *session); - void sessionTextDisconnectSendMessage(sessionState *session); - - // Pokes the state machine to leave the audio session next time around. - void sessionTerminate(); - - // Pokes the state machine to shut down the connector and restart it. - void requestRelog(); - - // Does the actual work to get out of the audio session - void leaveAudioSession(); - - void addObserver(LLVoiceClientParticipantObserver* observer); - void removeObserver(LLVoiceClientParticipantObserver* observer); +class LLVoiceClient: public LLSingleton<LLVoiceClient> +{ + LOG_CLASS(LLVoiceClient); +public: + LLVoiceClient(); + ~LLVoiceClient(); - void addObserver(LLVoiceClientStatusObserver* observer); - void removeObserver(LLVoiceClientStatusObserver* observer); + void init(LLPumpIO *pump); // Call this once at application startup (creates connector) + void terminate(); // Call this to clean up during shutdown + + const LLVoiceVersionInfo getVersion(); + + static const F32 OVERDRIVEN_POWER_LEVEL; - void addObserver(LLFriendObserver* observer); - void removeObserver(LLFriendObserver* observer); - - void lookupName(const LLUUID &id); - static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); - void avatarNameResolved(const LLUUID &id, const std::string &name); - - typedef std::vector<std::string> deviceList; + static const F32 VOLUME_MIN; + static const F32 VOLUME_DEFAULT; + static const F32 VOLUME_MAX; - deviceList *getCaptureDevices(); - deviceList *getRenderDevices(); - - void setNonSpatialChannel( - const std::string &uri, - const std::string &credentials); - void setSpatialChannel( - const std::string &uri, - const std::string &credentials); - // start a voice session with the specified user - void callUser(const LLUUID &uuid); - - // Send a text message to the specified user, initiating the session if necessary. - bool sendTextMessage(const LLUUID& participant_id, const std::string& message); - - // close any existing text IM session with the specified user - void endUserIMSession(const LLUUID &uuid); - - bool answerInvite(std::string &sessionHandle); - void declineInvite(std::string &sessionHandle); - void leaveNonSpatialChannel(); + void updateSettings(); // call after loading settings and whenever they change - // Returns the URI of the current channel, or an empty string if not currently in a channel. - // NOTE that it will return an empty string if it's in the process of joining a channel. - std::string getCurrentChannel(); - - // returns true iff the user is currently in a proximal (local spatial) channel. - // Note that gestures should only fire if this returns true. - bool inProximalChannel(); + bool isVoiceWorking(); // connected to a voice server and voice channel - std::string sipURIFromID(const LLUUID &id); - - // Returns true if the indicated user is online via SIP presence according to SLVoice. - // Note that we only get SIP presence data for other users that are in our vivox buddy list. - bool isOnlineSIP(const LLUUID &id); - - // Returns true if the indicated participant is really an SL avatar. - // This should be used to control the state of the "profile" button. - // Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. - bool isParticipantAvatar(const LLUUID &id); - - // Returns true if calling back the session URI after the session has closed is possible. - // Currently this will be false only for PSTN P2P calls. - // NOTE: this will return true if the session can't be found. - bool isSessionCallBackPossible(const LLUUID &session_id); - - // Returns true if the session can accepte text IM's. - // 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); - - private: - - // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. - // Note: if you change this list, please make corresponding changes to LLVoiceClient::state2string(). - enum state - { - stateDisableCleanup, - stateDisabled, // Voice is turned off. - stateStart, // Class is initialized, socket is created - stateDaemonLaunched, // Daemon has been launched - stateConnecting, // connect() call has been issued - stateConnected, // connection to the daemon has been made, send some initial setup commands. - stateIdle, // socket is connected, ready for messaging - stateMicTuningStart, - stateMicTuningRunning, - stateMicTuningStop, - stateConnectorStart, // connector needs to be started - stateConnectorStarting, // waiting for connector handle - stateConnectorStarted, // connector handle received - stateLoginRetry, // need to retry login (failed due to changing password) - stateLoginRetryWait, // waiting for retry timer - stateNeedsLogin, // send login request - stateLoggingIn, // waiting for account handle - stateLoggedIn, // account handle received - stateCreatingSessionGroup, // Creating the main session group - stateNoChannel, // - stateJoiningSession, // waiting for session handle - stateSessionJoined, // session handle received - stateRunning, // in session, steady state - stateLeavingSession, // waiting for terminate session response - stateSessionTerminated, // waiting for terminate session response - - stateLoggingOut, // waiting for logout response - stateLoggedOut, // logout response received - stateConnectorStopping, // waiting for connector stop - stateConnectorStopped, // connector stop received - - // We go to this state if the login fails because the account needs to be provisioned. - - // error states. No way to recover from these yet. - stateConnectorFailed, - stateConnectorFailedWaiting, - stateLoginFailed, - stateLoginFailedWaiting, - stateJoinSessionFailed, - stateJoinSessionFailedWaiting, - - stateJail // Go here when all else has failed. Nothing will be retried, we're done. - }; + // tuning + void tuningStart(); + void tuningStop(); + bool inTuningMode(); - state mState; - bool mSessionTerminateRequested; - bool mRelogRequested; - // Number of times (in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine(). - // The larger it is the greater is possibility there is a problem with connection to voice server. - // Introduced while fixing EXT-4313. - int mSpatialJoiningNum; - - void setState(state inState); - state getState(void) { return mState; }; - static std::string state2string(state inState); - - void stateMachine(); - static void idle(void *user_data); - - LLHost mDaemonHost; - LLSocket::ptr_t mSocket; - bool mConnected; - - void closeSocket(void); - - LLPumpIO *mPump; - friend class LLVivoxProtocolParser; - - std::string mAccountName; - std::string mAccountPassword; - std::string mAccountDisplayName; - std::string mAccountFirstName; - std::string mAccountLastName; + void tuningSetMicVolume(float volume); + void tuningSetSpeakerVolume(float volume); + float tuningGetEnergy(void); - bool mTuningMode; - float mTuningEnergy; - std::string mTuningAudioFile; - int mTuningMicVolume; - bool mTuningMicVolumeDirty; - int mTuningSpeakerVolume; - bool mTuningSpeakerVolumeDirty; - state mTuningExitState; // state to return to when we leave tuning mode. + // devices + + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + bool deviceSettingsAvailable(); - std::string mSpatialSessionURI; - std::string mSpatialSessionCredentials; + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + void refreshDeviceLists(bool clearCurrentList = true); - std::string mMainSessionGroupHandle; // handle of the "main" session group. - - std::string mChannelName; // Name of the channel to be looked up - bool mAreaVoiceDisabled; - sessionState *mAudioSession; // Session state for the current audio session - bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified. + void setCaptureDevice(const std::string& name); + void setRenderDevice(const std::string& name); - sessionState *mNextAudioSession; // Session state for the audio session we're trying to join + const LLVoiceDeviceList& getCaptureDevices(); + const LLVoiceDeviceList& getRenderDevices(); -// std::string mSessionURI; // URI of the session we're in. -// std::string mSessionHandle; // returned by ? - - S32 mCurrentParcelLocalID; // Used to detect parcel boundary crossings - std::string mCurrentRegionName; // Used to detect parcel boundary crossings - - std::string mConnectorHandle; // returned by "Create Connector" message - std::string mAccountHandle; // returned by login message - int mNumberOfAliases; - U32 mCommandCookie; + //////////////////////////// + // Channel stuff + // + + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + bool inProximalChannel(); + void setNonSpatialChannel( + const std::string &uri, + const std::string &credentials); + void setSpatialChannel( + const std::string &uri, + const std::string &credentials); + void leaveNonSpatialChannel(); + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + std::string getCurrentChannel(); + // start a voice channel with the specified user + void callUser(const LLUUID &uuid); + bool isValidChannel(std::string& channelHandle); + bool answerInvite(std::string &channelHandle); + void declineInvite(std::string &channelHandle); + void leaveChannel(void); // call this on logout or teleport begin + + + ///////////////////////////// + // Sending updates of current state - std::string mVoiceAccountServerURI; - std::string mVoiceSIPURIHostName; - - int mLoginRetryCount; - - sessionMap mSessionsByHandle; // Active sessions, indexed by session handle. Sessions which are being initiated may not be in this map. - sessionSet mSessions; // All sessions, not indexed. This is the canonical session list. - - bool mBuddyListMapPopulated; - bool mBlockRulesListReceived; - bool mAutoAcceptRulesListReceived; - buddyListMap mBuddyListMap; - - deviceList mCaptureDevices; - deviceList mRenderDevices; - - std::string mCaptureDevice; - std::string mRenderDevice; - bool mCaptureDeviceDirty; - bool mRenderDeviceDirty; - - // This should be called when the code detects we have changed parcels. - // It initiates the call to the server that gets the parcel channel. - void parcelChanged(); - - void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); - void joinSession(sessionState *session); - -static std::string nameFromAvatar(LLVOAvatar *avatar); -static std::string nameFromID(const LLUUID &id); -static bool IDFromName(const std::string name, LLUUID &uuid); -static std::string displayNameFromAvatar(LLVOAvatar *avatar); - std::string sipURIFromAvatar(LLVOAvatar *avatar); - std::string sipURIFromName(std::string &name); - - // Returns the name portion of the SIP URI if the string looks vaguely like a SIP URI, or an empty string if not. -static std::string nameFromsipURI(const std::string &uri); - bool inSpatialChannel(void); - std::string getAudioSessionURI(); - std::string getAudioSessionHandle(); - - void sendPositionalUpdate(void); - - void buildSetCaptureDevice(std::ostringstream &stream); - void buildSetRenderDevice(std::ostringstream &stream); - void buildLocalAudioUpdates(std::ostringstream &stream); - - void clearAllLists(); - void checkFriend(const LLUUID& id); - void sendFriendsListUpdates(); - - // start a text IM session with the specified user - // This will be asynchronous, the session may be established at a future time. - sessionState* startUserIMSession(const LLUUID& uuid); - void sendQueuedTextMessages(sessionState *session); - - void enforceTether(void); - - bool mSpatialCoordsDirty; - - LLVector3d mCameraPosition; - LLVector3d mCameraRequestedPosition; - LLVector3 mCameraVelocity; - LLMatrix3 mCameraRot; - - LLVector3d mAvatarPosition; - LLVector3 mAvatarVelocity; - LLMatrix3 mAvatarRot; - - bool mPTTDirty; - bool mPTT; - - bool mUsePTT; - bool mPTTIsMiddleMouse; - KEY mPTTKey; - bool mPTTIsToggle; - bool mUserPTTState; - bool mMuteMic; - - // Set to true when the friends list is known to have changed. - bool mFriendsListDirty; - - enum - { - earLocCamera = 0, // ear at camera - earLocAvatar, // ear at avatar - earLocMixed // ear at avatar location/camera direction - }; - - S32 mEarLocation; - - bool mSpeakerVolumeDirty; - bool mSpeakerMuteDirty; - int mSpeakerVolume; + void setVoiceVolume(F32 volume); + void setMicGain(F32 volume); + void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) + bool voiceEnabled(); + void setLipSyncEnabled(BOOL enabled); + void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + void setUserPTTState(bool ptt); + bool getUserPTTState(); + void toggleUserPTTState(void); + void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + void setVoiceEnabled(bool enabled); + + void setUsePTT(bool usePTT); + void setPTTIsToggle(bool PTTIsToggle); + bool getPTTIsToggle(); + + BOOL lipSyncEnabled(); + + // PTT key triggering + void keyDown(KEY key, MASK mask); + void keyUp(KEY key, MASK mask); + void middleMouseState(bool down); + + + ///////////////////////////// + // Accessors for data related to nearby speakers + BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + std::string getDisplayName(const LLUUID& id); + BOOL isOnlineSIP(const LLUUID &id); + BOOL isParticipantAvatar(const LLUUID &id); + BOOL getIsSpeaking(const LLUUID& id); + BOOL getIsModeratorMuted(const LLUUID& id); + F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + BOOL getOnMuteList(const LLUUID& id); + F32 getUserVolume(const LLUUID& id); + + ///////////////////////////// + BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + // Use this to determine whether to show a "no speech" icon in the menu bar. + void getParticipantList(std::set<LLUUID> &participants); + bool isParticipant(const LLUUID& speaker_id); + + ////////////////////////// + /// @name text chat + //@{ + BOOL isSessionTextIMPossible(const LLUUID& id); + BOOL isSessionCallBackPossible(const LLUUID& id); + BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); + void endUserIMSession(const LLUUID &uuid); + //@} + - int mMicVolume; - bool mMicVolumeDirty; - - bool mVoiceEnabled; - bool mWriteInProgress; - std::string mWriteString; - - LLTimer mUpdateTimer; + void userAuthorized(const std::string& user_id, + const LLUUID &agentID); + + void addObserver(LLVoiceClientStatusObserver* observer); + void removeObserver(LLVoiceClientStatusObserver* observer); + void addObserver(LLFriendObserver* observer); + void removeObserver(LLFriendObserver* observer); + void addObserver(LLVoiceClientParticipantObserver* observer); + void removeObserver(LLVoiceClientParticipantObserver* observer); + + std::string sipURIFromID(const LLUUID &id); - BOOL mLipSyncEnabled; - - std::string mAPIVersion; - - typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t; - observer_set_t mParticipantObservers; - - void notifyParticipantObservers(); +protected: + LLVoiceModuleInterface* mVoiceModule; + LLPumpIO *m_servicePump; +}; - typedef std::set<LLVoiceClientStatusObserver*> status_observer_set_t; - status_observer_set_t mStatusObservers; - - void notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status); +/** + * Speaker volume storage helper class + **/ +class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> +{ + LOG_CLASS(LLSpeakerVolumeStorage); +public: - typedef std::set<LLFriendObserver*> friend_observer_set_t; - friend_observer_set_t mFriendObservers; - void notifyFriendObservers(); + /** + * Stores volume level for specified user. + * + * @param[in] speaker_id - LLUUID of user to store volume level for. + * @param[in] volume - volume level to be stored for user. + */ + void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); + + /** + * Gets stored volume level for specified speaker + * + * @param[in] speaker_id - LLUUID of user to retrieve volume level for. + * @param[out] volume - set to stored volume if found, otherwise unmodified. + * @return - true if a stored volume is found. + */ + bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); + + /** + * Removes stored volume level for specified user. + * + * @param[in] speaker_id - LLUUID of user to remove. + */ + void removeSpeakerVolume(const LLUUID& speaker_id); + +private: + friend class LLSingleton<LLSpeakerVolumeStorage>; + LLSpeakerVolumeStorage(); + ~LLSpeakerVolumeStorage(); + + const static std::string SETTINGS_FILE_NAME; + + void load(); + void save(); + + static F32 transformFromLegacyVolume(F32 volume_in); + static F32 transformToLegacyVolume(F32 volume_in); + + typedef std::map<LLUUID, F32> speaker_data_map_t; + speaker_data_map_t mSpeakersData; }; -extern LLVoiceClient *gVoiceClient; - #endif //LL_VOICE_CLIENT_H diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp new file mode 100644 index 0000000000..bcb1a70efb --- /dev/null +++ b/indra/newview/llvoicevivox.cpp @@ -0,0 +1,6944 @@ + /** + * @file LLVivoxVoiceClient.cpp + * @brief Implementation of LLVivoxVoiceClient class which is the interface to the voice client process. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, 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 "llvoicevivox.h" + +#include <boost/tokenizer.hpp> + +#include "llsdutil.h" + +#include "llvoavatarself.h" +#include "llbufferstream.h" +#include "llfile.h" +#ifdef LL_STANDALONE +# include "expat.h" +#else +# include "expat/expat.h" +#endif +#include "llcallbacklist.h" +#include "llviewerregion.h" +#include "llviewernetwork.h" // for gGridChoice +#include "llbase64.h" +#include "llviewercontrol.h" +#include "llkeyboard.h" +#include "llappviewer.h" // for gDisconnected, gDisableVoice +#include "llmutelist.h" // to check for muted avatars +#include "llagent.h" +#include "llcachename.h" +#include "llimview.h" // for LLIMMgr +#include "llparcel.h" +#include "llviewerparcelmgr.h" +//#include "llfirstuse.h" +#include "llspeakers.h" +#include "llviewerwindow.h" +#include "llviewercamera.h" + +#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel +#include "llviewernetwork.h" +#include "llnotificationsutil.h" + +// for base64 decoding +#include "apr_base64.h" + +// for SHA1 hash +#include "apr_sha1.h" + +// for MD5 hash +#include "llmd5.h" + +#define USE_SESSION_GROUPS 0 + +const F32 VOLUME_SCALE_VIVOX = 0.01f; + +const F32 SPEAKING_TIMEOUT = 1.f; + +static const std::string VOICE_SERVER_TYPE = "Vivox"; + +// Don't retry connecting to the daemon more frequently than this: +const F32 CONNECT_THROTTLE_SECONDS = 1.0f; + +// Don't send positional updates more frequently than this: +const F32 UPDATE_THROTTLE_SECONDS = 0.1f; + +const F32 LOGIN_RETRY_SECONDS = 10.0f; +const int MAX_LOGIN_RETRIES = 12; + +// Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() +// which is treated as normal. If this number is exceeded we suspect there is a problem with connection +// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen +// to make sure we don't make mistake when slight connection problems happen- situation when connection to server is +// blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. +const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; + + +static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) +{ + LLMD5 md5_uuid; + md5_uuid.update((const unsigned char*)str.data(), str.size()); + md5_uuid.finalize(); + md5_uuid.raw_digest(uuid.mData); +} + +static int scale_mic_volume(float volume) +{ + // incoming volume has the range [0.0 ... 2.0], with 1.0 as the default. + // 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 to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70 + return 30 + (int)(volume * 40.0f); + +} + +class LLVivoxVoiceAccountProvisionResponder : + public LLHTTPClient::Responder +{ +public: + LLVivoxVoiceAccountProvisionResponder(int retries) + { + mRetries = retries; + } + + virtual void error(U32 status, const std::string& reason) + { + if ( mRetries > 0 ) + { + LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; + LLVivoxVoiceClient::getInstance()->requestVoiceAccountProvision( + mRetries - 1); + } + else + { + LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; + LLVivoxVoiceClient::getInstance()->giveUp(); + } + } + + virtual void result(const LLSD& content) + { + + std::string voice_sip_uri_hostname; + std::string voice_account_server_uri; + + LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; + + if(content.has("voice_sip_uri_hostname")) + voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); + + // this key is actually misnamed -- it will be an entire URI, not just a hostname. + if(content.has("voice_account_server_name")) + voice_account_server_uri = content["voice_account_server_name"].asString(); + + LLVivoxVoiceClient::getInstance()->login( + content["username"].asString(), + content["password"].asString(), + voice_sip_uri_hostname, + voice_account_server_uri); + + } + +private: + int mRetries; +}; + + + +/////////////////////////////////////////////////////////////////////////////////////////////// + +class LLVivoxVoiceClientMuteListObserver : public LLMuteListObserver +{ + /* virtual */ void onChange() { LLVivoxVoiceClient::getInstance()->muteListChanged();} +}; + +class LLVivoxVoiceClientFriendsObserver : public LLFriendObserver +{ +public: + /* virtual */ void changed(U32 mask) { LLVivoxVoiceClient::getInstance()->updateFriends(mask);} +}; + +static LLVivoxVoiceClientMuteListObserver mutelist_listener; +static bool sMuteListListener_listening = false; + +static LLVivoxVoiceClientFriendsObserver *friendslist_listener = NULL; + +/////////////////////////////////////////////////////////////////////////////////////////////// + +class LLVivoxVoiceClientCapResponder : public LLHTTPClient::Responder +{ +public: + LLVivoxVoiceClientCapResponder(void){}; + + virtual void error(U32 status, const std::string& reason); // called with bad status codes + virtual void result(const LLSD& content); + +private: +}; + +void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason) +{ + LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder::error(" + << status << ": " << reason << ")" + << LL_ENDL; +} + +void LLVivoxVoiceClientCapResponder::result(const LLSD& content) +{ + LLSD::map_const_iterator iter; + + LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; + + if ( content.has("voice_credentials") ) + { + LLSD voice_credentials = content["voice_credentials"]; + std::string uri; + std::string credentials; + + if ( voice_credentials.has("channel_uri") ) + { + uri = voice_credentials["channel_uri"].asString(); + } + if ( voice_credentials.has("channel_credentials") ) + { + credentials = + voice_credentials["channel_credentials"].asString(); + } + + LLVivoxVoiceClient::getInstance()->setSpatialChannel(uri, credentials); + } +} + + + +#if LL_WINDOWS +static HANDLE sGatewayHandle = 0; + +static bool isGatewayRunning() +{ + bool result = false; + if(sGatewayHandle != 0) + { + DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); + if(waitresult != WAIT_OBJECT_0) + { + result = true; + } + } + return result; +} +static void killGateway() +{ + if(sGatewayHandle != 0) + { + TerminateProcess(sGatewayHandle,0); + } +} + +#else // Mac and linux + +static pid_t sGatewayPID = 0; +static bool isGatewayRunning() +{ + bool result = false; + if(sGatewayPID != 0) + { + // A kill with signal number 0 has no effect, just does error checking. It should return an error if the process no longer exists. + if(kill(sGatewayPID, 0) == 0) + { + result = true; + } + } + return result; +} + +static void killGateway() +{ + if(sGatewayPID != 0) + { + kill(sGatewayPID, SIGTERM); + } +} + +#endif + +/////////////////////////////////////////////////////////////////////////////////////////////// + +LLVivoxVoiceClient::LLVivoxVoiceClient() : + mState(stateDisabled), + mSessionTerminateRequested(false), + mRelogRequested(false), + mConnected(false), + mPump(NULL), + mSpatialJoiningNum(0), + + mTuningMode(false), + mTuningEnergy(0.0f), + mTuningMicVolume(0), + mTuningMicVolumeDirty(true), + mTuningSpeakerVolume(0), + mTuningSpeakerVolumeDirty(true), + mTuningExitState(stateDisabled), + + mAreaVoiceDisabled(false), + mAudioSession(NULL), + mAudioSessionChanged(false), + mNextAudioSession(NULL), + + mCurrentParcelLocalID(0), + mNumberOfAliases(0), + mCommandCookie(0), + mLoginRetryCount(0), + + mBuddyListMapPopulated(false), + mBlockRulesListReceived(false), + mAutoAcceptRulesListReceived(false), + mCaptureDeviceDirty(false), + mRenderDeviceDirty(false), + mSpatialCoordsDirty(false), + + mPTTDirty(true), + mPTT(true), + mUsePTT(true), + mPTTIsMiddleMouse(false), + mPTTKey(0), + mPTTIsToggle(false), + mUserPTTState(false), + mMuteMic(false), + mFriendsListDirty(true), + + mEarLocation(0), + mSpeakerVolumeDirty(true), + mSpeakerMuteDirty(true), + mMicVolume(0), + mMicVolumeDirty(true), + + mVoiceEnabled(false), + mWriteInProgress(false), + + mLipSyncEnabled(false) + + + +{ + mSpeakerVolume = scale_speaker_volume(0); + + mVoiceVersion.serverVersion = ""; + mVoiceVersion.serverType = VOICE_SERVER_TYPE; + + // gMuteListp isn't set up at this point, so we defer this until later. +// gMuteListp->addObserver(&mutelist_listener); + + +#if LL_DARWIN || LL_LINUX || LL_SOLARIS + // HACK: THIS DOES NOT BELONG HERE + // When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us. + // This should cause us to ignore SIGPIPE and handle the error through proper channels. + // This should really be set up elsewhere. Where should it go? + signal(SIGPIPE, SIG_IGN); + + // Since we're now launching the gateway with fork/exec instead of system(), we need to deal with zombie processes. + // Ignoring SIGCHLD should prevent zombies from being created. Alternately, we could use wait(), but I'd rather not do that. + signal(SIGCHLD, SIG_IGN); +#endif + + // set up state machine + setState(stateDisabled); + + gIdleCallbacks.addFunction(idle, this); +} + +//--------------------------------------------------- + +LLVivoxVoiceClient::~LLVivoxVoiceClient() +{ +} + +//---------------------------------------------- + +void LLVivoxVoiceClient::init(LLPumpIO *pump) +{ + // constructor will set up LLVoiceClient::getInstance() + LLVivoxVoiceClient::getInstance()->mPump = pump; +} + +void LLVivoxVoiceClient::terminate() +{ + +// leaveAudioSession(); + logout(); + // As of SDK version 4885, this should no longer be necessary. It will linger after the socket close if it needs to. + // ms_sleep(2000); + connectorShutdown(); + closeSocket(); // Need to do this now -- bad things happen if the destructor does it later. + + // This will do unpleasant things on windows. +// killGateway(); + + + +} + +const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion() +{ + return mVoiceVersion; +} + +//--------------------------------------------------- + +void LLVivoxVoiceClient::updateSettings() +{ + setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); + std::string keyString = gSavedSettings.getString("PushToTalkButton"); + setPTTKey(keyString); + setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); + setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); + + std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + setCaptureDevice(inputDevice); + std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + setRenderDevice(outputDevice); + F32 mic_level = gSavedSettings.getF32("AudioLevelMic"); + setMicGain(mic_level); + setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); +} + +///////////////////////////// +// utility functions + +bool LLVivoxVoiceClient::writeString(const std::string &str) +{ + bool result = false; + if(mConnected) + { + apr_status_t err; + apr_size_t size = (apr_size_t)str.size(); + apr_size_t written = size; + + //MARK: Turn this on to log outgoing XML +// LL_DEBUGS("Voice") << "sending: " << str << LL_ENDL; + + // check return code - sockets will fail (broken, etc.) + err = apr_socket_send( + mSocket->getSocket(), + (const char*)str.data(), + &written); + + if(err == 0) + { + // Success. + result = true; + } + // TODO: handle partial writes (written is number of bytes written) + // Need to set socket to non-blocking before this will work. +// else if(APR_STATUS_IS_EAGAIN(err)) +// { +// // +// } + else + { + // Assume any socket error means something bad. For now, just close the socket. + char buf[MAX_STRING]; + LL_WARNS("Voice") << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL; + daemonDied(); + } + } + + return result; +} + + +///////////////////////////// +// session control messages +void LLVivoxVoiceClient::connectorCreate() +{ + std::ostringstream stream; + std::string logpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + std::string loglevel = "0"; + + // Transition to stateConnectorStarted when the connector handle comes back. + setState(stateConnectorStarting); + + std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel"); + + if(savedLogLevel != "-1") + { + LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL; + loglevel = "10"; + } + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.Create.1\">" + << "<ClientName>V2 SDK</ClientName>" + << "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>" + << "<Mode>Normal</Mode>" + << "<Logging>" + << "<Folder>" << logpath << "</Folder>" + << "<FileNamePrefix>Connector</FileNamePrefix>" + << "<FileNameSuffix>.log</FileNameSuffix>" + << "<LogLevel>" << loglevel << "</LogLevel>" + << "</Logging>" + << "<Application>SecondLifeViewer.1</Application>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::connectorShutdown() +{ + setState(stateConnectorStopping); + + if(!mConnectorHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.InitiateShutdown.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "</Request>" + << "\n\n\n"; + + mConnectorHandle.clear(); + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) +{ + + mAccountDisplayName = user_id; + + LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL; + + mAccountName = nameFromID(agentID); +} + +void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries) +{ + if ( gAgent.getRegion() && mVoiceEnabled ) + { + std::string url = + gAgent.getRegion()->getCapability( + "ProvisionVoiceAccountRequest"); + + if ( url == "" ) return; + + LLHTTPClient::post( + url, + LLSD(), + new LLVivoxVoiceAccountProvisionResponder(retries)); + } +} + +void LLVivoxVoiceClient::login( + const std::string& account_name, + const std::string& password, + const std::string& voice_sip_uri_hostname, + const std::string& voice_account_server_uri) +{ + mVoiceSIPURIHostName = voice_sip_uri_hostname; + mVoiceAccountServerURI = voice_account_server_uri; + + if(!mAccountHandle.empty()) + { + // Already logged in. + LL_WARNS("Voice") << "Called while already logged in." << LL_ENDL; + + // Don't process another login. + return; + } + else if ( account_name != mAccountName ) + { + //TODO: error? + LL_WARNS("Voice") << "Wrong account name! " << account_name + << " instead of " << mAccountName << LL_ENDL; + } + else + { + mAccountPassword = password; + } + + std::string debugSIPURIHostName = gSavedSettings.getString("VivoxDebugSIPURIHostName"); + + if( !debugSIPURIHostName.empty() ) + { + mVoiceSIPURIHostName = debugSIPURIHostName; + } + + if( mVoiceSIPURIHostName.empty() ) + { + // we have an empty account server name + // so we fall back to hardcoded defaults + + if(LLGridManager::getInstance()->isInProductionGrid()) + { + // Use the release account server + mVoiceSIPURIHostName = "bhr.vivox.com"; + } + else + { + // Use the development account server + mVoiceSIPURIHostName = "bhd.vivox.com"; + } + } + + std::string debugAccountServerURI = gSavedSettings.getString("VivoxDebugVoiceAccountServerURI"); + + if( !debugAccountServerURI.empty() ) + { + mVoiceAccountServerURI = debugAccountServerURI; + } + + if( mVoiceAccountServerURI.empty() ) + { + // If the account server URI isn't specified, construct it from the SIP URI hostname + mVoiceAccountServerURI = "https://www." + mVoiceSIPURIHostName + "/api2/"; + } +} + +void LLVivoxVoiceClient::idle(void* user_data) +{ + LLVivoxVoiceClient* self = (LLVivoxVoiceClient*)user_data; + self->stateMachine(); +} + +std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) +{ + std::string result = "UNKNOWN"; + + // Prevent copy-paste errors when updating this list... +#define CASE(x) case x: result = #x; break + + switch(inState) + { + CASE(stateDisableCleanup); + CASE(stateDisabled); + CASE(stateStart); + CASE(stateDaemonLaunched); + CASE(stateConnecting); + CASE(stateConnected); + CASE(stateIdle); + CASE(stateMicTuningStart); + CASE(stateMicTuningRunning); + CASE(stateMicTuningStop); + CASE(stateConnectorStart); + CASE(stateConnectorStarting); + CASE(stateConnectorStarted); + CASE(stateLoginRetry); + CASE(stateLoginRetryWait); + CASE(stateNeedsLogin); + CASE(stateLoggingIn); + CASE(stateLoggedIn); + CASE(stateCreatingSessionGroup); + CASE(stateNoChannel); + CASE(stateJoiningSession); + CASE(stateSessionJoined); + CASE(stateRunning); + CASE(stateLeavingSession); + CASE(stateSessionTerminated); + CASE(stateLoggingOut); + CASE(stateLoggedOut); + CASE(stateConnectorStopping); + CASE(stateConnectorStopped); + CASE(stateConnectorFailed); + CASE(stateConnectorFailedWaiting); + CASE(stateLoginFailed); + CASE(stateLoginFailedWaiting); + CASE(stateJoinSessionFailed); + CASE(stateJoinSessionFailedWaiting); + CASE(stateJail); + } + +#undef CASE + + return result; +} + + + +void LLVivoxVoiceClient::setState(state inState) +{ + LL_DEBUGS("Voice") << "entering state " << state2string(inState) << LL_ENDL; + + mState = inState; +} + +void LLVivoxVoiceClient::stateMachine() +{ + if(gDisconnected) + { + // The viewer has been disconnected from the sim. Disable voice. + setVoiceEnabled(false); + } + + if(mVoiceEnabled) + { + updatePosition(); + } + else if(mTuningMode) + { + // Tuning mode is special -- it needs to launch SLVoice even if voice is disabled. + } + else + { + if((getState() != stateDisabled) && (getState() != stateDisableCleanup)) + { + // User turned off voice support. Send the cleanup messages, close the socket, and reset. + if(!mConnected) + { + // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. + LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; + killGateway(); + } + + logout(); + connectorShutdown(); + + setState(stateDisableCleanup); + } + } + + // Check for parcel boundary crossing + { + LLViewerRegion *region = gAgent.getRegion(); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + + if(region && parcel) + { + S32 parcelLocalID = parcel->getLocalID(); + std::string regionName = region->getName(); + std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); + +// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; + + // The region name starts out empty and gets filled in later. + // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. + // If either is empty, wait for the next time around. + if(!regionName.empty()) + { + if(!capURI.empty()) + { + if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) + { + // We have changed parcels. Initiate a parcel channel lookup. + mCurrentParcelLocalID = parcelLocalID; + mCurrentRegionName = regionName; + + parcelChanged(); + } + } + else + { + LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; + } + } + } + } + + switch(getState()) + { + //MARK: stateDisableCleanup + case stateDisableCleanup: + // Clean up and reset everything. + closeSocket(); + deleteAllSessions(); + deleteAllBuddies(); + + mConnectorHandle.clear(); + mAccountHandle.clear(); + mAccountPassword.clear(); + mVoiceAccountServerURI.clear(); + + setState(stateDisabled); + break; + + //MARK: stateDisabled + case stateDisabled: + if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) + { + setState(stateStart); + } + break; + + //MARK: stateStart + case stateStart: + if(gSavedSettings.getBOOL("CmdLineDisableVoice")) + { + // Voice is locked out, we must not launch the vivox daemon. + setState(stateJail); + } + else if(!isGatewayRunning()) + { + if(true) + { + // Launch the voice daemon + + // *FIX:Mani - Using the executable dir instead + // of mAppRODataDir, the working directory from which the app + // is launched. + //std::string exe_path = gDirUtilp->getAppRODataDir(); + std::string exe_path = gDirUtilp->getExecutableDir(); + exe_path += gDirUtilp->getDirDelimiter(); +#if LL_WINDOWS + exe_path += "SLVoice.exe"; +#elif LL_DARWIN + exe_path += "../Resources/SLVoice"; +#else + exe_path += "SLVoice"; +#endif + // See if the vivox executable exists + llstat s; + if(!LLFile::stat(exe_path, &s)) + { + // vivox executable exists. Build the command line and launch the daemon. + // SLIM SDK: these arguments are no longer necessary. +// std::string args = " -p tcp -h -c"; + std::string args; + std::string cmd; + std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); + + if(loglevel.empty()) + { + loglevel = "-1"; // turn logging off completely + } + + args += " -ll "; + args += loglevel; + + LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; + +#if LL_WINDOWS + PROCESS_INFORMATION pinfo; + STARTUPINFOA sinfo; + + memset(&sinfo, 0, sizeof(sinfo)); + + std::string exe_dir = gDirUtilp->getAppRODataDir(); + cmd = "SLVoice.exe"; + cmd += args; + + // So retarded. Windows requires that the second parameter to CreateProcessA be writable (non-const) string... + char *args2 = new char[args.size() + 1]; + strcpy(args2, args.c_str()); + if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) + { +// DWORD dwErr = GetLastError(); + } + else + { + // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on + // CloseHandle(pinfo.hProcess); // stops leaks - nothing else + sGatewayHandle = pinfo.hProcess; + CloseHandle(pinfo.hThread); // stops leaks - nothing else + } + + delete[] args2; +#else // LL_WINDOWS + // This should be the same for mac and linux + { + std::vector<std::string> arglist; + arglist.push_back(exe_path); + + // Split the argument string into separate strings for each argument + typedef boost::tokenizer<boost::char_separator<char> > tokenizer; + boost::char_separator<char> sep(" "); + tokenizer tokens(args, sep); + tokenizer::iterator token_iter; + + for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) + { + arglist.push_back(*token_iter); + } + + // create an argv vector for the child process + char **fakeargv = new char*[arglist.size() + 1]; + int i; + for(i=0; i < arglist.size(); i++) + fakeargv[i] = const_cast<char*>(arglist[i].c_str()); + + fakeargv[i] = NULL; + + fflush(NULL); // flush all buffers before the child inherits them + pid_t id = vfork(); + if(id == 0) + { + // child + execv(exe_path.c_str(), fakeargv); + + // If we reach this point, the exec failed. + // Use _exit() instead of exit() per the vfork man page. + _exit(0); + } + + // parent + delete[] fakeargv; + sGatewayPID = id; + } +#endif // LL_WINDOWS + mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort")); + } + else + { + LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; + } + } + else + { + // SLIM SDK: port changed from 44124 to 44125. + // We can connect to a client gateway running on another host. This is useful for testing. + // To do this, launch the gateway on a nearby host like this: + // vivox-gw.exe -p tcp -i 0.0.0.0:44125 + // and put that host's IP address here. + mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost"), gSavedSettings.getU32("VivoxVoicePort")); + } + + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); + + setState(stateDaemonLaunched); + + // Dirty the states we'll need to sync with the daemon when it comes up. + mPTTDirty = true; + mMicVolumeDirty = true; + mSpeakerVolumeDirty = true; + mSpeakerMuteDirty = true; + // These only need to be set if they're not default (i.e. empty string). + mCaptureDeviceDirty = !mCaptureDevice.empty(); + mRenderDeviceDirty = !mRenderDevice.empty(); + + mMainSessionGroupHandle.clear(); + } + break; + + //MARK: stateDaemonLaunched + case stateDaemonLaunched: + if(mUpdateTimer.hasExpired()) + { + LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL; + + mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); + + if(!mSocket) + { + mSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); + } + + mConnected = mSocket->blockingConnect(mDaemonHost); + if(mConnected) + { + setState(stateConnecting); + } + else + { + // If the connect failed, the socket may have been put into a bad state. Delete it. + closeSocket(); + } + } + break; + + //MARK: stateConnecting + case stateConnecting: + // Can't do this until we have the pump available. + if(mPump) + { + // MBW -- Note to self: pumps and pipes examples in + // indra/test/io.cpp + // indra/test/llpipeutil.{cpp|h} + + // Attach the pumps and pipes + + LLPumpIO::chain_t readChain; + + readChain.push_back(LLIOPipe::ptr_t(new LLIOSocketReader(mSocket))); + readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser())); + + mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS); + + setState(stateConnected); + } + + break; + + //MARK: stateConnected + case stateConnected: + // Initial devices query + getCaptureDevicesSendMessage(); + getRenderDevicesSendMessage(); + + mLoginRetryCount = 0; + + setState(stateIdle); + break; + + //MARK: stateIdle + case stateIdle: + // This is the idle state where we're connected to the daemon but haven't set up a connector yet. + if(mTuningMode) + { + mTuningExitState = stateIdle; + setState(stateMicTuningStart); + } + else if(!mVoiceEnabled) + { + // We never started up the connector. This will shut down the daemon. + setState(stateConnectorStopped); + } + else if(!mAccountName.empty()) + { + LLViewerRegion *region = gAgent.getRegion(); + + if(region) + { + if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) + { + if ( mAccountPassword.empty() ) + { + requestVoiceAccountProvision(); + } + setState(stateConnectorStart); + } + else + { + LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; + } + } + } + break; + + //MARK: stateMicTuningStart + case stateMicTuningStart: + if(mUpdateTimer.hasExpired()) + { + if(mCaptureDeviceDirty || mRenderDeviceDirty) + { + // These can't be changed while in tuning mode. Set them before starting. + std::ostringstream stream; + + buildSetCaptureDevice(stream); + buildSetRenderDevice(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + + // This will come around again in the same state and start the capture, after the timer expires. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + } + else + { + // duration parameter is currently unused, per Mike S. + tuningCaptureStartSendMessage(10000); + + setState(stateMicTuningRunning); + } + } + + break; + + //MARK: stateMicTuningRunning + case stateMicTuningRunning: + if(!mTuningMode || mCaptureDeviceDirty || mRenderDeviceDirty) + { + // All of these conditions make us leave tuning mode. + setState(stateMicTuningStop); + } + else + { + // process mic/speaker volume changes + if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) + { + std::ostringstream stream; + + if(mTuningMicVolumeDirty) + { + LL_INFOS("Voice") << "setting tuning mic level to " << mTuningMicVolume << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetMicLevel.1\">" + << "<Level>" << mTuningMicVolume << "</Level>" + << "</Request>\n\n\n"; + } + + if(mTuningSpeakerVolumeDirty) + { + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">" + << "<Level>" << mTuningSpeakerVolume << "</Level>" + << "</Request>\n\n\n"; + } + + mTuningMicVolumeDirty = false; + mTuningSpeakerVolumeDirty = false; + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + } + } + break; + + //MARK: stateMicTuningStop + case stateMicTuningStop: + { + // transition out of mic tuning + tuningCaptureStopSendMessage(); + + setState(mTuningExitState); + + // if we exited just to change devices, this will keep us from re-entering too fast. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + + } + break; + + //MARK: stateConnectorStart + case stateConnectorStart: + if(!mVoiceEnabled) + { + // We were never logged in. This will shut down the connector. + setState(stateLoggedOut); + } + else if(!mVoiceAccountServerURI.empty()) + { + connectorCreate(); + } + break; + + //MARK: stateConnectorStarting + case stateConnectorStarting: // waiting for connector handle + // connectorCreateResponse() will transition from here to stateConnectorStarted. + break; + + //MARK: stateConnectorStarted + case stateConnectorStarted: // connector handle received + if(!mVoiceEnabled) + { + // We were never logged in. This will shut down the connector. + setState(stateLoggedOut); + } + else + { + // The connector is started. Send a login message. + setState(stateNeedsLogin); + } + break; + + //MARK: stateLoginRetry + case stateLoginRetry: + if(mLoginRetryCount == 0) + { + // First retry -- display a message to the user + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGIN_RETRY); + } + + mLoginRetryCount++; + + if(mLoginRetryCount > MAX_LOGIN_RETRIES) + { + LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; + setState(stateLoginFailed); + LLSD args; + std::stringstream errs; + errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; + args["HOSTID"] = errs.str(); + if (LLGridManager::getInstance()->isSystemGrid()) + { + LLNotificationsUtil::add("NoVoiceConnect", args); + } + else + { + LLNotificationsUtil::add("NoVoiceConnect-GIAB", args); + } + } + else + { + LL_INFOS("Voice") << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << LL_ENDL; + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(LOGIN_RETRY_SECONDS); + setState(stateLoginRetryWait); + } + break; + + //MARK: stateLoginRetryWait + case stateLoginRetryWait: + if(mUpdateTimer.hasExpired()) + { + setState(stateNeedsLogin); + } + break; + + //MARK: stateNeedsLogin + case stateNeedsLogin: + if(!mAccountPassword.empty()) + { + setState(stateLoggingIn); + loginSendMessage(); + } + break; + + //MARK: stateLoggingIn + case stateLoggingIn: // waiting for account handle + // loginResponse() will transition from here to stateLoggedIn. + break; + + //MARK: stateLoggedIn + case stateLoggedIn: // account handle received + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); + + // request the current set of block rules (we'll need them when updating the friends list) + accountListBlockRulesSendMessage(); + + // request the current set of auto-accept rules + accountListAutoAcceptRulesSendMessage(); + + // Set up the mute list observer if it hasn't been set up already. + if((!sMuteListListener_listening)) + { + LLMuteList::getInstance()->addObserver(&mutelist_listener); + sMuteListListener_listening = true; + } + + // Set up the friends list observer if it hasn't been set up already. + if(friendslist_listener == NULL) + { + friendslist_listener = new LLVivoxVoiceClientFriendsObserver; + LLAvatarTracker::instance().addObserver(friendslist_listener); + } + + // Set the initial state of mic mute, local speaker volume, etc. + { + std::ostringstream stream; + + buildLocalAudioUpdates(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + } + +#if USE_SESSION_GROUPS + // create the main session group + sessionGroupCreateSendMessage(); + + setState(stateCreatingSessionGroup); +#else + // Not using session groups -- skip the stateCreatingSessionGroup state. + setState(stateNoChannel); + + // Initial kick-off of channel lookup logic + parcelChanged(); +#endif + break; + + //MARK: stateCreatingSessionGroup + case stateCreatingSessionGroup: + if(mSessionTerminateRequested || !mVoiceEnabled) + { + // *TODO: Question: is this the right way out of this state + setState(stateSessionTerminated); + } + else if(!mMainSessionGroupHandle.empty()) + { + setState(stateNoChannel); + + // Start looped recording (needed for "panic button" anti-griefing tool) + recordingLoopStart(); + + // Initial kick-off of channel lookup logic + parcelChanged(); + } + break; + + //MARK: stateNoChannel + case stateNoChannel: + + LL_DEBUGS("Voice") << "State No Channel" << LL_ENDL; + mSpatialJoiningNum = 0; + // Do this here as well as inside sendPositionalUpdate(). + // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. + sendFriendsListUpdates(); + + if(mSessionTerminateRequested || !mVoiceEnabled) + { + // TODO: Question: Is this the right way out of this state? + setState(stateSessionTerminated); + } + else if(mTuningMode) + { + mTuningExitState = stateNoChannel; + setState(stateMicTuningStart); + } + else if(sessionNeedsRelog(mNextAudioSession)) + { + requestRelog(); + setState(stateSessionTerminated); + } + else if(mNextAudioSession) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = mNextAudioSession; + if(!mAudioSession->mReconnect) + { + mNextAudioSession = NULL; + } + + // The old session may now need to be deleted. + reapSession(oldSession); + + if(!mAudioSession->mHandle.empty()) + { + // Connect to a session by session handle + + sessionMediaConnectSendMessage(mAudioSession); + } + else + { + // Connect to a session by URI + sessionCreateSendMessage(mAudioSession, true, false); + } + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING); + setState(stateJoiningSession); + } + else if(!mSpatialSessionURI.empty()) + { + // If we're not headed elsewhere and have a spatial URI, return to spatial. + switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); + } + break; + + //MARK: stateJoiningSession + case stateJoiningSession: // waiting for session handle + + // If this is true we have problem with connection to voice server (EXT-4313). + // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. + if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) + { + // Notify observers to let them know there is problem with voice + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; + } + + // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for + // example for p2p many times while waiting for response, so it can't be used to detect errors + if(mAudioSession && mAudioSession->mIsSpatial) + { + mSpatialJoiningNum++; + } + + // joinedAudioSession() will transition from here to stateSessionJoined. + if(!mVoiceEnabled) + { + // User bailed out during connect -- jump straight to teardown. + setState(stateSessionTerminated); + } + else if(mSessionTerminateRequested) + { + if(mAudioSession && !mAudioSession->mHandle.empty()) + { + // Only allow direct exits from this state in p2p calls (for cancelling an invite). + // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. + if(mAudioSession->mIsP2P) + { + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateSessionTerminated); + } + } + } + break; + + //MARK: stateSessionJoined + case stateSessionJoined: // session handle received + + mSpatialJoiningNum = 0; + // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 + // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. + // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. + // This is a cheap way to make sure both have happened before proceeding. + if(mAudioSession && mAudioSession->mVoiceEnabled) + { + // Dirty state that may need to be sync'ed with the daemon. + mPTTDirty = true; + mSpeakerVolumeDirty = true; + mSpatialCoordsDirty = true; + + setState(stateRunning); + + // Start the throttle timer + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + + // Events that need to happen when a session is joined could go here. + // Maybe send initial spatial data? + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); + + } + else if(!mVoiceEnabled) + { + // User bailed out during connect -- jump straight to teardown. + setState(stateSessionTerminated); + } + else if(mSessionTerminateRequested) + { + // Only allow direct exits from this state in p2p calls (for cancelling an invite). + // Terminating a half-connected session on other types of calls seems to break something in the vivox gateway. + if(mAudioSession && mAudioSession->mIsP2P) + { + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateSessionTerminated); + } + } + break; + + //MARK: stateRunning + case stateRunning: // steady state + // Disabling voice or disconnect requested. + if(!mVoiceEnabled || mSessionTerminateRequested) + { + leaveAudioSession(); + } + else + { + + // Figure out whether the PTT state needs to change + { + bool newPTT; + if(mUsePTT) + { + // If configured to use PTT, track the user state. + newPTT = mUserPTTState; + } + else + { + // If not configured to use PTT, it should always be true (otherwise the user will be unable to speak). + newPTT = true; + } + + if(mMuteMic) + { + // This always overrides any other PTT setting. + newPTT = false; + } + + // Dirty if state changed. + if(newPTT != mPTT) + { + mPTT = newPTT; + mPTTDirty = true; + } + } + + if(!inSpatialChannel()) + { + // When in a non-spatial channel, never send positional updates. + mSpatialCoordsDirty = false; + } + else + { + // Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position) + enforceTether(); + } + + // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often + // -- the user can only click so fast) or every 10hz, whichever is sooner. + // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. + if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired()) + { + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + sendPositionalUpdate(); + } + } + break; + + //MARK: stateLeavingSession + case stateLeavingSession: // waiting for terminate session response + // The handler for the Session.Terminate response will transition from here to stateSessionTerminated. + break; + + //MARK: stateSessionTerminated + case stateSessionTerminated: + + // Must do this first, since it uses mAudioSession. + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); + + if(mAudioSession) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = NULL; + // We just notified status observers about this change. Don't do it again. + mAudioSessionChanged = false; + + // The old session may now need to be deleted. + reapSession(oldSession); + } + else + { + LL_WARNS("Voice") << "stateSessionTerminated with NULL mAudioSession" << LL_ENDL; + } + + // Always reset the terminate request flag when we get here. + mSessionTerminateRequested = false; + + if(mVoiceEnabled && !mRelogRequested) + { + // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). + setState(stateNoChannel); + } + else + { + // Shutting down voice, continue with disconnecting. + logout(); + + // The state machine will take it from here + mRelogRequested = false; + } + + break; + + //MARK: stateLoggingOut + case stateLoggingOut: // waiting for logout response + // The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut. + break; + + //MARK: stateLoggedOut + case stateLoggedOut: // logout response received + + // Once we're logged out, all these things are invalid. + mAccountHandle.clear(); + deleteAllSessions(); + deleteAllBuddies(); + + if(mVoiceEnabled && !mRelogRequested) + { + // User was logged out, but wants to be logged in. Send a new login request. + setState(stateNeedsLogin); + } + else + { + // shut down the connector + connectorShutdown(); + } + break; + + //MARK: stateConnectorStopping + case stateConnectorStopping: // waiting for connector stop + // The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped. + break; + + //MARK: stateConnectorStopped + case stateConnectorStopped: // connector stop received + setState(stateDisableCleanup); + break; + + //MARK: stateConnectorFailed + case stateConnectorFailed: + setState(stateConnectorFailedWaiting); + break; + //MARK: stateConnectorFailedWaiting + case stateConnectorFailedWaiting: + if(!mVoiceEnabled) + { + setState(stateDisableCleanup); + } + break; + + //MARK: stateLoginFailed + case stateLoginFailed: + setState(stateLoginFailedWaiting); + break; + //MARK: stateLoginFailedWaiting + case stateLoginFailedWaiting: + if(!mVoiceEnabled) + { + setState(stateDisableCleanup); + } + break; + + //MARK: stateJoinSessionFailed + case stateJoinSessionFailed: + // Transition to error state. Send out any notifications here. + if(mAudioSession) + { + LL_WARNS("Voice") << "stateJoinSessionFailed: (" << mAudioSession->mErrorStatusCode << "): " << mAudioSession->mErrorStatusString << LL_ENDL; + } + else + { + LL_WARNS("Voice") << "stateJoinSessionFailed with no current session" << LL_ENDL; + } + + notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN); + setState(stateJoinSessionFailedWaiting); + break; + + //MARK: stateJoinSessionFailedWaiting + case stateJoinSessionFailedWaiting: + // Joining a channel failed, either due to a failed channel name -> sip url lookup or an error from the join message. + // Region crossings may leave this state and try the join again. + if(mSessionTerminateRequested) + { + setState(stateSessionTerminated); + } + break; + + //MARK: stateJail + case stateJail: + // We have given up. Do nothing. + break; + + } + + if(mAudioSession && mAudioSession->mParticipantsChanged) + { + mAudioSession->mParticipantsChanged = false; + mAudioSessionChanged = true; + } + + if(mAudioSessionChanged) + { + mAudioSessionChanged = false; + notifyParticipantObservers(); + } +} + +void LLVivoxVoiceClient::closeSocket(void) +{ + mSocket.reset(); + mConnected = false; +} + +void LLVivoxVoiceClient::loginSendMessage() +{ + std::ostringstream stream; + + bool autoPostCrashDumps = gSavedSettings.getBOOL("VivoxAutoPostCrashDumps"); + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Login.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<AccountName>" << mAccountName << "</AccountName>" + << "<AccountPassword>" << mAccountPassword << "</AccountPassword>" + << "<AudioSessionAnswerMode>VerifyAnswer</AudioSessionAnswerMode>" + << "<EnableBuddiesAndPresence>true</EnableBuddiesAndPresence>" + << "<BuddyManagementMode>Application</BuddyManagementMode>" + << "<ParticipantPropertyFrequency>5</ParticipantPropertyFrequency>" + << (autoPostCrashDumps?"<AutopostCrashDumps>true</AutopostCrashDumps>":"") + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::logout() +{ + // Ensure that we'll re-request provisioning before logging in again + mAccountPassword.clear(); + mVoiceAccountServerURI.clear(); + + setState(stateLoggingOut); + logoutSendMessage(); +} + +void LLVivoxVoiceClient::logoutSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.Logout.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + mAccountHandle.clear(); + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountListBlockRulesSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "requesting block rules" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListBlockRules.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountListAutoAcceptRulesSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "requesting auto-accept rules" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.ListAutoAcceptRules.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionGroupCreateSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "creating session group" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Create.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<Type>Normal</Type>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) +{ + LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; + + session->mCreateInProgress = true; + if(startAudio) + { + session->mMediaConnectInProgress = true; + } + + std::ostringstream stream; + stream + << "<Request requestId=\"" << session->mSIPURI << "\" action=\"Session.Create.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<URI>" << session->mSIPURI << "</URI>"; + + static const std::string allowed_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789" + "-._~"; + + if(!session->mHash.empty()) + { + stream + << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" + << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; + } + + stream + << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" + << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<Name>" << mChannelName << "</Name>" + << "</Request>\n\n\n"; + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) +{ + LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; + + session->mCreateInProgress = true; + if(startAudio) + { + session->mMediaConnectInProgress = true; + } + + std::string password; + if(!session->mHash.empty()) + { + static const std::string allowed_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789" + "-._~" + ; + password = LLURI::escape(session->mHash, allowed_chars); + } + + std::ostringstream stream; + stream + << "<Request requestId=\"" << session->mSIPURI << "\" action=\"SessionGroup.AddSession.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<URI>" << session->mSIPURI << "</URI>" + << "<Name>" << mChannelName << "</Name>" + << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" + << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<Password>" << password << "</Password>" + << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" + << "</Request>\n\n\n" + ; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) +{ + LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; + + session->mMediaConnectInProgress = true; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<Media>Audio</Media>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionTextConnectSendMessage(sessionState *session) +{ + LL_DEBUGS("Voice") << "connecting text to session handle: " << session->mHandle << LL_ENDL; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.TextConnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionTerminate() +{ + mSessionTerminateRequested = true; +} + +void LLVivoxVoiceClient::requestRelog() +{ + mSessionTerminateRequested = true; + mRelogRequested = true; +} + + +void LLVivoxVoiceClient::leaveAudioSession() +{ + if(mAudioSession) + { + LL_DEBUGS("Voice") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; + + switch(getState()) + { + case stateNoChannel: + // In this case, we want to pretend the join failed so our state machine doesn't get stuck. + // Skip the join failed transition state so we don't send out error notifications. + setState(stateJoinSessionFailedWaiting); + break; + case stateJoiningSession: + case stateSessionJoined: + case stateRunning: + if(!mAudioSession->mHandle.empty()) + { + +#if RECORD_EVERYTHING + // HACK: for testing only + // Save looped recording + std::string savepath("/tmp/vivoxrecording"); + { + time_t now = time(NULL); + const size_t BUF_SIZE = 64; + char time_str[BUF_SIZE]; /* Flawfinder: ignore */ + + strftime(time_str, BUF_SIZE, "%Y-%m-%dT%H:%M:%SZ", gmtime(&now)); + savepath += time_str; + } + recordingLoopSave(savepath); +#endif + + sessionMediaDisconnectSendMessage(mAudioSession); + setState(stateLeavingSession); + } + else + { + LL_WARNS("Voice") << "called with no session handle" << LL_ENDL; + setState(stateSessionTerminated); + } + break; + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + setState(stateSessionTerminated); + break; + + default: + LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; + break; + } + } + else + { + LL_WARNS("Voice") << "called with no active session" << LL_ENDL; + setState(stateSessionTerminated); + } +} + +void LLVivoxVoiceClient::sessionTerminateSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionGroupTerminateSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<Media>Audio</Media>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + +} + +void LLVivoxVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) +{ + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" + << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::getCaptureDevicesSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetCaptureDevices.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::getRenderDevicesSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.GetRenderDevices.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::clearCaptureDevices() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + mCaptureDevices.clear(); +} + +void LLVivoxVoiceClient::addCaptureDevice(const std::string& name) +{ + LL_DEBUGS("Voice") << name << LL_ENDL; + + mCaptureDevices.push_back(name); +} + +LLVoiceDeviceList& LLVivoxVoiceClient::getCaptureDevices() +{ + return mCaptureDevices; +} + +void LLVivoxVoiceClient::setCaptureDevice(const std::string& name) +{ + if(name == "Default") + { + if(!mCaptureDevice.empty()) + { + mCaptureDevice.clear(); + mCaptureDeviceDirty = true; + } + } + else + { + if(mCaptureDevice != name) + { + mCaptureDevice = name; + mCaptureDeviceDirty = true; + } + } +} + +void LLVivoxVoiceClient::clearRenderDevices() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + mRenderDevices.clear(); +} + +void LLVivoxVoiceClient::addRenderDevice(const std::string& name) +{ + LL_DEBUGS("Voice") << name << LL_ENDL; + mRenderDevices.push_back(name); +} + +LLVoiceDeviceList& LLVivoxVoiceClient::getRenderDevices() +{ + return mRenderDevices; +} + +void LLVivoxVoiceClient::setRenderDevice(const std::string& name) +{ + if(name == "Default") + { + if(!mRenderDevice.empty()) + { + mRenderDevice.clear(); + mRenderDeviceDirty = true; + } + } + else + { + if(mRenderDevice != name) + { + mRenderDevice = name; + mRenderDeviceDirty = true; + } + } + +} + +void LLVivoxVoiceClient::tuningStart() +{ + mTuningMode = true; + LL_DEBUGS("Voice") << "Starting tuning" << LL_ENDL; + if(getState() >= stateNoChannel) + { + LL_DEBUGS("Voice") << "no channel" << LL_ENDL; + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::tuningStop() +{ + mTuningMode = false; +} + +bool LLVivoxVoiceClient::inTuningMode() +{ + bool result = false; + switch(getState()) + { + case stateMicTuningRunning: + result = true; + break; + default: + break; + } + return result; +} + +void LLVivoxVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool loop) +{ + mTuningAudioFile = name; + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStart.1\">" + << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" + << "<Loop>" << (loop?"1":"0") << "</Loop>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningRenderStopSendMessage() +{ + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" + << "<SoundFilePath>" << mTuningAudioFile << "</SoundFilePath>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningCaptureStartSendMessage(int duration) +{ + LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; + + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStart.1\">" + << "<Duration>" << duration << "</Duration>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::tuningCaptureStopSendMessage() +{ + LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL; + + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" + << "</Request>\n\n\n"; + + writeString(stream.str()); + + mTuningEnergy = 0.0f; +} + +void LLVivoxVoiceClient::tuningSetMicVolume(float volume) +{ + int scaled_volume = scale_mic_volume(volume); + + if(scaled_volume != mTuningMicVolume) + { + mTuningMicVolume = scaled_volume; + mTuningMicVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::tuningSetSpeakerVolume(float volume) +{ + int scaled_volume = scale_speaker_volume(volume); + + if(scaled_volume != mTuningSpeakerVolume) + { + mTuningSpeakerVolume = scaled_volume; + mTuningSpeakerVolumeDirty = true; + } +} + +float LLVivoxVoiceClient::tuningGetEnergy(void) +{ + return mTuningEnergy; +} + +bool LLVivoxVoiceClient::deviceSettingsAvailable() +{ + bool result = true; + + if(!mConnected) + result = false; + + if(mRenderDevices.empty()) + result = false; + + return result; +} + +void LLVivoxVoiceClient::refreshDeviceLists(bool clearCurrentList) +{ + if(clearCurrentList) + { + clearCaptureDevices(); + clearRenderDevices(); + } + getCaptureDevicesSendMessage(); + getRenderDevicesSendMessage(); +} + +void LLVivoxVoiceClient::daemonDied() +{ + // The daemon died, so the connection is gone. Reset everything and start over. + LL_WARNS("Voice") << "Connection to vivox daemon lost. Resetting state."<< LL_ENDL; + + // Try to relaunch the daemon + setState(stateDisableCleanup); +} + +void LLVivoxVoiceClient::giveUp() +{ + // All has failed. Clean up and stop trying. + closeSocket(); + deleteAllSessions(); + deleteAllBuddies(); + + setState(stateJail); +} + +static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) +{ + F32 nat[3], nup[3], nl[3], nvel[3]; // the new at, up, left vectors and the new position and velocity + F64 npos[3]; + + // The original XML command was sent like this: + /* + << "<Position>" + << "<X>" << pos[VX] << "</X>" + << "<Y>" << pos[VZ] << "</Y>" + << "<Z>" << pos[VY] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << mAvatarVelocity[VX] << "</X>" + << "<Y>" << mAvatarVelocity[VZ] << "</Y>" + << "<Z>" << mAvatarVelocity[VY] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << l.mV[VX] << "</X>" + << "<Y>" << u.mV[VX] << "</Y>" + << "<Z>" << a.mV[VX] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << l.mV[VZ] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VY] << "</X>" + << "<Y>" << u.mV [VZ] << "</Y>" + << "<Z>" << a.mV [VY] << "</Z>" + << "</LeftOrientation>"; + */ + +#if 1 + // This was the original transform done when building the XML command + nat[0] = left.mV[VX]; + nat[1] = up.mV[VX]; + nat[2] = at.mV[VX]; + + nup[0] = left.mV[VZ]; + nup[1] = up.mV[VY]; + nup[2] = at.mV[VZ]; + + nl[0] = left.mV[VY]; + nl[1] = up.mV[VZ]; + nl[2] = at.mV[VY]; + + npos[0] = pos.mdV[VX]; + npos[1] = pos.mdV[VZ]; + npos[2] = pos.mdV[VY]; + + nvel[0] = vel.mV[VX]; + nvel[1] = vel.mV[VZ]; + nvel[2] = vel.mV[VY]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } + + // This was the original transform done in the SDK + nat[0] = at.mV[2]; + nat[1] = 0; // y component of at vector is always 0, this was up[2] + nat[2] = -1 * left.mV[2]; + + // We override whatever the application gives us + nup[0] = 0; // x component of up vector is always 0 + nup[1] = 1; // y component of up vector is always 1 + nup[2] = 0; // z component of up vector is always 0 + + nl[0] = at.mV[0]; + nl[1] = 0; // y component of left vector is always zero, this was up[0] + nl[2] = -1 * left.mV[0]; + + npos[2] = pos.mdV[2] * -1.0; + npos[1] = pos.mdV[1]; + npos[0] = pos.mdV[0]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } +#else + // This is the compose of the two transforms (at least, that's what I'm trying for) + nat[0] = at.mV[VX]; + nat[1] = 0; // y component of at vector is always 0, this was up[2] + nat[2] = -1 * up.mV[VZ]; + + // We override whatever the application gives us + nup[0] = 0; // x component of up vector is always 0 + nup[1] = 1; // y component of up vector is always 1 + nup[2] = 0; // z component of up vector is always 0 + + nl[0] = left.mV[VX]; + nl[1] = 0; // y component of left vector is always zero, this was up[0] + nl[2] = -1 * left.mV[VY]; + + npos[0] = pos.mdV[VX]; + npos[1] = pos.mdV[VZ]; + npos[2] = pos.mdV[VY] * -1.0; + + nvel[0] = vel.mV[VX]; + nvel[1] = vel.mV[VZ]; + nvel[2] = vel.mV[VY]; + + for(int i=0;i<3;++i) { + at.mV[i] = nat[i]; + up.mV[i] = nup[i]; + left.mV[i] = nl[i]; + pos.mdV[i] = npos[i]; + } + +#endif +} + +void LLVivoxVoiceClient::sendPositionalUpdate(void) +{ + std::ostringstream stream; + + if(mSpatialCoordsDirty) + { + LLVector3 l, u, a, vel; + LLVector3d pos; + + mSpatialCoordsDirty = false; + + // Always send both speaker and listener positions together. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Set3DPosition.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>"; + + stream << "<SpeakerPosition>"; + +// LL_DEBUGS("Voice") << "Sending speaker position " << mAvatarPosition << LL_ENDL; + l = mAvatarRot.getLeftRow(); + u = mAvatarRot.getUpRow(); + a = mAvatarRot.getFwdRow(); + pos = mAvatarPosition; + vel = mAvatarVelocity; + + // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. + // The old transform is replicated by this function. + oldSDKTransform(l, u, a, pos, vel); + + stream + << "<Position>" + << "<X>" << pos.mdV[VX] << "</X>" + << "<Y>" << pos.mdV[VY] << "</Y>" + << "<Z>" << pos.mdV[VZ] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << vel.mV[VX] << "</X>" + << "<Y>" << vel.mV[VY] << "</Y>" + << "<Z>" << vel.mV[VZ] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << a.mV[VX] << "</X>" + << "<Y>" << a.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << u.mV[VX] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << u.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VX] << "</X>" + << "<Y>" << l.mV [VY] << "</Y>" + << "<Z>" << l.mV [VZ] << "</Z>" + << "</LeftOrientation>"; + + stream << "</SpeakerPosition>"; + + stream << "<ListenerPosition>"; + + LLVector3d earPosition; + LLVector3 earVelocity; + LLMatrix3 earRot; + + switch(mEarLocation) + { + case earLocCamera: + default: + earPosition = mCameraPosition; + earVelocity = mCameraVelocity; + earRot = mCameraRot; + break; + + case earLocAvatar: + earPosition = mAvatarPosition; + earVelocity = mAvatarVelocity; + earRot = mAvatarRot; + break; + + case earLocMixed: + earPosition = mAvatarPosition; + earVelocity = mAvatarVelocity; + earRot = mCameraRot; + break; + } + + l = earRot.getLeftRow(); + u = earRot.getUpRow(); + a = earRot.getFwdRow(); + pos = earPosition; + vel = earVelocity; + +// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; + + oldSDKTransform(l, u, a, pos, vel); + + stream + << "<Position>" + << "<X>" << pos.mdV[VX] << "</X>" + << "<Y>" << pos.mdV[VY] << "</Y>" + << "<Z>" << pos.mdV[VZ] << "</Z>" + << "</Position>" + << "<Velocity>" + << "<X>" << vel.mV[VX] << "</X>" + << "<Y>" << vel.mV[VY] << "</Y>" + << "<Z>" << vel.mV[VZ] << "</Z>" + << "</Velocity>" + << "<AtOrientation>" + << "<X>" << a.mV[VX] << "</X>" + << "<Y>" << a.mV[VY] << "</Y>" + << "<Z>" << a.mV[VZ] << "</Z>" + << "</AtOrientation>" + << "<UpOrientation>" + << "<X>" << u.mV[VX] << "</X>" + << "<Y>" << u.mV[VY] << "</Y>" + << "<Z>" << u.mV[VZ] << "</Z>" + << "</UpOrientation>" + << "<LeftOrientation>" + << "<X>" << l.mV [VX] << "</X>" + << "<Y>" << l.mV [VY] << "</Y>" + << "<Z>" << l.mV [VZ] << "</Z>" + << "</LeftOrientation>"; + + + stream << "</ListenerPosition>"; + + stream << "</Request>\n\n\n"; + } + + if(mAudioSession && (mAudioSession->mVolumeDirty || mAudioSession->mMuteDirty)) + { + participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); + + mAudioSession->mVolumeDirty = false; + mAudioSession->mMuteDirty = false; + + for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) + { + participantState *p = iter->second; + + if(p->mVolumeDirty) + { + // Can't set volume/mute for yourself + if(!p->mIsSelf) + { + // scale from the range 0.0-1.0 to vivox volume in the range 0-100 + S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); + bool mute = p->mOnMuteList; + + if(mute) + { + // SetParticipantMuteForMe doesn't work in p2p sessions. + // If we want the user to be muted, set their volume to 0 as well. + // This isn't perfect, but it will at least reduce their volume to a minimum. + volume = 0; + // Mark the current volume level as set to prevent incoming events + // changing it to 0, so that we can return to it when unmuting. + p->mVolumeSet = true; + } + + if(volume == 0) + { + mute = true; + } + + LL_DEBUGS("Voice") << "Setting volume/mute for avatar " << p->mAvatarID << " to " << volume << (mute?"/true":"/false") << LL_ENDL; + + // SLIM SDK: Send both volume and mute commands. + + // Send a "volume for me" command for the user. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantVolumeForMe.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" + << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" + << "<Volume>" << volume << "</Volume>" + << "</Request>\n\n\n"; + + if(!mAudioSession->mIsP2P) + { + // Send a "mute for me" command for the user + // Doesn't work in P2P sessions + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantMuteForMe.1\">" + << "<SessionHandle>" << getAudioSessionHandle() << "</SessionHandle>" + << "<ParticipantURI>" << p->mURI << "</ParticipantURI>" + << "<Mute>" << (mute?"1":"0") << "</Mute>" + << "<Scope>Audio</Scope>" + << "</Request>\n\n\n"; + } + } + + p->mVolumeDirty = false; + } + } + } + + buildLocalAudioUpdates(stream); + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + + // Friends list updates can be huge, especially on the first voice login of an account with lots of friends. + // Batching them all together can choke SLVoice, so send them in separate writes. + sendFriendsListUpdates(); +} + +void LLVivoxVoiceClient::buildSetCaptureDevice(std::ostringstream &stream) +{ + if(mCaptureDeviceDirty) + { + LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" + << "<CaptureDeviceSpecifier>" << mCaptureDevice << "</CaptureDeviceSpecifier>" + << "</Request>" + << "\n\n\n"; + + mCaptureDeviceDirty = false; + } +} + +void LLVivoxVoiceClient::buildSetRenderDevice(std::ostringstream &stream) +{ + if(mRenderDeviceDirty) + { + LL_DEBUGS("Voice") << "Setting output device = \"" << mRenderDevice << "\"" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetRenderDevice.1\">" + << "<RenderDeviceSpecifier>" << mRenderDevice << "</RenderDeviceSpecifier>" + << "</Request>" + << "\n\n\n"; + mRenderDeviceDirty = false; + } +} + +void LLVivoxVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream) +{ + buildSetCaptureDevice(stream); + + buildSetRenderDevice(stream); + + if(mPTTDirty) + { + mPTTDirty = false; + + // Send a local mute command. + // NOTE that the state of "PTT" is the inverse of "local mute". + // (i.e. when PTT is true, we send a mute command with "false", and vice versa) + + LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << (mPTT?"false":"true") << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mSpeakerMuteDirty) + { + const char *muteval = ((mSpeakerVolume <= scale_speaker_volume(0))?"true":"false"); + + mSpeakerMuteDirty = false; + + LL_INFOS("Voice") << "Setting speaker mute to " << muteval << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalSpeaker.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << muteval << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mSpeakerVolumeDirty) + { + mSpeakerVolumeDirty = false; + + LL_INFOS("Voice") << "Setting speaker volume to " << mSpeakerVolume << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalSpeakerVolume.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << mSpeakerVolume << "</Value>" + << "</Request>\n\n\n"; + + } + + if(mMicVolumeDirty) + { + mMicVolumeDirty = false; + + LL_INFOS("Voice") << "Setting mic volume to " << mMicVolume << LL_ENDL; + + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalMicVolume.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>" << mMicVolume << "</Value>" + << "</Request>\n\n\n"; + } + + +} + +void LLVivoxVoiceClient::checkFriend(const LLUUID& id) +{ + std::string name; + buddyListEntry *buddy = findBuddy(id); + + // Make sure we don't add a name before it's been looked up. + if(gCacheName->getFullName(id, name)) + { + + const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); + bool canSeeMeOnline = false; + if(relationInfo && relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) + canSeeMeOnline = true; + + // When we get here, mNeedsSend is true and mInSLFriends is false. Change them as necessary. + + if(buddy) + { + // This buddy is already in both lists. + + if(name != buddy->mDisplayName) + { + // The buddy is in the list with the wrong name. Update it with the correct name. + LL_WARNS("Voice") << "Buddy " << id << " has wrong name (\"" << buddy->mDisplayName << "\" should be \"" << name << "\"), updating."<< LL_ENDL; + buddy->mDisplayName = name; + buddy->mNeedsNameUpdate = true; // This will cause the buddy to be resent. + } + } + else + { + // This buddy was not in the vivox list, needs to be added. + buddy = addBuddy(sipURIFromID(id), name); + buddy->mUUID = id; + } + + // In all the above cases, the buddy is in the SL friends list (which is how we got here). + buddy->mInSLFriends = true; + buddy->mCanSeeMeOnline = canSeeMeOnline; + buddy->mNameResolved = true; + + } + else + { + // This name hasn't been looked up yet. Don't do anything with this buddy list entry until it has. + if(buddy) + { + buddy->mNameResolved = false; + } + + // Initiate a lookup. + // The "lookup completed" callback will ensure that the friends list is rechecked after it completes. + lookupName(id); + } +} + +void LLVivoxVoiceClient::clearAllLists() +{ + // FOR TESTING ONLY + + // This will send the necessary commands to delete ALL buddies, autoaccept rules, and block rules SLVoice tells us about. + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) + { + buddyListEntry *buddy = buddy_it->second; + buddy_it++; + + std::ostringstream stream; + + if(buddy->mInVivoxBuddies) + { + // delete this entry from the vivox buddy list + buddy->mInVivoxBuddies = false; + LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "</Request>\n\n\n"; + } + + if(buddy->mHasBlockListEntry) + { + // Delete the associated block list entry (so the block list doesn't fill up with junk) + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + } + if(buddy->mHasAutoAcceptListEntry) + { + // Delete the associated auto-accept list entry (so the auto-accept list doesn't fill up with junk) + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + } + + writeString(stream.str()); + + } +} + +void LLVivoxVoiceClient::sendFriendsListUpdates() +{ + if(mBuddyListMapPopulated && mBlockRulesListReceived && mAutoAcceptRulesListReceived && mFriendsListDirty) + { + mFriendsListDirty = false; + + if(0) + { + // FOR TESTING ONLY -- clear all buddy list, block list, and auto-accept list entries. + clearAllLists(); + return; + } + + LL_INFOS("Voice") << "Checking vivox buddy list against friends list..." << LL_ENDL; + + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + // reset the temp flags in the local buddy list + buddy_it->second->mInSLFriends = false; + } + + // correlate with the friends list + { + LLCollectAllBuddies collect; + LLAvatarTracker::instance().applyFunctor(collect); + LLCollectAllBuddies::buddy_map_t::const_iterator it = collect.mOnline.begin(); + LLCollectAllBuddies::buddy_map_t::const_iterator end = collect.mOnline.end(); + + for ( ; it != end; ++it) + { + checkFriend(it->second); + } + it = collect.mOffline.begin(); + end = collect.mOffline.end(); + for ( ; it != end; ++it) + { + checkFriend(it->second); + } + } + + LL_INFOS("Voice") << "Sending friend list updates..." << LL_ENDL; + + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end();) + { + buddyListEntry *buddy = buddy_it->second; + buddy_it++; + + // Ignore entries that aren't resolved yet. + if(buddy->mNameResolved) + { + std::ostringstream stream; + + if(buddy->mInSLFriends && (!buddy->mInVivoxBuddies || buddy->mNeedsNameUpdate)) + { + if(mNumberOfAliases > 0) + { + // Add (or update) this entry in the vivox buddy list + buddy->mInVivoxBuddies = true; + buddy->mNeedsNameUpdate = false; + LL_DEBUGS("Voice") << "add/update " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddySet.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "<DisplayName>" << buddy->mDisplayName << "</DisplayName>" + << "<BuddyData></BuddyData>" // Without this, SLVoice doesn't seem to parse the command. + << "<GroupID>0</GroupID>" + << "</Request>\n\n\n"; + } + } + else if(!buddy->mInSLFriends) + { + // This entry no longer exists in your SL friends list. Remove all traces of it from the Vivox buddy list. + if(buddy->mInVivoxBuddies) + { + // delete this entry from the vivox buddy list + buddy->mInVivoxBuddies = false; + LL_DEBUGS("Voice") << "delete " << buddy->mURI << " (" << buddy->mDisplayName << ")" << LL_ENDL; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.BuddyDelete.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "</Request>\n\n\n"; + } + + if(buddy->mHasBlockListEntry) + { + // Delete the associated block list entry, if any + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + } + if(buddy->mHasAutoAcceptListEntry) + { + // Delete the associated auto-accept list entry, if any + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + } + } + + if(buddy->mInSLFriends) + { + + if(buddy->mCanSeeMeOnline) + { + // Buddy should not be blocked. + + // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. + + // If the buddy has a block list entry, delete it. + if(buddy->mHasBlockListEntry) + { + buddy->mHasBlockListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "</Request>\n\n\n"; + + + // If we just deleted a block list entry, add an auto-accept entry. + if(!buddy->mHasAutoAcceptListEntry) + { + buddy->mHasAutoAcceptListEntry = true; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "<AutoAddAsBuddy>0</AutoAddAsBuddy>" + << "</Request>\n\n\n"; + } + } + } + else + { + // Buddy should be blocked. + + // If this buddy doesn't already have either a block or autoaccept list entry, we'll update their status when we receive a SubscriptionEvent. + + // If this buddy has an autoaccept entry, delete it + if(buddy->mHasAutoAcceptListEntry) + { + buddy->mHasAutoAcceptListEntry = false; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.DeleteAutoAcceptRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<AutoAcceptMask>" << buddy->mURI << "</AutoAcceptMask>" + << "</Request>\n\n\n"; + + // If we just deleted an auto-accept entry, add a block list entry. + if(!buddy->mHasBlockListEntry) + { + buddy->mHasBlockListEntry = true; + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.CreateBlockRule.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BlockMask>" << buddy->mURI << "</BlockMask>" + << "<PresenceOnly>1</PresenceOnly>" + << "</Request>\n\n\n"; + } + } + } + + if(!buddy->mInSLFriends && !buddy->mInVivoxBuddies) + { + // Delete this entry from the local buddy list. This should NOT invalidate the iterator, + // since it has already been incremented to the next entry. + deleteBuddy(buddy->mURI); + } + + } + writeString(stream.str()); + } + } + } +} + +///////////////////////////// +// Response/Event handlers + +void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Connector.Create response failure: " << statusString << LL_ENDL; + setState(stateConnectorFailed); + LLSD args; + std::stringstream errs; + errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000"; + args["HOSTID"] = errs.str(); + if (LLGridManager::getInstance()->isSystemGrid()) + { + LLNotificationsUtil::add("NoVoiceConnect", args); + } + else + { + LLNotificationsUtil::add("NoVoiceConnect-GIAB", args); + } + } + else + { + // Connector created, move forward. + LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; + mVoiceVersion.serverVersion = versionID; + mConnectorHandle = connectorHandle; + if(getState() == stateConnectorStarting) + { + setState(stateConnectorStarted); + } + } +} + +void LLVivoxVoiceClient::loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases) +{ + LL_DEBUGS("Voice") << "Account.Login response (" << statusCode << "): " << statusString << LL_ENDL; + + // Status code of 20200 means "bad password". We may want to special-case that at some point. + + if ( statusCode == 401 ) + { + // Login failure which is probably caused by the delay after a user's password being updated. + LL_INFOS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; + setState(stateLoginRetry); + } + else if(statusCode != 0) + { + LL_WARNS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL; + setState(stateLoginFailed); + } + else + { + // Login succeeded, move forward. + mAccountHandle = accountHandle; + mNumberOfAliases = numberOfAliases; + // This needs to wait until the AccountLoginStateChangeEvent is received. +// if(getState() == stateLoggingIn) +// { +// setState(stateLoggedIn); +// } + } +} + +void LLVivoxVoiceClient::sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) +{ + sessionState *session = findSessionBeingCreatedByURI(requestId); + + if(session) + { + session->mCreateInProgress = false; + } + + if(statusCode != 0) + { + LL_WARNS("Voice") << "Session.Create response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + { + setState(stateJoinSessionFailed); + } + else + { + reapSession(session); + } + } + } + else + { + LL_INFOS("Voice") << "Session.Create response received (success), session handle is " << sessionHandle << LL_ENDL; + if(session) + { + setSessionHandle(session, sessionHandle); + } + } +} + +void LLVivoxVoiceClient::sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle) +{ + sessionState *session = findSessionBeingCreatedByURI(requestId); + + if(session) + { + session->mCreateInProgress = false; + } + + if(statusCode != 0) + { + LL_WARNS("Voice") << "SessionGroup.AddSession response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + { + setState(stateJoinSessionFailed); + } + else + { + reapSession(session); + } + } + } + else + { + LL_DEBUGS("Voice") << "SessionGroup.AddSession response received (success), session handle is " << sessionHandle << LL_ENDL; + if(session) + { + setSessionHandle(session, sessionHandle); + } + } +} + +void LLVivoxVoiceClient::sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString) +{ + sessionState *session = findSession(requestId); + if(statusCode != 0) + { + LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL; + if(session) + { + session->mMediaConnectInProgress = false; + session->mErrorStatusCode = statusCode; + session->mErrorStatusString = statusString; + if(session == mAudioSession) + setState(stateJoinSessionFailed); + } + } + else + { + LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::logoutResponse(int statusCode, std::string &statusString) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Account.Logout response failure: " << statusString << LL_ENDL; + // Should this ever fail? do we care if it does? + } +} + +void LLVivoxVoiceClient::connectorShutdownResponse(int statusCode, std::string &statusString) +{ + if(statusCode != 0) + { + LL_WARNS("Voice") << "Connector.InitiateShutdown response failure: " << statusString << LL_ENDL; + // Should this ever fail? do we care if it does? + } + + mConnected = false; + + if(getState() == stateConnectorStopping) + { + setState(stateConnectorStopped); + } +} + +void LLVivoxVoiceClient::sessionAddedEvent( + std::string &uriString, + std::string &alias, + std::string &sessionHandle, + std::string &sessionGroupHandle, + bool isChannel, + bool incoming, + std::string &nameString, + std::string &applicationString) +{ + sessionState *session = NULL; + + LL_INFOS("Voice") << "session " << uriString << ", alias " << alias << ", name " << nameString << " handle " << sessionHandle << LL_ENDL; + + session = addSession(uriString, sessionHandle); + if(session) + { + session->mGroupHandle = sessionGroupHandle; + session->mIsChannel = isChannel; + session->mIncoming = incoming; + session->mAlias = alias; + + // Generate a caller UUID -- don't need to do this for channels + if(!session->mIsChannel) + { + if(IDFromName(session->mSIPURI, session->mCallerID)) + { + // Normal URI(base64-encoded UUID) + } + else if(!session->mAlias.empty() && IDFromName(session->mAlias, session->mCallerID)) + { + // Wrong URI, but an alias is available. Stash the incoming URI as an alternate + session->mAlternateSIPURI = session->mSIPURI; + + // and generate a proper URI from the ID. + setSessionURI(session, sipURIFromID(session->mCallerID)); + } + else + { + LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; + setUUIDFromStringHash(session->mCallerID, session->mSIPURI); + session->mSynthesizedCallerID = true; + + // Can't look up the name in this case -- we have to extract it from the URI. + std::string namePortion = nameFromsipURI(session->mSIPURI); + if(namePortion.empty()) + { + // Didn't seem to be a SIP URI, just use the whole provided name. + namePortion = nameString; + } + + // Some incoming names may be separated with an underscore instead of a space. Fix this. + LLStringUtil::replaceChar(namePortion, '_', ' '); + + // Act like we just finished resolving the name (this stores it in all the right places) + avatarNameResolved(session->mCallerID, namePortion); + } + + LL_INFOS("Voice") << "caller ID: " << session->mCallerID << LL_ENDL; + + if(!session->mSynthesizedCallerID) + { + // If we got here, we don't have a proper name. Initiate a lookup. + lookupName(session->mCallerID); + } + } + } +} + +void LLVivoxVoiceClient::sessionGroupAddedEvent(std::string &sessionGroupHandle) +{ + LL_DEBUGS("Voice") << "handle " << sessionGroupHandle << LL_ENDL; + +#if USE_SESSION_GROUPS + if(mMainSessionGroupHandle.empty()) + { + // This is the first (i.e. "main") session group. Save its handle. + mMainSessionGroupHandle = sessionGroupHandle; + } + else + { + LL_DEBUGS("Voice") << "Already had a session group handle " << mMainSessionGroupHandle << LL_ENDL; + } +#endif +} + +void LLVivoxVoiceClient::joinedAudioSession(sessionState *session) +{ + LL_DEBUGS("Voice") << "Joined Audio Session" << LL_ENDL; + if(mAudioSession != session) + { + sessionState *oldSession = mAudioSession; + + mAudioSession = session; + mAudioSessionChanged = true; + + // The old session may now need to be deleted. + reapSession(oldSession); + } + + // This is the session we're joining. + if(getState() == stateJoiningSession) + { + setState(stateSessionJoined); + + // SLIM SDK: we don't always receive a participant state change for ourselves when joining a channel now. + // Add the current user as a participant here. + participantState *participant = session->addParticipant(sipURIFromName(mAccountName)); + if(participant) + { + participant->mIsSelf = true; + lookupName(participant->mAvatarID); + + LL_INFOS("Voice") << "added self as participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + } + + if(!session->mIsChannel) + { + // this is a p2p session. Make sure the other end is added as a participant. + participantState *participant = session->addParticipant(session->mSIPURI); + if(participant) + { + if(participant->mAvatarIDValid) + { + lookupName(participant->mAvatarID); + } + else if(!session->mName.empty()) + { + participant->mDisplayName = session->mName; + avatarNameResolved(participant->mAvatarID, session->mName); + } + + // TODO: Question: Do we need to set up mAvatarID/mAvatarIDValid here? + LL_INFOS("Voice") << "added caller as participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + } + } + } +} + +void LLVivoxVoiceClient::sessionRemovedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle) +{ + LL_INFOS("Voice") << "handle " << sessionHandle << LL_ENDL; + + sessionState *session = findSession(sessionHandle); + if(session) + { + leftAudioSession(session); + + // This message invalidates the session's handle. Set it to empty. + setSessionHandle(session); + + // This also means that the session's session group is now empty. + // Terminate the session group so it doesn't leak. + sessionGroupTerminateSendMessage(session); + + // Reset the media state (we now have no info) + session->mMediaStreamState = streamStateUnknown; + session->mTextStreamState = streamStateUnknown; + + // Conditionally delete the session + reapSession(session); + } + else + { + LL_WARNS("Voice") << "unknown session " << sessionHandle << " removed" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::reapSession(sessionState *session) +{ + if(session) + { + if(!session->mHandle.empty()) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; + } + else if(session->mCreateInProgress) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; + } + else if(session->mMediaConnectInProgress) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; + } + else if(session == mAudioSession) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; + } + else if(session == mNextAudioSession) + { + LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; + } + else + { + // TODO: Question: Should we check for queued text messages here? + // We don't have a reason to keep tracking this session, so just delete it. + LL_DEBUGS("Voice") << "deleting session " << session->mSIPURI << LL_ENDL; + deleteSession(session); + session = NULL; + } + } + else + { +// LL_DEBUGS("Voice") << "session is NULL" << LL_ENDL; + } +} + +// Returns true if the session seems to indicate we've moved to a region on a different voice server +bool LLVivoxVoiceClient::sessionNeedsRelog(sessionState *session) +{ + bool result = false; + + if(session != NULL) + { + // Only make this check for spatial channels (so it won't happen for group or p2p calls) + if(session->mIsSpatial) + { + std::string::size_type atsign; + + atsign = session->mSIPURI.find("@"); + + if(atsign != std::string::npos) + { + std::string urihost = session->mSIPURI.substr(atsign + 1); + if(stricmp(urihost.c_str(), mVoiceSIPURIHostName.c_str())) + { + // The hostname in this URI is different from what we expect. This probably means we need to relog. + + // We could make a ProvisionVoiceAccountRequest and compare the result with the current values of + // mVoiceSIPURIHostName and mVoiceAccountServerURI to be really sure, but this is a pretty good indicator. + + result = true; + } + } + } + } + + return result; +} + +void LLVivoxVoiceClient::leftAudioSession( + sessionState *session) +{ + if(mAudioSession == session) + { + switch(getState()) + { + case stateJoiningSession: + case stateSessionJoined: + case stateRunning: + case stateLeavingSession: + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + // normal transition + LL_DEBUGS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; + setState(stateSessionTerminated); + break; + + case stateSessionTerminated: + // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. + LL_WARNS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; + break; + + default: + LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; + setState(stateSessionTerminated); + break; + } + } +} + +void LLVivoxVoiceClient::accountLoginStateChangeEvent( + std::string &accountHandle, + int statusCode, + std::string &statusString, + int state) +{ + /* + According to Mike S., status codes for this event are: + login_state_logged_out=0, + login_state_logged_in = 1, + login_state_logging_in = 2, + login_state_logging_out = 3, + login_state_resetting = 4, + login_state_error=100 + */ + + LL_DEBUGS("Voice") << "state change event: " << state << LL_ENDL; + switch(state) + { + case 1: + if(getState() == stateLoggingIn) + { + setState(stateLoggedIn); + } + break; + + case 3: + // The user is in the process of logging out. + setState(stateLoggingOut); + break; + + case 0: + // The user has been logged out. + setState(stateLoggedOut); + break; + + default: + //Used to be a commented out warning + LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL; + break; + } +} + +void LLVivoxVoiceClient::mediaStreamUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + int statusCode, + std::string &statusString, + int state, + bool incoming) +{ + sessionState *session = findSession(sessionHandle); + + LL_DEBUGS("Voice") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; + + if(session) + { + // We know about this session + + // Save the state for later use + session->mMediaStreamState = state; + + switch(statusCode) + { + case 0: + case 200: + // generic success + // Don't change the saved error code (it may have been set elsewhere) + break; + default: + // save the status code for later + session->mErrorStatusCode = statusCode; + break; + } + + switch(state) + { + case streamStateIdle: + // Standard "left audio session" + session->mVoiceEnabled = false; + session->mMediaConnectInProgress = false; + leftAudioSession(session); + break; + + case streamStateConnected: + session->mVoiceEnabled = true; + session->mMediaConnectInProgress = false; + joinedAudioSession(session); + break; + + case streamStateRinging: + if(incoming) + { + // Send the voice chat invite to the GUI layer + // TODO: Question: Should we correlate with the mute list here? + session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); + session->mVoiceInvitePending = true; + if(session->mName.empty()) + { + lookupName(session->mCallerID); + } + else + { + // Act like we just finished resolving the name + avatarNameResolved(session->mCallerID, session->mName); + } + } + break; + + default: + LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; + break; + + } + + } + else + { + LL_WARNS("Voice") << "session " << sessionHandle << "not found"<< LL_ENDL; + } +} + +void LLVivoxVoiceClient::textStreamUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + bool enabled, + int state, + bool incoming) +{ + sessionState *session = findSession(sessionHandle); + + if(session) + { + // Save the state for later use + session->mTextStreamState = state; + + // We know about this session + switch(state) + { + case 0: // We see this when the text stream closes + LL_DEBUGS("Voice") << "stream closed" << LL_ENDL; + break; + + case 1: // We see this on an incoming call from the Connector + // Try to send any text messages queued for this session. + sendQueuedTextMessages(session); + + // Send the text chat invite to the GUI layer + // TODO: Question: Should we correlate with the mute list here? + session->mTextInvitePending = true; + if(session->mName.empty()) + { + lookupName(session->mCallerID); + } + else + { + // Act like we just finished resolving the name + avatarNameResolved(session->mCallerID, session->mName); + } + break; + + default: + LL_WARNS("Voice") << "unknown state " << state << LL_ENDL; + break; + + } + } +} + +void LLVivoxVoiceClient::participantAddedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + std::string &nameString, + std::string &displayNameString, + int participantType) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->addParticipant(uriString); + if(participant) + { + participant->mAccountName = nameString; + + LL_DEBUGS("Voice") << "added participant \"" << participant->mAccountName + << "\" (" << participant->mAvatarID << ")"<< LL_ENDL; + + if(participant->mAvatarIDValid) + { + // Initiate a lookup + lookupName(participant->mAvatarID); + } + else + { + // If we don't have a valid avatar UUID, we need to fill in the display name to make the active speakers floater work. + std::string namePortion = nameFromsipURI(uriString); + if(namePortion.empty()) + { + // Problem with the SIP URI, fall back to the display name + namePortion = displayNameString; + } + if(namePortion.empty()) + { + // Problems with both of the above, fall back to the account name + namePortion = nameString; + } + + // Set the display name (which is a hint to the active speakers window not to do its own lookup) + participant->mDisplayName = namePortion; + avatarNameResolved(participant->mAvatarID, namePortion); + } + } + } +} + +void LLVivoxVoiceClient::participantRemovedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + std::string &nameString) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->findParticipant(uriString); + if(participant) + { + session->removeParticipant(participant); + } + else + { + LL_DEBUGS("Voice") << "unknown participant " << uriString << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "unknown session " << sessionHandle << LL_ENDL; + } +} + + +void LLVivoxVoiceClient::participantUpdatedEvent( + std::string &sessionHandle, + std::string &sessionGroupHandle, + std::string &uriString, + std::string &alias, + bool isModeratorMuted, + bool isSpeaking, + int volume, + F32 energy) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + participantState *participant = session->findParticipant(uriString); + + if(participant) + { + participant->mIsSpeaking = isSpeaking; + participant->mIsModeratorMuted = isModeratorMuted; + + // SLIM SDK: convert range: ensure that energy is set to zero if is_speaking is false + if (isSpeaking) + { + participant->mSpeakingTimeout.reset(); + participant->mPower = energy; + } + else + { + participant->mPower = 0.0f; + } + + // Ignore incoming volume level if it has been explicitly set, or there + // is a volume or mute change pending. + if ( !participant->mVolumeSet && !participant->mVolumeDirty) + { + participant->mVolume = (F32)volume * VOLUME_SCALE_VIVOX; + } + + // *HACK: mantipov: added while working on EXT-3544 + /* + Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE + LLViewerChatterBoxSessionAgentListUpdates::post() sometimes AFTER. + + participantUpdatedEvent updates voice participant state in particular participantState::mIsModeratorMuted + Originally we wanted to update session Speaker Manager to fire LLSpeakerVoiceModerationEvent to fix the EXT-3544 bug. + Calling of the LLSpeakerMgr::update() method was added into LLIMMgr::processAgentListUpdates. + + But in case participantUpdatedEvent() is called after LLViewerChatterBoxSessionAgentListUpdates::post() + voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager + and event is not fired. + + So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it + in LLCallFloater::draw() + */ + LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); + + // ignore session ID of local chat + if (voice_cnl && voice_cnl->getSessionID().notNull()) + { + LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(voice_cnl->getSessionID()); + if (speaker_manager) + { + speaker_manager->update(true); + } + } + + } + else + { + LL_WARNS("Voice") << "unknown participant: " << uriString << LL_ENDL; + } + } + else + { + LL_INFOS("Voice") << "unknown session " << sessionHandle << LL_ENDL; + } +} + +void LLVivoxVoiceClient::buddyPresenceEvent( + std::string &uriString, + std::string &alias, + std::string &statusString, + std::string &applicationString) +{ + buddyListEntry *buddy = findBuddy(uriString); + + if(buddy) + { + LL_DEBUGS("Voice") << "Presence event for " << buddy->mDisplayName << " status \"" << statusString << "\", application \"" << applicationString << "\""<< LL_ENDL; + LL_DEBUGS("Voice") << "before: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; + + if(applicationString.empty()) + { + // This presence event is from a client that doesn't set up the Application string. Do things the old-skool way. + // NOTE: this will be needed to support people who aren't on the 3010-class SDK yet. + + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // User went offline with a non-SLim-enabled viewer. + buddy->mOnlineSL = false; + } + else if ( stricmp("Online", statusString.c_str())== 0) + { + // User came online with a non-SLim-enabled viewer. + buddy->mOnlineSL = true; + } + else + { + // If the user is online through SLim, their status will be "Online-slc", "Away", or something else. + // NOTE: we should never see this unless someone is running an OLD version of SLim -- the versions that should be in use now all set the application string. + buddy->mOnlineSLim = true; + } + } + else if(applicationString.find("SecondLifeViewer") != std::string::npos) + { + // This presence event is from a viewer that sets the application string + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // Viewer says they're offline + buddy->mOnlineSL = false; + } + else + { + // Viewer says they're online + buddy->mOnlineSL = true; + } + } + else + { + // This presence event is from something which is NOT the SL viewer (assume it's SLim). + if ( stricmp("Unknown", statusString.c_str())== 0) + { + // SLim says they're offline + buddy->mOnlineSLim = false; + } + else + { + // SLim says they're online + buddy->mOnlineSLim = true; + } + } + + LL_DEBUGS("Voice") << "after: mOnlineSL = " << (buddy->mOnlineSL?"true":"false") << ", mOnlineSLim = " << (buddy->mOnlineSLim?"true":"false") << LL_ENDL; + + // HACK -- increment the internal change serial number in the LLRelationship (without changing the actual status), so the UI notices the change. + LLAvatarTracker::instance().setBuddyOnline(buddy->mUUID,LLAvatarTracker::instance().isBuddyOnline(buddy->mUUID)); + + notifyFriendObservers(); + } + else + { + LL_DEBUGS("Voice") << "Presence for unknown buddy " << uriString << LL_ENDL; + } +} + +void LLVivoxVoiceClient::messageEvent( + std::string &sessionHandle, + std::string &uriString, + std::string &alias, + std::string &messageHeader, + std::string &messageBody, + std::string &applicationString) +{ + LL_DEBUGS("Voice") << "Message event, session " << sessionHandle << " from " << uriString << LL_ENDL; +// LL_DEBUGS("Voice") << " header " << messageHeader << ", body: \n" << messageBody << LL_ENDL; + + if(messageHeader.find("text/html") != std::string::npos) + { + std::string message; + + { + const std::string startMarker = "<body"; + const std::string startMarker2 = ">"; + const std::string endMarker = "</body>"; + const std::string startSpan = "<span"; + const std::string endSpan = "</span>"; + std::string::size_type start; + std::string::size_type end; + + // Default to displaying the raw string, so the message gets through. + message = messageBody; + + // Find the actual message text within the XML fragment + start = messageBody.find(startMarker); + start = messageBody.find(startMarker2, start); + end = messageBody.find(endMarker); + + if(start != std::string::npos) + { + start += startMarker2.size(); + + if(end != std::string::npos) + end -= start; + + message.assign(messageBody, start, end); + } + else + { + // Didn't find a <body>, try looking for a <span> instead. + start = messageBody.find(startSpan); + start = messageBody.find(startMarker2, start); + end = messageBody.find(endSpan); + + if(start != std::string::npos) + { + start += startMarker2.size(); + + if(end != std::string::npos) + end -= start; + + message.assign(messageBody, start, end); + } + } + } + +// LL_DEBUGS("Voice") << " raw message = \n" << message << LL_ENDL; + + // strip formatting tags + { + std::string::size_type start; + std::string::size_type end; + + while((start = message.find('<')) != std::string::npos) + { + if((end = message.find('>', start + 1)) != std::string::npos) + { + // Strip out the tag + message.erase(start, (end + 1) - start); + } + else + { + // Avoid an infinite loop + break; + } + } + } + + // Decode ampersand-escaped chars + { + std::string::size_type mark = 0; + + // The text may contain text encoded with <, >, and & + mark = 0; + while((mark = message.find("<", mark)) != std::string::npos) + { + message.replace(mark, 4, "<"); + mark += 1; + } + + mark = 0; + while((mark = message.find(">", mark)) != std::string::npos) + { + message.replace(mark, 4, ">"); + mark += 1; + } + + mark = 0; + while((mark = message.find("&", mark)) != std::string::npos) + { + message.replace(mark, 5, "&"); + mark += 1; + } + } + + // strip leading/trailing whitespace (since we always seem to get a couple newlines) + LLStringUtil::trim(message); + +// LL_DEBUGS("Voice") << " stripped message = \n" << message << LL_ENDL; + + sessionState *session = findSession(sessionHandle); + if(session) + { + bool is_busy = gAgent.getBusy(); + bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat); + bool is_linden = LLMuteList::getInstance()->isLinden(session->mName); + bool quiet_chat = false; + LLChat chat; + + chat.mMuted = is_muted && !is_linden; + + if(!chat.mMuted) + { + chat.mFromID = session->mCallerID; + chat.mFromName = session->mName; + chat.mSourceType = CHAT_SOURCE_AGENT; + + if(is_busy && !is_linden) + { + quiet_chat = true; + // TODO: Question: Return busy mode response here? Or maybe when session is started instead? + } + + LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL; + gIMMgr->addMessage(session->mIMSessionID, + session->mCallerID, + session->mName.c_str(), + message.c_str(), + LLStringUtil::null, // default arg + IM_NOTHING_SPECIAL, // default arg + 0, // default arg + LLUUID::null, // default arg + LLVector3::zero, // default arg + true); // prepend name and make it a link to the user's profile + + } + } + } +} + +void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType) +{ + sessionState *session = findSession(sessionHandle); + + if(session) + { + participantState *participant = session->findParticipant(uriString); + if(participant) + { + if (!stricmp(notificationType.c_str(), "Typing")) + { + // Other end started typing + // TODO: The proper way to add a typing notification seems to be LLIMMgr::processIMTypingStart(). + // It requires an LLIMInfo for the message, which we don't have here. + } + else if (!stricmp(notificationType.c_str(), "NotTyping")) + { + // Other end stopped typing + // TODO: The proper way to remove a typing notification seems to be LLIMMgr::processIMTypingStop(). + // It requires an LLIMInfo for the message, which we don't have here. + } + else + { + LL_DEBUGS("Voice") << "Unknown notification type " << notificationType << "for participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown participant " << uriString << " in session " << session->mSIPURI << LL_ENDL; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown session handle " << sessionHandle << LL_ENDL; + } +} + +void LLVivoxVoiceClient::subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType) +{ + buddyListEntry *buddy = findBuddy(buddyURI); + + if(!buddy) + { + // Couldn't find buddy by URI, try converting the alias... + if(!alias.empty()) + { + LLUUID id; + if(IDFromName(alias, id)) + { + buddy = findBuddy(id); + } + } + } + + if(buddy) + { + std::ostringstream stream; + + if(buddy->mCanSeeMeOnline) + { + // Sending the response will create an auto-accept rule + buddy->mHasAutoAcceptListEntry = true; + } + else + { + // Sending the response will create a block rule + buddy->mHasBlockListEntry = true; + } + + if(buddy->mInSLFriends) + { + buddy->mInVivoxBuddies = true; + } + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.SendSubscriptionReply.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<BuddyURI>" << buddy->mURI << "</BuddyURI>" + << "<RuleType>" << (buddy->mCanSeeMeOnline?"Allow":"Hide") << "</RuleType>" + << "<AutoAccept>"<< (buddy->mInSLFriends?"1":"0")<< "</AutoAccept>" + << "<SubscriptionHandle>" << subscriptionHandle << "</SubscriptionHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::auxAudioPropertiesEvent(F32 energy) +{ + LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; + mTuningEnergy = energy; +} + +void LLVivoxVoiceClient::buddyListChanged() +{ + // This is called after we receive a BuddyAndGroupListChangedEvent. + mBuddyListMapPopulated = true; + mFriendsListDirty = true; +} + +void LLVivoxVoiceClient::muteListChanged() +{ + // The user's mute list has been updated. Go through the current participant list and sync it with the mute list. + if(mAudioSession) + { + participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); + + for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) + { + participantState *p = iter->second; + + // Check to see if this participant is on the mute list already + if(p->updateMuteState()) + mAudioSession->mVolumeDirty = true; + } + } +} + +void LLVivoxVoiceClient::updateFriends(U32 mask) +{ + if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::POWERS)) + { + // Just resend the whole friend list to the daemon + mFriendsListDirty = true; + } +} + +///////////////////////////// +// Managing list of participants +LLVivoxVoiceClient::participantState::participantState(const std::string &uri) : + mURI(uri), + mPTT(false), + mIsSpeaking(false), + mIsModeratorMuted(false), + mLastSpokeTimestamp(0.f), + mPower(0.f), + mVolume(LLVoiceClient::VOLUME_DEFAULT), + mOnMuteList(false), + mVolumeDirty(false), + mAvatarIDValid(false), + mIsSelf(false) +{ +} + +LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::addParticipant(const std::string &uri) +{ + participantState *result = NULL; + bool useAlternateURI = false; + + // Note: this is mostly the body of LLVivoxVoiceClient::sessionState::findParticipant(), but since we need to know if it + // matched the alternate SIP URI (so we can add it properly), we need to reproduce it here. + { + participantMap::iterator iter = mParticipantsByURI.find(uri); + + if(iter == mParticipantsByURI.end()) + { + if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) + { + // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. + // Use mSIPURI instead, since it will be properly encoded. + iter = mParticipantsByURI.find(mSIPURI); + useAlternateURI = true; + } + } + + if(iter != mParticipantsByURI.end()) + { + result = iter->second; + } + } + + if(!result) + { + // participant isn't already in one list or the other. + result = new participantState(useAlternateURI?mSIPURI:uri); + mParticipantsByURI.insert(participantMap::value_type(result->mURI, result)); + mParticipantsChanged = true; + + // Try to do a reverse transform on the URI to get the GUID back. + { + LLUUID id; + if(LLVivoxVoiceClient::getInstance()->IDFromName(result->mURI, id)) + { + result->mAvatarIDValid = true; + result->mAvatarID = id; + } + else + { + // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. + // This tells code in LLVivoxVoiceClient that the ID will not be in the name cache. + setUUIDFromStringHash(result->mAvatarID, uri); + } + } + + + if(result->updateMuteState()) + { + mMuteDirty = true; + } + + mParticipantsByUUID.insert(participantUUIDMap::value_type(result->mAvatarID, result)); + + if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume)) + { + result->mVolumeDirty = true; + mVolumeDirty = true; + } + + LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL; + } + + return result; +} + +bool LLVivoxVoiceClient::participantState::updateMuteState() +{ + bool result = false; + + + + bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat); + if(mOnMuteList != isMuted) + { + mOnMuteList = isMuted; + mVolumeDirty = true; + result = true; + } + return result; +} + +bool LLVivoxVoiceClient::participantState::isAvatar() +{ + return mAvatarIDValid; +} + +void LLVivoxVoiceClient::sessionState::removeParticipant(LLVivoxVoiceClient::participantState *participant) +{ + if(participant) + { + participantMap::iterator iter = mParticipantsByURI.find(participant->mURI); + participantUUIDMap::iterator iter2 = mParticipantsByUUID.find(participant->mAvatarID); + + LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL; + + if(iter == mParticipantsByURI.end()) + { + LL_ERRS("Voice") << "Internal error: participant " << participant->mURI << " not in URI map" << LL_ENDL; + } + else if(iter2 == mParticipantsByUUID.end()) + { + LL_ERRS("Voice") << "Internal error: participant ID " << participant->mAvatarID << " not in UUID map" << LL_ENDL; + } + else if(iter->second != iter2->second) + { + LL_ERRS("Voice") << "Internal error: participant mismatch!" << LL_ENDL; + } + else + { + mParticipantsByURI.erase(iter); + mParticipantsByUUID.erase(iter2); + + delete participant; + mParticipantsChanged = true; + } + } +} + +void LLVivoxVoiceClient::sessionState::removeAllParticipants() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + + while(!mParticipantsByURI.empty()) + { + removeParticipant(mParticipantsByURI.begin()->second); + } + + if(!mParticipantsByUUID.empty()) + { + LL_ERRS("Voice") << "Internal error: empty URI map, non-empty UUID map" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::getParticipantList(std::set<LLUUID> &participants) +{ + if(mAudioSession) + { + for(participantUUIDMap::iterator iter = mAudioSession->mParticipantsByUUID.begin(); + iter != mAudioSession->mParticipantsByUUID.end(); + iter++) + { + participants.insert(iter->first); + } + } +} + +bool LLVivoxVoiceClient::isParticipant(const LLUUID &speaker_id) +{ + if(mAudioSession) + { + return (mAudioSession->mParticipantsByUUID.find(speaker_id) != mAudioSession->mParticipantsByUUID.end()); + } + return false; +} + + +LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::findParticipant(const std::string &uri) +{ + participantState *result = NULL; + + participantMap::iterator iter = mParticipantsByURI.find(uri); + + if(iter == mParticipantsByURI.end()) + { + if(!mAlternateSIPURI.empty() && (uri == mAlternateSIPURI)) + { + // This is a p2p session (probably with the SLIM client) with an alternate URI for the other participant. + // Look up the other URI + iter = mParticipantsByURI.find(mSIPURI); + } + } + + if(iter != mParticipantsByURI.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::sessionState::findParticipantByID(const LLUUID& id) +{ + participantState * result = NULL; + participantUUIDMap::iterator iter = mParticipantsByUUID.find(id); + + if(iter != mParticipantsByUUID.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::findParticipantByID(const LLUUID& id) +{ + participantState * result = NULL; + + if(mAudioSession) + { + result = mAudioSession->findParticipantByID(id); + } + + return result; +} + + +void LLVivoxVoiceClient::parcelChanged() +{ + if(getState() >= stateNoChannel) + { + // If the user is logged in, start a channel lookup. + LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; + + std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); + LLSD data; + LLHTTPClient::post( + url, + data, + new LLVivoxVoiceClientCapResponder); + } + else + { + // The transition to stateNoChannel needs to kick this off again. + LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::switchChannel( + std::string uri, + bool spatial, + bool no_reconnect, + bool is_p2p, + std::string hash) +{ + bool needsSwitch = false; + + LL_DEBUGS("Voice") + << "called in state " << state2string(getState()) + << " with uri \"" << uri << "\"" + << (spatial?", spatial is true":", spatial is false") + << LL_ENDL; + + switch(getState()) + { + case stateJoinSessionFailed: + case stateJoinSessionFailedWaiting: + case stateNoChannel: + // Always switch to the new URI from these states. + needsSwitch = true; + break; + + default: + if(mSessionTerminateRequested) + { + // If a terminate has been requested, we need to compare against where the URI we're already headed to. + if(mNextAudioSession) + { + if(mNextAudioSession->mSIPURI != uri) + needsSwitch = true; + } + else + { + // mNextAudioSession is null -- this probably means we're on our way back to spatial. + if(!uri.empty()) + { + // We do want to process a switch in this case. + needsSwitch = true; + } + } + } + else + { + // Otherwise, compare against the URI we're in now. + if(mAudioSession) + { + if(mAudioSession->mSIPURI != uri) + { + needsSwitch = true; + } + } + else + { + if(!uri.empty()) + { + // mAudioSession is null -- it's not clear what case would cause this. + // For now, log it as a warning and see if it ever crops up. + LL_WARNS("Voice") << "No current audio session." << LL_ENDL; + } + } + } + break; + } + + if(needsSwitch) + { + if(uri.empty()) + { + // Leave any channel we may be in + LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL; + + sessionState *oldSession = mNextAudioSession; + mNextAudioSession = NULL; + + // The old session may now need to be deleted. + reapSession(oldSession); + + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + } + else + { + LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL; + + mNextAudioSession = addSession(uri); + mNextAudioSession->mHash = hash; + mNextAudioSession->mIsSpatial = spatial; + mNextAudioSession->mReconnect = !no_reconnect; + mNextAudioSession->mIsP2P = is_p2p; + } + + if(getState() <= stateNoChannel) + { + // We're already set up to join a channel, just needed to fill in the session URI + } + else + { + // State machine will come around and rejoin if uri/handle is not empty. + sessionTerminate(); + } + } +} + +void LLVivoxVoiceClient::joinSession(sessionState *session) +{ + mNextAudioSession = session; + + if(getState() <= stateNoChannel) + { + // We're already set up to join a channel, just needed to fill in the session handle + } + else + { + // State machine will come around and rejoin if uri/handle is not empty. + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::setNonSpatialChannel( + const std::string &uri, + const std::string &credentials) +{ + switchChannel(uri, false, false, false, credentials); +} + +void LLVivoxVoiceClient::setSpatialChannel( + const std::string &uri, + const std::string &credentials) +{ + mSpatialSessionURI = uri; + mSpatialSessionCredentials = credentials; + mAreaVoiceDisabled = mSpatialSessionURI.empty(); + + LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL; + + if((mAudioSession && !(mAudioSession->mIsSpatial)) || (mNextAudioSession && !(mNextAudioSession->mIsSpatial))) + { + // User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels. + LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL; + } + else + { + switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials); + } +} + +void LLVivoxVoiceClient::callUser(const LLUUID &uuid) +{ + std::string userURI = sipURIFromID(uuid); + + switchChannel(userURI, false, true, true); +} + +LLVivoxVoiceClient::sessionState* LLVivoxVoiceClient::startUserIMSession(const LLUUID &uuid) +{ + // Figure out if a session with the user already exists + sessionState *session = findSession(uuid); + if(!session) + { + // No session with user, need to start one. + std::string uri = sipURIFromID(uuid); + session = addSession(uri); + + llassert(session); + if (!session) return NULL; + + session->mIsSpatial = false; + session->mReconnect = false; + session->mIsP2P = true; + session->mCallerID = uuid; + } + + if(session->mHandle.empty()) + { + // Session isn't active -- start it up. + sessionCreateSendMessage(session, false, true); + } + else + { + // Session is already active -- start up text. + sessionTextConnectSendMessage(session); + } + + return session; +} + +BOOL LLVivoxVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) +{ + bool result = false; + + // Attempt to locate the indicated session + sessionState *session = startUserIMSession(participant_id); + if(session) + { + // found the session, attempt to send the message + session->mTextMsgQueue.push(message); + + // Try to send queued messages (will do nothing if the session is not open yet) + sendQueuedTextMessages(session); + + // The message is queued, so we succeed. + result = true; + } + else + { + LL_DEBUGS("Voice") << "Session not found for participant ID " << participant_id << LL_ENDL; + } + + return result; +} + +void LLVivoxVoiceClient::sendQueuedTextMessages(sessionState *session) +{ + if(session->mTextStreamState == 1) + { + if(!session->mTextMsgQueue.empty()) + { + std::ostringstream stream; + + while(!session->mTextMsgQueue.empty()) + { + std::string message = session->mTextMsgQueue.front(); + session->mTextMsgQueue.pop(); + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SendMessage.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<MessageHeader>text/HTML</MessageHeader>" + << "<MessageBody>" << message << "</MessageBody>" + << "</Request>" + << "\n\n\n"; + } + writeString(stream.str()); + } + } + else + { + // Session isn't connected yet, defer until later. + } +} + +void LLVivoxVoiceClient::endUserIMSession(const LLUUID &uuid) +{ + // Figure out if a session with the user exists + sessionState *session = findSession(uuid); + if(session) + { + // found the session + if(!session->mHandle.empty()) + { + sessionTextDisconnectSendMessage(session); + } + } + else + { + LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; + } +} +bool LLVivoxVoiceClient::isValidChannel(std::string &sessionHandle) +{ + return(findSession(sessionHandle) != NULL); + +} +bool LLVivoxVoiceClient::answerInvite(std::string &sessionHandle) +{ + // this is only ever used to answer incoming p2p call invites. + + sessionState *session = findSession(sessionHandle); + if(session) + { + session->mIsSpatial = false; + session->mReconnect = false; + session->mIsP2P = true; + + joinSession(session); + return true; + } + + return false; +} + +BOOL LLVivoxVoiceClient::isOnlineSIP(const LLUUID &id) +{ + bool result = false; + buddyListEntry *buddy = findBuddy(id); + if(buddy) + { + result = buddy->mOnlineSLim; + LL_DEBUGS("Voice") << "Buddy " << buddy->mDisplayName << " is SIP " << (result?"online":"offline") << LL_ENDL; + } + + if(!result) + { + // This user isn't on the buddy list or doesn't show online status through the buddy list, but could be a participant in an existing session if they initiated a text IM. + sessionState *session = findSession(id); + if(session && !session->mHandle.empty()) + { + if((session->mTextStreamState != streamStateUnknown) || (session->mMediaStreamState > streamStateIdle)) + { + LL_DEBUGS("Voice") << "Open session with " << id << " found, returning SIP online state" << LL_ENDL; + // we have a p2p text session open with this user, so by definition they're online. + result = true; + } + } + } + + return result; +} + +bool LLVivoxVoiceClient::isVoiceWorking() +{ + //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) + // Condition with joining spatial num was added to take into account possible problems with connection to voice + // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. + return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); +} + +// Returns true if the indicated participant in the current audio session is really an SL avatar. +// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. +BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id) +{ + BOOL result = TRUE; + sessionState *session = findSession(id); + + if(session != NULL) + { + // this is a p2p session with the indicated caller, or the session with the specified UUID. + if(session->mSynthesizedCallerID) + result = FALSE; + } + else + { + // Didn't find a matching session -- check the current audio session for a matching participant + if(mAudioSession != NULL) + { + participantState *participant = findParticipantByID(id); + if(participant != NULL) + { + result = participant->isAvatar(); + } + } + } + + return result; +} + +// Returns true if calling back the session URI after the session has closed is possible. +// Currently this will be false only for PSTN P2P calls. +BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) +{ + BOOL result = TRUE; + sessionState *session = findSession(session_id); + + if(session != NULL) + { + result = session->isCallBackPossible(); + } + + return result; +} + +// Returns true if the session can accepte text IM's. +// Currently this will be false only for PSTN P2P calls. +BOOL LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) +{ + bool result = TRUE; + sessionState *session = findSession(session_id); + + if(session != NULL) + { + result = session->isTextIMPossible(); + } + + return result; +} + + +void LLVivoxVoiceClient::declineInvite(std::string &sessionHandle) +{ + sessionState *session = findSession(sessionHandle); + if(session) + { + sessionMediaDisconnectSendMessage(session); + } +} + +void LLVivoxVoiceClient::leaveNonSpatialChannel() +{ + LL_DEBUGS("Voice") + << "called in state " << state2string(getState()) + << LL_ENDL; + + // Make sure we don't rejoin the current session. + sessionState *oldNextSession = mNextAudioSession; + mNextAudioSession = NULL; + + // Most likely this will still be the current session at this point, but check it anyway. + reapSession(oldNextSession); + + verifySessionState(); + + sessionTerminate(); +} + +std::string LLVivoxVoiceClient::getCurrentChannel() +{ + std::string result; + + if((getState() == stateRunning) && !mSessionTerminateRequested) + { + result = getAudioSessionURI(); + } + + return result; +} + +bool LLVivoxVoiceClient::inProximalChannel() +{ + bool result = false; + + if((getState() == stateRunning) && !mSessionTerminateRequested) + { + result = inSpatialChannel(); + } + + return result; +} + +std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) +{ + std::string result; + result = "sip:"; + result += nameFromID(id); + result += "@"; + result += mVoiceSIPURIHostName; + + return result; +} + +std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar) +{ + std::string result; + if(avatar) + { + result = "sip:"; + result += nameFromID(avatar->getID()); + result += "@"; + result += mVoiceSIPURIHostName; + } + + return result; +} + +std::string LLVivoxVoiceClient::nameFromAvatar(LLVOAvatar *avatar) +{ + std::string result; + if(avatar) + { + result = nameFromID(avatar->getID()); + } + return result; +} + +std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) +{ + std::string result; + + if (uuid.isNull()) { + //VIVOX, the uuid emtpy look for the mURIString and return that instead. + //result.assign(uuid.mURIStringName); + LLStringUtil::replaceChar(result, '_', ' '); + return result; + } + // Prepending this apparently prevents conflicts with reserved names inside the vivox code. + result = "x"; + + // Base64 encode and replace the pieces of base64 that are less compatible + // with e-mail local-parts. + // See RFC-4648 "Base 64 Encoding with URL and Filename Safe Alphabet" + result += LLBase64::encode(uuid.mData, UUID_BYTES); + LLStringUtil::replaceChar(result, '+', '-'); + LLStringUtil::replaceChar(result, '/', '_'); + + // If you need to transform a GUID to this form on the Mac OS X command line, this will do so: + // echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-') + + // The reverse transform can be done with: + // echo 'x5mkTKmxDTuGnjWyC__WfMg==' |cut -b 2- -|tr '_-' '/+' |openssl base64 -d|xxd -p + + return result; +} + +bool LLVivoxVoiceClient::IDFromName(const std::string inName, LLUUID &uuid) +{ + bool result = false; + + // SLIM SDK: The "name" may actually be a SIP URI such as: "sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com" + // If it is, convert to a bare name before doing the transform. + std::string name = nameFromsipURI(inName); + + // Doesn't look like a SIP URI, assume it's an actual name. + if(name.empty()) + name = inName; + + // This will only work if the name is of the proper form. + // As an example, the account name for Monroe Linden (UUID 1673cfd3-8229-4445-8d92-ec3570e5e587) is: + // "xFnPP04IpREWNkuw1cOXlhw==" + + if((name.size() == 25) && (name[0] == 'x') && (name[23] == '=') && (name[24] == '=')) + { + // The name appears to have the right form. + + // Reverse the transforms done by nameFromID + std::string temp = name; + LLStringUtil::replaceChar(temp, '-', '+'); + LLStringUtil::replaceChar(temp, '_', '/'); + + U8 rawuuid[UUID_BYTES + 1]; + int len = apr_base64_decode_binary(rawuuid, temp.c_str() + 1); + if(len == UUID_BYTES) + { + // The decode succeeded. Stuff the bits into the result's UUID + memcpy(uuid.mData, rawuuid, UUID_BYTES); + result = true; + } + } + + if(!result) + { + // VIVOX: not a standard account name, just copy the URI name mURIString field + // and hope for the best. bpj + uuid.setNull(); // VIVOX, set the uuid field to nulls + } + + return result; +} + +std::string LLVivoxVoiceClient::displayNameFromAvatar(LLVOAvatar *avatar) +{ + return avatar->getFullname(); +} + +std::string LLVivoxVoiceClient::sipURIFromName(std::string &name) +{ + std::string result; + result = "sip:"; + result += name; + result += "@"; + result += mVoiceSIPURIHostName; + +// LLStringUtil::toLower(result); + + return result; +} + +std::string LLVivoxVoiceClient::nameFromsipURI(const std::string &uri) +{ + std::string result; + + std::string::size_type sipOffset, atOffset; + sipOffset = uri.find("sip:"); + atOffset = uri.find("@"); + if((sipOffset != std::string::npos) && (atOffset != std::string::npos)) + { + result = uri.substr(sipOffset + 4, atOffset - (sipOffset + 4)); + } + + return result; +} + +bool LLVivoxVoiceClient::inSpatialChannel(void) +{ + bool result = false; + + if(mAudioSession) + result = mAudioSession->mIsSpatial; + + return result; +} + +std::string LLVivoxVoiceClient::getAudioSessionURI() +{ + std::string result; + + if(mAudioSession) + result = mAudioSession->mSIPURI; + + return result; +} + +std::string LLVivoxVoiceClient::getAudioSessionHandle() +{ + std::string result; + + if(mAudioSession) + result = mAudioSession->mHandle; + + return result; +} + + +///////////////////////////// +// Sending updates of current state + +void LLVivoxVoiceClient::enforceTether(void) +{ + LLVector3d tethered = mCameraRequestedPosition; + + // constrain 'tethered' to within 50m of mAvatarPosition. + { + F32 max_dist = 50.0f; + LLVector3d camera_offset = mCameraRequestedPosition - mAvatarPosition; + F32 camera_distance = (F32)camera_offset.magVec(); + if(camera_distance > max_dist) + { + tethered = mAvatarPosition + + (max_dist / camera_distance) * camera_offset; + } + } + + if(dist_vec(mCameraPosition, tethered) > 0.1) + { + mCameraPosition = tethered; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::updatePosition(void) +{ + + LLViewerRegion *region = gAgent.getRegion(); + if(region && isAgentAvatarValid()) + { + LLMatrix3 rot; + LLVector3d pos; + + // TODO: If camera and avatar velocity are actually used by the voice system, we could compute them here... + // They're currently always set to zero. + + // Send the current camera position to the voice code + rot.setRows(LLViewerCamera::getInstance()->getAtAxis(), LLViewerCamera::getInstance()->getLeftAxis (), LLViewerCamera::getInstance()->getUpAxis()); + pos = gAgent.getRegion()->getPosGlobalFromRegion(LLViewerCamera::getInstance()->getOrigin()); + + LLVivoxVoiceClient::getInstance()->setCameraPosition( + pos, // position + LLVector3::zero, // velocity + rot); // rotation matrix + + // Send the current avatar position to the voice code + rot = gAgentAvatarp->getRootJoint()->getWorldRotation().getMatrix3(); + pos = gAgentAvatarp->getPositionGlobal(); + + // TODO: Can we get the head offset from outside the LLVOAvatar? + // pos += LLVector3d(mHeadOffset); + pos += LLVector3d(0.f, 0.f, 1.f); + + LLVivoxVoiceClient::getInstance()->setAvatarPosition( + pos, // position + LLVector3::zero, // velocity + rot); // rotation matrix + } +} + +void LLVivoxVoiceClient::setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +{ + mCameraRequestedPosition = position; + + if(mCameraVelocity != velocity) + { + mCameraVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mCameraRot != rot) + { + mCameraRot = rot; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot) +{ + if(dist_vec(mAvatarPosition, position) > 0.1) + { + mAvatarPosition = position; + mSpatialCoordsDirty = true; + } + + if(mAvatarVelocity != velocity) + { + mAvatarVelocity = velocity; + mSpatialCoordsDirty = true; + } + + if(mAvatarRot != rot) + { + mAvatarRot = rot; + mSpatialCoordsDirty = true; + } +} + +bool LLVivoxVoiceClient::channelFromRegion(LLViewerRegion *region, std::string &name) +{ + bool result = false; + + if(region) + { + name = region->getName(); + } + + if(!name.empty()) + result = true; + + return result; +} + +void LLVivoxVoiceClient::leaveChannel(void) +{ + if(getState() == stateRunning) + { + LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; + mChannelName.clear(); + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::setMuteMic(bool muted) +{ + mMuteMic = muted; +} + +void LLVivoxVoiceClient::setUserPTTState(bool ptt) +{ + mUserPTTState = ptt; +} + +bool LLVivoxVoiceClient::getUserPTTState() +{ + return mUserPTTState; +} + +void LLVivoxVoiceClient::inputUserControlState(bool down) +{ + if(mPTTIsToggle) + { + if(down) // toggle open-mic state on 'down' + { + toggleUserPTTState(); + } + } + else // set open-mic state as an absolute + { + setUserPTTState(down); + } +} + + +void LLVivoxVoiceClient::toggleUserPTTState(void) +{ + mUserPTTState = !mUserPTTState; +} + +void LLVivoxVoiceClient::setVoiceEnabled(bool enabled) +{ + if (enabled != mVoiceEnabled) + { + // TODO: Refactor this so we don't call into LLVoiceChannel, but simply + // use the status observer + mVoiceEnabled = enabled; + LLVoiceClientStatusObserver::EStatusType status; + + + if (enabled) + { + LLVoiceChannel::getCurrentVoiceChannel()->activate(); + status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED; + } + else + { + // Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it. + LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); + status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; + } + } +} + +bool LLVivoxVoiceClient::voiceEnabled() +{ + return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); +} + +void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled) +{ + mLipSyncEnabled = enabled; +} + +BOOL LLVivoxVoiceClient::lipSyncEnabled() +{ + + if ( mVoiceEnabled && stateDisabled != getState() ) + { + return mLipSyncEnabled; + } + else + { + return FALSE; + } +} + +void LLVivoxVoiceClient::setUsePTT(bool usePTT) +{ + if(usePTT && !mUsePTT) + { + // When the user turns on PTT, reset the current state. + mUserPTTState = false; + } + mUsePTT = usePTT; +} + +void LLVivoxVoiceClient::setPTTIsToggle(bool PTTIsToggle) +{ + if(!PTTIsToggle && mPTTIsToggle) + { + // When the user turns off toggle, reset the current state. + mUserPTTState = false; + } + + mPTTIsToggle = PTTIsToggle; +} + +bool LLVivoxVoiceClient::getPTTIsToggle() +{ + return mPTTIsToggle; +} + +void LLVivoxVoiceClient::setPTTKey(std::string &key) +{ + if(key == "MiddleMouse") + { + mPTTIsMiddleMouse = true; + } + else + { + mPTTIsMiddleMouse = false; + if(!LLKeyboard::keyFromString(key, &mPTTKey)) + { + // If the call failed, don't match any key. + key = KEY_NONE; + } + } +} + +void LLVivoxVoiceClient::setEarLocation(S32 loc) +{ + if(mEarLocation != loc) + { + LL_DEBUGS("Voice") << "Setting mEarLocation to " << loc << LL_ENDL; + + mEarLocation = loc; + mSpatialCoordsDirty = true; + } +} + +void LLVivoxVoiceClient::setVoiceVolume(F32 volume) +{ + int scaled_volume = scale_speaker_volume(volume); + + if(scaled_volume != mSpeakerVolume) + { + int min_volume = scale_speaker_volume(0); + if((scaled_volume == min_volume) || (mSpeakerVolume == min_volume)) + { + mSpeakerMuteDirty = true; + } + + mSpeakerVolume = scaled_volume; + mSpeakerVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::setMicGain(F32 volume) +{ + int scaled_volume = scale_mic_volume(volume); + + if(scaled_volume != mMicVolume) + { + mMicVolume = scaled_volume; + mMicVolumeDirty = true; + } +} + +void LLVivoxVoiceClient::keyDown(KEY key, MASK mask) +{ + if (gKeyboard->getKeyRepeated(key)) + { + // ignore auto-repeat keys + return; + } + + if(!mPTTIsMiddleMouse) + { + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); + } + + +} +void LLVivoxVoiceClient::keyUp(KEY key, MASK mask) +{ + if(!mPTTIsMiddleMouse) + { + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); + } + +} +void LLVivoxVoiceClient::middleMouseState(bool down) +{ + if(mPTTIsMiddleMouse) + { + if(mPTTIsMiddleMouse) + { + inputUserControlState(down); + } + } +} + +///////////////////////////// +// Accessors for data related to nearby speakers +BOOL LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id) +{ + BOOL result = FALSE; + participantState *participant = findParticipantByID(id); + if(participant) + { + // I'm not sure what the semantics of this should be. + // For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled. + result = TRUE; + } + + return result; +} + +std::string LLVivoxVoiceClient::getDisplayName(const LLUUID& id) +{ + std::string result; + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mDisplayName; + } + + return result; +} + + + +BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT) + { + participant->mIsSpeaking = FALSE; + } + result = participant->mIsSpeaking; + } + + return result; +} + +BOOL LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mIsModeratorMuted; + } + + return result; +} + +F32 LLVivoxVoiceClient::getCurrentPower(const LLUUID& id) +{ + F32 result = 0; + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mPower; + } + + return result; +} + + + +BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + // I'm not sure what the semantics of this should be. + // Does "using PTT" mean they're configured with a push-to-talk button? + // For now, we know there's no PTT mechanism in place, so nobody is using it. + } + + return result; +} + +BOOL LLVivoxVoiceClient::getOnMuteList(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mOnMuteList; + } + + return result; +} + +// External accessors. +F32 LLVivoxVoiceClient::getUserVolume(const LLUUID& id) +{ + // Minimum volume will be returned for users with voice disabled + F32 result = LLVoiceClient::VOLUME_MIN; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mVolume; + + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "mVolume = " << result << " for " << id << LL_ENDL; + } + + return result; +} + +void LLVivoxVoiceClient::setUserVolume(const LLUUID& id, F32 volume) +{ + if(mAudioSession) + { + participantState *participant = findParticipantByID(id); + if (participant && !participant->mIsSelf) + { + if (!is_approx_equal(volume, LLVoiceClient::VOLUME_DEFAULT)) + { + // Store this volume setting for future sessions if it has been + // changed from the default + LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); + } + else + { + // Remove stored volume setting if it is returned to the default + LLSpeakerVolumeStorage::getInstance()->removeSpeakerVolume(id); + } + + participant->mVolume = llclamp(volume, LLVoiceClient::VOLUME_MIN, LLVoiceClient::VOLUME_MAX); + participant->mVolumeDirty = true; + mAudioSession->mVolumeDirty = true; + } + } +} + +std::string LLVivoxVoiceClient::getGroupID(const LLUUID& id) +{ + std::string result; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mGroupID; + } + + return result; +} + +BOOL LLVivoxVoiceClient::getAreaVoiceDisabled() +{ + return mAreaVoiceDisabled; +} + +void LLVivoxVoiceClient::recordingLoopStart(int seconds, int deltaFramesPerControlFrame) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Start)" << LL_ENDL; + + if(!mMainSessionGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Start</RecordingControlType>" + << "<DeltaFramesPerControlFrame>" << deltaFramesPerControlFrame << "</DeltaFramesPerControlFrame>" + << "<Filename>" << "" << "</Filename>" + << "<EnableAudioRecordingEvents>false</EnableAudioRecordingEvents>" + << "<LoopModeDurationSeconds>" << seconds << "</LoopModeDurationSeconds>" + << "</Request>\n\n\n"; + + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::recordingLoopSave(const std::string& filename) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Flush)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Flush</RecordingControlType>" + << "<Filename>" << filename << "</Filename>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::recordingStop() +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlRecording (Stop)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlRecording.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Stop</RecordingControlType>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackStart(const std::string& filename) +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Start)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Start</RecordingControlType>" + << "<Filename>" << filename << "</Filename>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackStop() +{ +// LL_DEBUGS("Voice") << "sending SessionGroup.ControlPlayback (Stop)" << LL_ENDL; + + if(mAudioSession != NULL && !mAudioSession->mGroupHandle.empty()) + { + std::ostringstream stream; + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.ControlPlayback.1\">" + << "<SessionGroupHandle>" << mMainSessionGroupHandle << "</SessionGroupHandle>" + << "<RecordingControlType>Stop</RecordingControlType>" + << "</Request>\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::filePlaybackSetPaused(bool paused) +{ + // TODO: Implement once Vivox gives me a sample +} + +void LLVivoxVoiceClient::filePlaybackSetMode(bool vox, float speed) +{ + // TODO: Implement once Vivox gives me a sample +} + +LLVivoxVoiceClient::sessionState::sessionState() : + mErrorStatusCode(0), + mMediaStreamState(streamStateUnknown), + mTextStreamState(streamStateUnknown), + mCreateInProgress(false), + mMediaConnectInProgress(false), + mVoiceInvitePending(false), + mTextInvitePending(false), + mSynthesizedCallerID(false), + mIsChannel(false), + mIsSpatial(false), + mIsP2P(false), + mIncoming(false), + mVoiceEnabled(false), + mReconnect(false), + mVolumeDirty(false), + mParticipantsChanged(false) +{ +} + +LLVivoxVoiceClient::sessionState::~sessionState() +{ + removeAllParticipants(); +} + +bool LLVivoxVoiceClient::sessionState::isCallBackPossible() +{ + // This may change to be explicitly specified by vivox in the future... + // Currently, only PSTN P2P calls cannot be returned. + // Conveniently, this is also the only case where we synthesize a caller UUID. + return !mSynthesizedCallerID; +} + +bool LLVivoxVoiceClient::sessionState::isTextIMPossible() +{ + // This may change to be explicitly specified by vivox in the future... + return !mSynthesizedCallerID; +} + + +LLVivoxVoiceClient::sessionIterator LLVivoxVoiceClient::sessionsBegin(void) +{ + return mSessions.begin(); +} + +LLVivoxVoiceClient::sessionIterator LLVivoxVoiceClient::sessionsEnd(void) +{ + return mSessions.end(); +} + + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSession(const std::string &handle) +{ + sessionState *result = NULL; + sessionMap::iterator iter = mSessionsByHandle.find(handle); + if(iter != mSessionsByHandle.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSessionBeingCreatedByURI(const std::string &uri) +{ + sessionState *result = NULL; + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + if(session->mCreateInProgress && (session->mSIPURI == uri)) + { + result = session; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::findSession(const LLUUID &participant_id) +{ + sessionState *result = NULL; + + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + if((session->mCallerID == participant_id) || (session->mIMSessionID == participant_id)) + { + result = session; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::addSession(const std::string &uri, const std::string &handle) +{ + sessionState *result = NULL; + + if(handle.empty()) + { + // No handle supplied. + // Check whether there's already a session with this URI + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *s = *iter; + if((s->mSIPURI == uri) || (s->mAlternateSIPURI == uri)) + { + // TODO: I need to think about this logic... it's possible that this case should raise an internal error. + result = s; + break; + } + } + } + else // (!handle.empty()) + { + // Check for an existing session with this handle + sessionMap::iterator iter = mSessionsByHandle.find(handle); + + if(iter != mSessionsByHandle.end()) + { + result = iter->second; + } + } + + if(!result) + { + // No existing session found. + + LL_DEBUGS("Voice") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; + result = new sessionState(); + result->mSIPURI = uri; + result->mHandle = handle; + + mSessions.insert(result); + + if(!result->mHandle.empty()) + { + mSessionsByHandle.insert(sessionMap::value_type(result->mHandle, result)); + } + } + else + { + // Found an existing session + + if(uri != result->mSIPURI) + { + // TODO: Should this be an internal error? + LL_DEBUGS("Voice") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; + setSessionURI(result, uri); + } + + if(handle != result->mHandle) + { + if(handle.empty()) + { + // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. + LL_DEBUGS("Voice") << "NOT clearing handle " << result->mHandle << LL_ENDL; + } + else + { + // TODO: Should this be an internal error? + LL_DEBUGS("Voice") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; + setSessionHandle(result, handle); + } + } + + LL_DEBUGS("Voice") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; + } + + verifySessionState(); + + return result; +} + +void LLVivoxVoiceClient::setSessionHandle(sessionState *session, const std::string &handle) +{ + // Have to remove the session from the handle-indexed map before changing the handle, or things will break badly. + + if(!session->mHandle.empty()) + { + // Remove session from the map if it should have been there. + sessionMap::iterator iter = mSessionsByHandle.find(session->mHandle); + if(iter != mSessionsByHandle.end()) + { + if(iter->second != session) + { + LL_ERRS("Voice") << "Internal error: session mismatch!" << LL_ENDL; + } + + mSessionsByHandle.erase(iter); + } + else + { + LL_ERRS("Voice") << "Internal error: session handle not found in map!" << LL_ENDL; + } + } + + session->mHandle = handle; + + if(!handle.empty()) + { + mSessionsByHandle.insert(sessionMap::value_type(session->mHandle, session)); + } + + verifySessionState(); +} + +void LLVivoxVoiceClient::setSessionURI(sessionState *session, const std::string &uri) +{ + // There used to be a map of session URIs to sessions, which made this complex.... + session->mSIPURI = uri; + + verifySessionState(); +} + +void LLVivoxVoiceClient::deleteSession(sessionState *session) +{ + // Remove the session from the handle map + if(!session->mHandle.empty()) + { + sessionMap::iterator iter = mSessionsByHandle.find(session->mHandle); + if(iter != mSessionsByHandle.end()) + { + if(iter->second != session) + { + LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; + } + mSessionsByHandle.erase(iter); + } + } + + // Remove the session from the URI map + mSessions.erase(session); + + // At this point, the session should be unhooked from all lists and all state should be consistent. + verifySessionState(); + + // If this is the current audio session, clean up the pointer which will soon be dangling. + if(mAudioSession == session) + { + mAudioSession = NULL; + mAudioSessionChanged = true; + } + + // ditto for the next audio session + if(mNextAudioSession == session) + { + mNextAudioSession = NULL; + } + + // delete the session + delete session; +} + +void LLVivoxVoiceClient::deleteAllSessions() +{ + LL_DEBUGS("Voice") << "called" << LL_ENDL; + + while(!mSessions.empty()) + { + deleteSession(*(sessionsBegin())); + } + + if(!mSessionsByHandle.empty()) + { + LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; + } +} + +void LLVivoxVoiceClient::verifySessionState(void) +{ + // This is mostly intended for debugging problems with session state management. + LL_DEBUGS("Voice") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; + + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + + LL_DEBUGS("Voice") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; + + if(!session->mHandle.empty()) + { + // every session with a non-empty handle needs to be in the handle map + sessionMap::iterator i2 = mSessionsByHandle.find(session->mHandle); + if(i2 == mSessionsByHandle.end()) + { + LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; + } + else + { + if(i2->second != session) + { + LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; + } + } + } + } + + // check that every entry in the handle map points to a valid session in the session set + for(sessionMap::iterator iter = mSessionsByHandle.begin(); iter != mSessionsByHandle.end(); iter++) + { + sessionState *session = iter->second; + sessionIterator i2 = mSessions.find(session); + if(i2 == mSessions.end()) + { + LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; + } + else + { + if(session->mHandle != (*i2)->mHandle) + { + LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; + } + } + } +} + +LLVivoxVoiceClient::buddyListEntry::buddyListEntry(const std::string &uri) : + mURI(uri) +{ + mOnlineSL = false; + mOnlineSLim = false; + mCanSeeMeOnline = true; + mHasBlockListEntry = false; + mHasAutoAcceptListEntry = false; + mNameResolved = false; + mInVivoxBuddies = false; + mInSLFriends = false; + mNeedsNameUpdate = false; +} + +void LLVivoxVoiceClient::processBuddyListEntry(const std::string &uri, const std::string &displayName) +{ + buddyListEntry *buddy = addBuddy(uri, displayName); + buddy->mInVivoxBuddies = true; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::string &uri) +{ + std::string empty; + buddyListEntry *buddy = addBuddy(uri, empty); + if(buddy->mDisplayName.empty()) + { + buddy->mNameResolved = false; + } + return buddy; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::addBuddy(const std::string &uri, const std::string &displayName) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter = mBuddyListMap.find(uri); + + if(iter != mBuddyListMap.end()) + { + // Found a matching buddy already in the map. + LL_DEBUGS("Voice") << "adding existing buddy " << uri << LL_ENDL; + result = iter->second; + } + + if(!result) + { + // participant isn't already in one list or the other. + LL_DEBUGS("Voice") << "adding new buddy " << uri << LL_ENDL; + result = new buddyListEntry(uri); + result->mDisplayName = displayName; + + if(IDFromName(uri, result->mUUID)) + { + // Extracted UUID from name successfully. + } + else + { + LL_DEBUGS("Voice") << "Couldn't find ID for buddy " << uri << " (\"" << displayName << "\")" << LL_ENDL; + } + + mBuddyListMap.insert(buddyListMap::value_type(result->mURI, result)); + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddy(const std::string &uri) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter = mBuddyListMap.find(uri); + if(iter != mBuddyListMap.end()) + { + result = iter->second; + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddy(const LLUUID &id) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter; + + for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + { + if(iter->second->mUUID == id) + { + result = iter->second; + break; + } + } + + return result; +} + +LLVivoxVoiceClient::buddyListEntry *LLVivoxVoiceClient::findBuddyByDisplayName(const std::string &name) +{ + buddyListEntry *result = NULL; + buddyListMap::iterator iter; + + for(iter = mBuddyListMap.begin(); iter != mBuddyListMap.end(); iter++) + { + if(iter->second->mDisplayName == name) + { + result = iter->second; + break; + } + } + + return result; +} + +void LLVivoxVoiceClient::deleteBuddy(const std::string &uri) +{ + buddyListMap::iterator iter = mBuddyListMap.find(uri); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "deleting buddy " << uri << LL_ENDL; + buddyListEntry *buddy = iter->second; + mBuddyListMap.erase(iter); + delete buddy; + } + else + { + LL_DEBUGS("Voice") << "attempt to delete nonexistent buddy " << uri << LL_ENDL; + } + +} + +void LLVivoxVoiceClient::deleteAllBuddies(void) +{ + while(!mBuddyListMap.empty()) + { + deleteBuddy(mBuddyListMap.begin()->first); + } + + // Don't want to correlate with friends list when we've emptied the buddy list. + mBuddyListMapPopulated = false; + + // Don't want to correlate with friends list when we've reset the block rules. + mBlockRulesListReceived = false; + mAutoAcceptRulesListReceived = false; +} + +void LLVivoxVoiceClient::deleteAllBlockRules(void) +{ + // Clear the block list entry flags from all local buddy list entries + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + buddy_it->second->mHasBlockListEntry = false; + } +} + +void LLVivoxVoiceClient::deleteAllAutoAcceptRules(void) +{ + // Clear the auto-accept list entry flags from all local buddy list entries + buddyListMap::iterator buddy_it; + for(buddy_it = mBuddyListMap.begin(); buddy_it != mBuddyListMap.end(); buddy_it++) + { + buddy_it->second->mHasAutoAcceptListEntry = false; + } +} + +void LLVivoxVoiceClient::addBlockRule(const std::string &blockMask, const std::string &presenceOnly) +{ + buddyListEntry *buddy = NULL; + + // blockMask is the SIP URI of a friends list entry + buddyListMap::iterator iter = mBuddyListMap.find(blockMask); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "block list entry for " << blockMask << LL_ENDL; + buddy = iter->second; + } + + if(buddy == NULL) + { + LL_DEBUGS("Voice") << "block list entry for unknown buddy " << blockMask << LL_ENDL; + buddy = addBuddy(blockMask); + } + + if(buddy != NULL) + { + buddy->mHasBlockListEntry = true; + } +} + +void LLVivoxVoiceClient::addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy) +{ + buddyListEntry *buddy = NULL; + + // blockMask is the SIP URI of a friends list entry + buddyListMap::iterator iter = mBuddyListMap.find(autoAcceptMask); + if(iter != mBuddyListMap.end()) + { + LL_DEBUGS("Voice") << "auto-accept list entry for " << autoAcceptMask << LL_ENDL; + buddy = iter->second; + } + + if(buddy == NULL) + { + LL_DEBUGS("Voice") << "auto-accept list entry for unknown buddy " << autoAcceptMask << LL_ENDL; + buddy = addBuddy(autoAcceptMask); + } + + if(buddy != NULL) + { + buddy->mHasAutoAcceptListEntry = true; + } +} + +void LLVivoxVoiceClient::accountListBlockRulesResponse(int statusCode, const std::string &statusString) +{ + // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. + mBlockRulesListReceived = true; +} + +void LLVivoxVoiceClient::accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString) +{ + // Block list entries were updated via addBlockRule() during parsing. Just flag that we're done. + mAutoAcceptRulesListReceived = true; +} + +void LLVivoxVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) +{ + mParticipantObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) +{ + mParticipantObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyParticipantObservers() +{ + for (observer_set_t::iterator it = mParticipantObservers.begin(); + it != mParticipantObservers.end(); + ) + { + LLVoiceClientParticipantObserver* observer = *it; + observer->onChange(); + // In case onChange() deleted an entry. + it = mParticipantObservers.upper_bound(observer); + } +} + +void LLVivoxVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) +{ + mStatusObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) +{ + mStatusObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status) +{ + if(mAudioSession) + { + if(status == LLVoiceClientStatusObserver::ERROR_UNKNOWN) + { + switch(mAudioSession->mErrorStatusCode) + { + case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; + case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; + case 20715: + //invalid channel, we may be using a set of poorly cached + //info + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + case 1009: + //invalid username and password + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + } + + // Reset the error code to make sure it won't be reused later by accident. + mAudioSession->mErrorStatusCode = 0; + } + else if(status == LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL) + { + switch(mAudioSession->mErrorStatusCode) + { + case 404: // NOT_FOUND + case 480: // TEMPORARILY_UNAVAILABLE + case 408: // REQUEST_TIMEOUT + // call failed because other user was not available + // treat this as an error case + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + + // Reset the error code to make sure it won't be reused later by accident. + mAudioSession->mErrorStatusCode = 0; + break; + } + } + } + + LL_DEBUGS("Voice") + << " " << LLVoiceClientStatusObserver::status2string(status) + << ", session URI " << getAudioSessionURI() + << (inSpatialChannel()?", proximal is true":", proximal is false") + << LL_ENDL; + + for (status_observer_set_t::iterator it = mStatusObservers.begin(); + it != mStatusObservers.end(); + ) + { + LLVoiceClientStatusObserver* observer = *it; + observer->onChange(status, getAudioSessionURI(), inSpatialChannel()); + // In case onError() deleted an entry. + it = mStatusObservers.upper_bound(observer); + } + +} + +void LLVivoxVoiceClient::addObserver(LLFriendObserver* observer) +{ + mFriendObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLFriendObserver* observer) +{ + mFriendObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyFriendObservers() +{ + for (friend_observer_set_t::iterator it = mFriendObservers.begin(); + it != mFriendObservers.end(); + ) + { + LLFriendObserver* observer = *it; + it++; + // The only friend-related thing we notify on is online/offline transitions. + observer->changed(LLFriendObserver::ONLINE); + } +} + +void LLVivoxVoiceClient::lookupName(const LLUUID &id) +{ + BOOL is_group = FALSE; + gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup); +} + +//static +void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +{ + std::string name = llformat("%s %s", first.c_str(), last.c_str()); + LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name); + +} + +void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) +{ + // If the avatar whose name just resolved is on our friends list, resync the friends list. + if(LLAvatarTracker::instance().getBuddyInfo(id) != NULL) + { + mFriendsListDirty = true; + } + // Iterate over all sessions. + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + // Check for this user as a participant in this session + participantState *participant = session->findParticipantByID(id); + if(participant) + { + // Found -- fill in the name + participant->mAccountName = name; + // and post a "participants updated" message to listeners later. + session->mParticipantsChanged = true; + } + + // Check whether this is a p2p session whose caller name just resolved + if(session->mCallerID == id) + { + // this session's "caller ID" just resolved. Fill in the name. + session->mName = name; + if(session->mTextInvitePending) + { + session->mTextInvitePending = false; + + // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel. + } + if(session->mVoiceInvitePending) + { + session->mVoiceInvitePending = false; + + gIMMgr->inviteToSession( + session->mIMSessionID, + session->mName, + session->mCallerID, + session->mName, + IM_SESSION_P2P_INVITE, + LLIMMgr::INVITATION_TYPE_VOICE, + session->mHandle, + session->mSIPURI); + } + + } + } +} + + +LLVivoxProtocolParser::LLVivoxProtocolParser() +{ + parser = NULL; + parser = XML_ParserCreate(NULL); + + reset(); +} + +void LLVivoxProtocolParser::reset() +{ + responseDepth = 0; + ignoringTags = false; + accumulateText = false; + energy = 0.f; + hasText = false; + hasAudio = false; + hasVideo = false; + terminated = false; + ignoreDepth = 0; + isChannel = false; + incoming = false; + enabled = false; + isEvent = false; + isLocallyMuted = false; + isModeratorMuted = false; + isSpeaking = false; + participantType = 0; + squelchDebugOutput = false; + returnCode = -1; + state = 0; + statusCode = 0; + volume = 0; + textBuffer.clear(); + alias.clear(); + numberOfAliases = 0; + applicationString.clear(); +} + +//virtual +LLVivoxProtocolParser::~LLVivoxProtocolParser() +{ + if (parser) + XML_ParserFree(parser); +} + +// virtual +LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( + const LLChannelDescriptors& channels, + buffer_ptr_t& buffer, + bool& eos, + LLSD& context, + LLPumpIO* pump) +{ + LLBufferStream istr(channels, buffer.get()); + std::ostringstream ostr; + while (istr.good()) + { + char buf[1024]; + istr.read(buf, sizeof(buf)); + mInput.append(buf, istr.gcount()); + } + + // Look for input delimiter(s) in the input buffer. If one is found, send the message to the xml parser. + int start = 0; + int delim; + while((delim = mInput.find("\n\n\n", start)) != std::string::npos) + { + + // Reset internal state of the LLVivoxProtocolParser (no effect on the expat parser) + reset(); + + XML_ParserReset(parser, NULL); + XML_SetElementHandler(parser, ExpatStartTag, ExpatEndTag); + XML_SetCharacterDataHandler(parser, ExpatCharHandler); + XML_SetUserData(parser, this); + XML_Parse(parser, mInput.data() + start, delim - start, false); + + // If this message isn't set to be squelched, output the raw XML received. + if(!squelchDebugOutput) + { + LL_DEBUGS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; + } + + start = delim + 3; + } + + if(start != 0) + mInput = mInput.substr(start); + + LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL; + + if(!LLVivoxVoiceClient::getInstance()->mConnected) + { + // If voice has been disabled, we just want to close the socket. This does so. + LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL; + return STATUS_STOP; + } + + return STATUS_OK; +} + +void XMLCALL LLVivoxProtocolParser::ExpatStartTag(void *data, const char *el, const char **attr) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->StartTag(el, attr); + } +} + +// -------------------------------------------------------------------------------- + +void XMLCALL LLVivoxProtocolParser::ExpatEndTag(void *data, const char *el) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->EndTag(el); + } +} + +// -------------------------------------------------------------------------------- + +void XMLCALL LLVivoxProtocolParser::ExpatCharHandler(void *data, const XML_Char *s, int len) +{ + if (data) + { + LLVivoxProtocolParser *object = (LLVivoxProtocolParser*)data; + object->CharData(s, len); + } +} + +// -------------------------------------------------------------------------------- + + +void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) +{ + // Reset the text accumulator. We shouldn't have strings that are inturrupted by new tags + textBuffer.clear(); + // only accumulate text if we're not ignoring tags. + accumulateText = !ignoringTags; + + if (responseDepth == 0) + { + isEvent = !stricmp("Event", tag); + + if (!stricmp("Response", tag) || isEvent) + { + // Grab the attributes + while (*attr) + { + const char *key = *attr++; + const char *value = *attr++; + + if (!stricmp("requestId", key)) + { + requestId = value; + } + else if (!stricmp("action", key)) + { + actionString = value; + } + else if (!stricmp("type", key)) + { + eventTypeString = value; + } + } + } + LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; + } + else + { + if (ignoringTags) + { + LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + } + else + { + LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")" << LL_ENDL; + + // Ignore the InputXml stuff so we don't get confused + if (!stricmp("InputXml", tag)) + { + ignoringTags = true; + ignoreDepth = responseDepth; + accumulateText = false; + + LL_DEBUGS("VivoxProtocolParser") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL; + } + else if (!stricmp("CaptureDevices", tag)) + { + LLVivoxVoiceClient::getInstance()->clearCaptureDevices(); + } + else if (!stricmp("RenderDevices", tag)) + { + LLVivoxVoiceClient::getInstance()->clearRenderDevices(); + } + else if (!stricmp("CaptureDevice", tag)) + { + deviceString.clear(); + } + else if (!stricmp("RenderDevice", tag)) + { + deviceString.clear(); + } + else if (!stricmp("Buddies", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllBuddies(); + } + else if (!stricmp("BlockRules", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllBlockRules(); + } + else if (!stricmp("AutoAcceptRules", tag)) + { + LLVivoxVoiceClient::getInstance()->deleteAllAutoAcceptRules(); + } + + } + } + responseDepth++; +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::EndTag(const char *tag) +{ + const std::string& string = textBuffer; + + responseDepth--; + + if (ignoringTags) + { + if (ignoreDepth == responseDepth) + { + LL_DEBUGS("VivoxProtocolParser") << "end of ignore" << LL_ENDL; + ignoringTags = false; + } + else + { + LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + } + } + + if (!ignoringTags) + { + LL_DEBUGS("VivoxProtocolParser") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL; + + // Closing a tag. Finalize the text we've accumulated and reset + if (!stricmp("ReturnCode", tag)) + returnCode = strtol(string.c_str(), NULL, 10); + else if (!stricmp("SessionHandle", tag)) + sessionHandle = string; + else if (!stricmp("SessionGroupHandle", tag)) + sessionGroupHandle = string; + else if (!stricmp("StatusCode", tag)) + statusCode = strtol(string.c_str(), NULL, 10); + else if (!stricmp("StatusString", tag)) + statusString = string; + else if (!stricmp("ParticipantURI", tag)) + uriString = string; + else if (!stricmp("Volume", tag)) + volume = strtol(string.c_str(), NULL, 10); + else if (!stricmp("Energy", tag)) + energy = (F32)strtod(string.c_str(), NULL); + else if (!stricmp("IsModeratorMuted", tag)) + isModeratorMuted = !stricmp(string.c_str(), "true"); + else if (!stricmp("IsSpeaking", tag)) + isSpeaking = !stricmp(string.c_str(), "true"); + else if (!stricmp("Alias", tag)) + alias = string; + else if (!stricmp("NumberOfAliases", tag)) + numberOfAliases = strtol(string.c_str(), NULL, 10); + else if (!stricmp("Application", tag)) + applicationString = string; + else if (!stricmp("ConnectorHandle", tag)) + connectorHandle = string; + else if (!stricmp("VersionID", tag)) + versionID = string; + else if (!stricmp("AccountHandle", tag)) + accountHandle = string; + else if (!stricmp("State", tag)) + state = strtol(string.c_str(), NULL, 10); + else if (!stricmp("URI", tag)) + uriString = string; + else if (!stricmp("IsChannel", tag)) + isChannel = !stricmp(string.c_str(), "true"); + else if (!stricmp("Incoming", tag)) + incoming = !stricmp(string.c_str(), "true"); + else if (!stricmp("Enabled", tag)) + enabled = !stricmp(string.c_str(), "true"); + else if (!stricmp("Name", tag)) + nameString = string; + else if (!stricmp("AudioMedia", tag)) + audioMediaString = string; + else if (!stricmp("ChannelName", tag)) + nameString = string; + else if (!stricmp("DisplayName", tag)) + displayNameString = string; + else if (!stricmp("Device", tag)) + deviceString = string; + else if (!stricmp("AccountName", tag)) + nameString = string; + else if (!stricmp("ParticipantType", tag)) + participantType = strtol(string.c_str(), NULL, 10); + else if (!stricmp("IsLocallyMuted", tag)) + isLocallyMuted = !stricmp(string.c_str(), "true"); + else if (!stricmp("MicEnergy", tag)) + energy = (F32)strtod(string.c_str(), NULL); + else if (!stricmp("ChannelName", tag)) + nameString = string; + else if (!stricmp("ChannelURI", tag)) + uriString = string; + else if (!stricmp("BuddyURI", tag)) + uriString = string; + else if (!stricmp("Presence", tag)) + statusString = string; + else if (!stricmp("CaptureDevice", tag)) + { + LLVivoxVoiceClient::getInstance()->addCaptureDevice(deviceString); + } + else if (!stricmp("RenderDevice", tag)) + { + LLVivoxVoiceClient::getInstance()->addRenderDevice(deviceString); + } + else if (!stricmp("Buddy", tag)) + { + LLVivoxVoiceClient::getInstance()->processBuddyListEntry(uriString, displayNameString); + } + else if (!stricmp("BlockRule", tag)) + { + LLVivoxVoiceClient::getInstance()->addBlockRule(blockMask, presenceOnly); + } + else if (!stricmp("BlockMask", tag)) + blockMask = string; + else if (!stricmp("PresenceOnly", tag)) + presenceOnly = string; + else if (!stricmp("AutoAcceptRule", tag)) + { + LLVivoxVoiceClient::getInstance()->addAutoAcceptRule(autoAcceptMask, autoAddAsBuddy); + } + else if (!stricmp("AutoAcceptMask", tag)) + autoAcceptMask = string; + else if (!stricmp("AutoAddAsBuddy", tag)) + autoAddAsBuddy = string; + else if (!stricmp("MessageHeader", tag)) + messageHeader = string; + else if (!stricmp("MessageBody", tag)) + messageBody = string; + else if (!stricmp("NotificationType", tag)) + notificationType = string; + else if (!stricmp("HasText", tag)) + hasText = !stricmp(string.c_str(), "true"); + else if (!stricmp("HasAudio", tag)) + hasAudio = !stricmp(string.c_str(), "true"); + else if (!stricmp("HasVideo", tag)) + hasVideo = !stricmp(string.c_str(), "true"); + else if (!stricmp("Terminated", tag)) + terminated = !stricmp(string.c_str(), "true"); + else if (!stricmp("SubscriptionHandle", tag)) + subscriptionHandle = string; + else if (!stricmp("SubscriptionType", tag)) + subscriptionType = string; + + + textBuffer.clear(); + accumulateText= false; + + if (responseDepth == 0) + { + // We finished all of the XML, process the data + processResponse(tag); + } + } +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::CharData(const char *buffer, int length) +{ + /* + This method is called for anything that isn't a tag, which can be text you + want that lies between tags, and a lot of stuff you don't want like file formatting + (tabs, spaces, CR/LF, etc). + + Only copy text if we are in accumulate mode... + */ + if (accumulateText) + textBuffer.append(buffer, length); +} + +// -------------------------------------------------------------------------------- + +void LLVivoxProtocolParser::processResponse(std::string tag) +{ + LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; + + // SLIM SDK: the SDK now returns a statusCode of "200" (OK) for success. This is a change vs. previous SDKs. + // According to Mike S., "The actual API convention is that responses with return codes of 0 are successful, regardless of the status code returned", + // so I believe this will give correct behavior. + + if(returnCode == 0) + statusCode = 0; + + if (isEvent) + { + const char *eventTypeCstr = eventTypeString.c_str(); + if (!stricmp(eventTypeCstr, "AccountLoginStateChangeEvent")) + { + LLVivoxVoiceClient::getInstance()->accountLoginStateChangeEvent(accountHandle, statusCode, statusString, state); + } + else if (!stricmp(eventTypeCstr, "SessionAddedEvent")) + { + /* + <Event type="SessionAddedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <Uri>sip:confctl-1408789@bhr.vivox.com</Uri> + <IsChannel>true</IsChannel> + <Incoming>false</Incoming> + <ChannelName /> + </Event> + */ + LLVivoxVoiceClient::getInstance()->sessionAddedEvent(uriString, alias, sessionHandle, sessionGroupHandle, isChannel, incoming, nameString, applicationString); + } + else if (!stricmp(eventTypeCstr, "SessionRemovedEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionRemovedEvent(sessionHandle, sessionGroupHandle); + } + else if (!stricmp(eventTypeCstr, "SessionGroupAddedEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionGroupAddedEvent(sessionGroupHandle); + } + else if (!stricmp(eventTypeCstr, "MediaStreamUpdatedEvent")) + { + /* + <Event type="MediaStreamUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <StatusCode>200</StatusCode> + <StatusString>OK</StatusString> + <State>2</State> + <Incoming>false</Incoming> + </Event> + */ + LLVivoxVoiceClient::getInstance()->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); + } + else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) + { + /* + <Event type="TextStreamUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg1</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==1</SessionHandle> + <Enabled>true</Enabled> + <State>1</State> + <Incoming>true</Incoming> + </Event> + */ + LLVivoxVoiceClient::getInstance()->textStreamUpdatedEvent(sessionHandle, sessionGroupHandle, enabled, state, incoming); + } + else if (!stricmp(eventTypeCstr, "ParticipantAddedEvent")) + { + /* + <Event type="ParticipantAddedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> + <ParticipantUri>sip:xI5auBZ60SJWIk606-1JGRQ==@bhr.vivox.com</ParticipantUri> + <AccountName>xI5auBZ60SJWIk606-1JGRQ==</AccountName> + <DisplayName /> + <ParticipantType>0</ParticipantType> + </Event> + */ + LLVivoxVoiceClient::getInstance()->participantAddedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString, displayNameString, participantType); + } + else if (!stricmp(eventTypeCstr, "ParticipantRemovedEvent")) + { + /* + <Event type="ParticipantRemovedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg4</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==4</SessionHandle> + <ParticipantUri>sip:xtx7YNV-3SGiG7rA1fo5Ndw==@bhr.vivox.com</ParticipantUri> + <AccountName>xtx7YNV-3SGiG7rA1fo5Ndw==</AccountName> + </Event> + */ + LLVivoxVoiceClient::getInstance()->participantRemovedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString); + } + else if (!stricmp(eventTypeCstr, "ParticipantUpdatedEvent")) + { + /* + <Event type="ParticipantUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <ParticipantUri>sip:xFnPP04IpREWNkuw1cOXlhw==@bhr.vivox.com</ParticipantUri> + <IsModeratorMuted>false</IsModeratorMuted> + <IsSpeaking>true</IsSpeaking> + <Volume>44</Volume> + <Energy>0.0879437</Energy> + </Event> + */ + + // These happen so often that logging them is pretty useless. + squelchDebugOutput = true; + + LLVivoxVoiceClient::getInstance()->participantUpdatedEvent(sessionHandle, sessionGroupHandle, uriString, alias, isModeratorMuted, isSpeaking, volume, energy); + } + else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) + { + LLVivoxVoiceClient::getInstance()->auxAudioPropertiesEvent(energy); + } + else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) + { + LLVivoxVoiceClient::getInstance()->buddyPresenceEvent(uriString, alias, statusString, applicationString); + } + else if (!stricmp(eventTypeCstr, "BuddyAndGroupListChangedEvent")) + { + // The buddy list was updated during parsing. + // Need to recheck against the friends list. + LLVivoxVoiceClient::getInstance()->buddyListChanged(); + } + else if (!stricmp(eventTypeCstr, "BuddyChangedEvent")) + { + /* + <Event type="BuddyChangedEvent"> + <AccountHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==</AccountHandle> + <BuddyURI>sip:x9fFHFZjOTN6OESF1DUPrZQ==@bhr.vivox.com</BuddyURI> + <DisplayName>Monroe Tester</DisplayName> + <BuddyData /> + <GroupID>0</GroupID> + <ChangeType>Set</ChangeType> + </Event> + */ + // TODO: Question: Do we need to process this at all? + } + else if (!stricmp(eventTypeCstr, "MessageEvent")) + { + LLVivoxVoiceClient::getInstance()->messageEvent(sessionHandle, uriString, alias, messageHeader, messageBody, applicationString); + } + else if (!stricmp(eventTypeCstr, "SessionNotificationEvent")) + { + LLVivoxVoiceClient::getInstance()->sessionNotificationEvent(sessionHandle, uriString, notificationType); + } + else if (!stricmp(eventTypeCstr, "SubscriptionEvent")) + { + LLVivoxVoiceClient::getInstance()->subscriptionEvent(uriString, subscriptionHandle, alias, displayNameString, applicationString, subscriptionType); + } + else if (!stricmp(eventTypeCstr, "SessionUpdatedEvent")) + { + /* + <Event type="SessionUpdatedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + <SessionHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==0</SessionHandle> + <Uri>sip:confctl-9@bhd.vivox.com</Uri> + <IsMuted>0</IsMuted> + <Volume>50</Volume> + <TransmitEnabled>1</TransmitEnabled> + <IsFocused>0</IsFocused> + <SpeakerPosition><Position><X>0</X><Y>0</Y><Z>0</Z></Position></SpeakerPosition> + <SessionFontID>0</SessionFontID> + </Event> + */ + // We don't need to process this, but we also shouldn't warn on it, since that confuses people. + } + + else if (!stricmp(eventTypeCstr, "SessionGroupRemovedEvent")) + { + /* + <Event type="SessionGroupRemovedEvent"> + <SessionGroupHandle>c1_m1000xFnPP04IpREWNkuw1cOXlhw==_sg0</SessionGroupHandle> + </Event> + */ + // We don't need to process this, but we also shouldn't warn on it, since that confuses people. + } + else + { + LL_WARNS("VivoxProtocolParser") << "Unknown event type " << eventTypeString << LL_ENDL; + } + } + else + { + const char *actionCstr = actionString.c_str(); + if (!stricmp(actionCstr, "Connector.Create.1")) + { + LLVivoxVoiceClient::getInstance()->connectorCreateResponse(statusCode, statusString, connectorHandle, versionID); + } + else if (!stricmp(actionCstr, "Account.Login.1")) + { + LLVivoxVoiceClient::getInstance()->loginResponse(statusCode, statusString, accountHandle, numberOfAliases); + } + else if (!stricmp(actionCstr, "Session.Create.1")) + { + LLVivoxVoiceClient::getInstance()->sessionCreateResponse(requestId, statusCode, statusString, sessionHandle); + } + else if (!stricmp(actionCstr, "SessionGroup.AddSession.1")) + { + LLVivoxVoiceClient::getInstance()->sessionGroupAddSessionResponse(requestId, statusCode, statusString, sessionHandle); + } + else if (!stricmp(actionCstr, "Session.Connect.1")) + { + LLVivoxVoiceClient::getInstance()->sessionConnectResponse(requestId, statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.Logout.1")) + { + LLVivoxVoiceClient::getInstance()->logoutResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Connector.InitiateShutdown.1")) + { + LLVivoxVoiceClient::getInstance()->connectorShutdownResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.ListBlockRules.1")) + { + LLVivoxVoiceClient::getInstance()->accountListBlockRulesResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.ListAutoAcceptRules.1")) + { + LLVivoxVoiceClient::getInstance()->accountListAutoAcceptRulesResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Session.Set3DPosition.1")) + { + // We don't need to process these, but they're so spammy we don't want to log them. + squelchDebugOutput = true; + } + /* + else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) + { + LLVoiceClient::getInstance()->channelGetListResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Connector.AccountCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.MuteLocalMic.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.MuteLocalSpeaker.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.SetLocalMicVolume.1")) + { + + } + else if (!stricmp(actionCstr, "Connector.SetLocalSpeakerVolume.1")) + { + + } + else if (!stricmp(actionCstr, "Session.ListenerSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.SpeakerSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.AudioSourceSetPosition.1")) + { + + } + else if (!stricmp(actionCstr, "Session.GetChannelParticipants.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelUpdate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelDelete.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelCreateAndInvite.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderCreate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderUpdate.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelFolderDelete.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelAddModerator.1")) + { + + } + else if (!stricmp(actionCstr, "Account.ChannelDeleteModerator.1")) + { + + } + */ + } +} + diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h new file mode 100644 index 0000000000..59fec8b954 --- /dev/null +++ b/indra/newview/llvoicevivox.h @@ -0,0 +1,917 @@ +/** + * @file llvoicevivox.h + * @brief Declaration of LLDiamondwareVoiceClient class which is the interface to the voice client process. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, 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_VOICE_VIVOX_H +#define LL_VOICE_VIVOX_H + +class LLVOAvatar; +class LLVivoxProtocolParser; + +#include "lliopipe.h" +#include "llpumpio.h" +#include "llchainio.h" +#include "lliosocket.h" +#include "v3math.h" +#include "llframetimer.h" +#include "llviewerregion.h" +#include "llcallingcard.h" // for LLFriendObserver + +#ifdef LL_STANDALONE +# include "expat.h" +#else +# include "expat/expat.h" +#endif +#include "llvoiceclient.h" + + +class LLVivoxVoiceAccountProvisionResponder; +class LLVivoxVoiceClientMuteListObserver; +class LLVivoxVoiceClientFriendsObserver; + + +class LLVivoxVoiceClientParticipantObserver +{ +public: + virtual ~LLVivoxVoiceClientParticipantObserver() { } + virtual void onChange() = 0; +}; + + +class LLVivoxVoiceClient: public LLSingleton<LLVivoxVoiceClient>, virtual public LLVoiceModuleInterface +{ + LOG_CLASS(LLVivoxVoiceClient); +public: + LLVivoxVoiceClient(); + virtual ~LLVivoxVoiceClient(); + + + /// @name LLVoiceModuleInterface virtual implementations + /// @see LLVoiceModuleInterface + //@{ + virtual void init(LLPumpIO *pump); // Call this once at application startup (creates connector) + virtual void terminate(); // Call this to clean up during shutdown + + virtual const LLVoiceVersionInfo& getVersion(); + + virtual void updateSettings(); // call after loading settings and whenever they change + + // Returns true if vivox has successfully logged in and is not in error state + virtual bool isVoiceWorking(); + + ///////////////////// + /// @name Tuning + //@{ + virtual void tuningStart(); + virtual void tuningStop(); + virtual bool inTuningMode(); + + virtual void tuningSetMicVolume(float volume); + virtual void tuningSetSpeakerVolume(float volume); + virtual float tuningGetEnergy(void); + //@} + + ///////////////////// + /// @name Devices + //@{ + // This returns true when it's safe to bring up the "device settings" dialog in the prefs. + // i.e. when the daemon is running and connected, and the device lists are populated. + virtual bool deviceSettingsAvailable(); + + // Requery the vivox daemon for the current list of input/output devices. + // If you pass true for clearCurrentList, deviceSettingsAvailable() will be false until the query has completed + // (use this if you want to know when it's done). + // If you pass false, you'll have no way to know when the query finishes, but the device lists will not appear empty in the interim. + virtual void refreshDeviceLists(bool clearCurrentList = true); + + virtual void setCaptureDevice(const std::string& name); + virtual void setRenderDevice(const std::string& name); + + virtual LLVoiceDeviceList& getCaptureDevices(); + virtual LLVoiceDeviceList& getRenderDevices(); + //@} + + virtual void getParticipantList(std::set<LLUUID> &participants); + virtual bool isParticipant(const LLUUID& speaker_id); + + // Send a text message to the specified user, initiating the session if necessary. + virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message); + + // close any existing text IM session with the specified user + virtual void endUserIMSession(const LLUUID &uuid); + + // Returns true if calling back the session URI after the session has closed is possible. + // Currently this will be false only for PSTN P2P calls. + // NOTE: this will return true if the session can't be found. + virtual BOOL isSessionCallBackPossible(const LLUUID &session_id); + + // Returns true if the session can accepte text IM's. + // Currently this will be false only for PSTN P2P calls. + // NOTE: this will return true if the session can't be found. + virtual BOOL isSessionTextIMPossible(const LLUUID &session_id); + + + //////////////////////////// + /// @name Channel stuff + //@{ + // returns true iff the user is currently in a proximal (local spatial) channel. + // Note that gestures should only fire if this returns true. + virtual bool inProximalChannel(); + + virtual void setNonSpatialChannel(const std::string &uri, + const std::string &credentials); + + virtual void setSpatialChannel(const std::string &uri, + const std::string &credentials); + + virtual void leaveNonSpatialChannel(); + + virtual void leaveChannel(void); + + // Returns the URI of the current channel, or an empty string if not currently in a channel. + // NOTE that it will return an empty string if it's in the process of joining a channel. + virtual std::string getCurrentChannel(); + //@} + + + ////////////////////////// + /// @name invitations + //@{ + // start a voice channel with the specified user + virtual void callUser(const LLUUID &uuid); + virtual bool isValidChannel(std::string &channelHandle); + virtual bool answerInvite(std::string &channelHandle); + virtual void declineInvite(std::string &channelHandle); + //@} + + ///////////////////////// + /// @name Volume/gain + //@{ + virtual void setVoiceVolume(F32 volume); + virtual void setMicGain(F32 volume); + //@} + + ///////////////////////// + /// @name enable disable voice and features + //@{ + virtual bool voiceEnabled(); + virtual void setVoiceEnabled(bool enabled); + virtual BOOL lipSyncEnabled(); + virtual void setLipSyncEnabled(BOOL enabled); + virtual void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + //@} + + //////////////////////// + /// @name PTT + //@{ + virtual void setUserPTTState(bool ptt); + virtual bool getUserPTTState(); + virtual void setUsePTT(bool usePTT); + virtual void setPTTIsToggle(bool PTTIsToggle); + virtual bool getPTTIsToggle(); + virtual void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs + virtual void toggleUserPTTState(void); + + virtual void keyDown(KEY key, MASK mask); + virtual void keyUp(KEY key, MASK mask); + virtual void middleMouseState(bool down); + //@} + + ////////////////////////// + /// @name nearby speaker accessors + //@{ + virtual BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + virtual std::string getDisplayName(const LLUUID& id); + virtual BOOL isOnlineSIP(const LLUUID &id); + virtual BOOL isParticipantAvatar(const LLUUID &id); + virtual BOOL getIsSpeaking(const LLUUID& id); + virtual BOOL getIsModeratorMuted(const LLUUID& id); + virtual F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... + virtual BOOL getOnMuteList(const LLUUID& id); + virtual F32 getUserVolume(const LLUUID& id); + virtual void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) + //@} + + // authorize the user + virtual void userAuthorized(const std::string& user_id, + const LLUUID &agentID); + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceClientStatusObserver* observer); + virtual void removeObserver(LLVoiceClientStatusObserver* observer); + virtual void addObserver(LLFriendObserver* observer); + virtual void removeObserver(LLFriendObserver* observer); + virtual void addObserver(LLVoiceClientParticipantObserver* observer); + virtual void removeObserver(LLVoiceClientParticipantObserver* observer); + + + + //@} + + virtual std::string sipURIFromID(const LLUUID &id); + //@} + + +protected: + ////////////////////// + // Vivox Specific definitions + + friend class LLVivoxVoiceAccountProvisionResponder; + friend class LLVivoxVoiceClientMuteListObserver; + friend class LLVivoxVoiceClientFriendsObserver; + + enum streamState + { + streamStateUnknown = 0, + streamStateIdle = 1, + streamStateConnected = 2, + streamStateRinging = 3, + }; + struct participantState + { + public: + participantState(const std::string &uri); + + bool updateMuteState(); // true if mute state has changed + bool isAvatar(); + + std::string mURI; + LLUUID mAvatarID; + std::string mAccountName; + std::string mDisplayName; + LLFrameTimer mSpeakingTimeout; + F32 mLastSpokeTimestamp; + F32 mPower; + F32 mVolume; + std::string mGroupID; + int mUserVolume; + bool mPTT; + bool mIsSpeaking; + bool mIsModeratorMuted; + bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) + bool mVolumeSet; // true if incoming volume messages should not change the volume + bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) + bool mAvatarIDValid; + bool mIsSelf; + }; + + typedef std::map<const std::string, participantState*> participantMap; + + typedef std::map<const LLUUID, participantState*> participantUUIDMap; + + struct sessionState + { + public: + sessionState(); + ~sessionState(); + + participantState *addParticipant(const std::string &uri); + // Note: after removeParticipant returns, the participant* that was passed to it will have been deleted. + // Take care not to use the pointer again after that. + void removeParticipant(participantState *participant); + void removeAllParticipants(); + + participantState *findParticipant(const std::string &uri); + participantState *findParticipantByID(const LLUUID& id); + + bool isCallBackPossible(); + bool isTextIMPossible(); + + std::string mHandle; + std::string mGroupHandle; + std::string mSIPURI; + std::string mAlias; + std::string mName; + std::string mAlternateSIPURI; + std::string mHash; // Channel password + std::string mErrorStatusString; + std::queue<std::string> mTextMsgQueue; + + LLUUID mIMSessionID; + LLUUID mCallerID; + int mErrorStatusCode; + int mMediaStreamState; + int mTextStreamState; + bool mCreateInProgress; // True if a Session.Create has been sent for this session and no response has been received yet. + bool mMediaConnectInProgress; // True if a Session.MediaConnect has been sent for this session and no response has been received yet. + bool mVoiceInvitePending; // True if a voice invite is pending for this session (usually waiting on a name lookup) + bool mTextInvitePending; // True if a text invite is pending for this session (usually waiting on a name lookup) + bool mSynthesizedCallerID; // True if the caller ID is a hash of the SIP URI -- this means we shouldn't do a name lookup. + bool mIsChannel; // True for both group and spatial channels (false for p2p, PSTN) + bool mIsSpatial; // True for spatial channels + bool mIsP2P; + bool mIncoming; + bool mVoiceEnabled; + bool mReconnect; // Whether we should try to reconnect to this session if it's dropped + // Set to true when the mute state of someone in the participant list changes. + // The code will have to walk the list to find the changed participant(s). + bool mVolumeDirty; + bool mMuteDirty; + + bool mParticipantsChanged; + participantMap mParticipantsByURI; + participantUUIDMap mParticipantsByUUID; + }; + + // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. + // Note: if you change this list, please make corresponding changes to LLVivoxVoiceClient::state2string(). + enum state + { + stateDisableCleanup, + stateDisabled, // Voice is turned off. + stateStart, // Class is initialized, socket is created + stateDaemonLaunched, // Daemon has been launched + stateConnecting, // connect() call has been issued + stateConnected, // connection to the daemon has been made, send some initial setup commands. + stateIdle, // socket is connected, ready for messaging + stateMicTuningStart, + stateMicTuningRunning, + stateMicTuningStop, + stateConnectorStart, // connector needs to be started + stateConnectorStarting, // waiting for connector handle + stateConnectorStarted, // connector handle received + stateLoginRetry, // need to retry login (failed due to changing password) + stateLoginRetryWait, // waiting for retry timer + stateNeedsLogin, // send login request + stateLoggingIn, // waiting for account handle + stateLoggedIn, // account handle received + stateCreatingSessionGroup, // Creating the main session group + stateNoChannel, // + stateJoiningSession, // waiting for session handle + stateSessionJoined, // session handle received + stateRunning, // in session, steady state + stateLeavingSession, // waiting for terminate session response + stateSessionTerminated, // waiting for terminate session response + + stateLoggingOut, // waiting for logout response + stateLoggedOut, // logout response received + stateConnectorStopping, // waiting for connector stop + stateConnectorStopped, // connector stop received + + // We go to this state if the login fails because the account needs to be provisioned. + + // error states. No way to recover from these yet. + stateConnectorFailed, + stateConnectorFailedWaiting, + stateLoginFailed, + stateLoginFailedWaiting, + stateJoinSessionFailed, + stateJoinSessionFailedWaiting, + + stateJail // Go here when all else has failed. Nothing will be retried, we're done. + }; + + typedef std::map<std::string, sessionState*> sessionMap; + + + + /////////////////////////////////////////////////////// + // Private Member Functions + ////////////////////////////////////////////////////// + + ////////////////////////////// + /// @name TVC/Server management and communication + //@{ + // Call this if the connection to the daemon terminates unexpectedly. It will attempt to reset everything and relaunch. + void daemonDied(); + + // Call this if we're just giving up on voice (can't provision an account, etc.). It will clean up and go away. + void giveUp(); + + // write to the tvc + bool writeString(const std::string &str); + + void connectorCreate(); + void connectorShutdown(); + void closeSocket(void); + + void requestVoiceAccountProvision(S32 retries = 3); + void login( + const std::string& account_name, + const std::string& password, + const std::string& voice_sip_uri_hostname, + const std::string& voice_account_server_uri); + void loginSendMessage(); + void logout(); + void logoutSendMessage(); + + + //@} + + //------------------------------------ + // tuning + + void tuningRenderStartSendMessage(const std::string& name, bool loop); + void tuningRenderStopSendMessage(); + + void tuningCaptureStartSendMessage(int duration); + void tuningCaptureStopSendMessage(); + + bool inTuningStates(); + + //---------------------------------- + // devices + void clearCaptureDevices(); + void addCaptureDevice(const std::string& name); + void clearRenderDevices(); + void addRenderDevice(const std::string& name); + void buildSetAudioDevices(std::ostringstream &stream); + + void getCaptureDevicesSendMessage(); + void getRenderDevicesSendMessage(); + + // local audio updates + void buildLocalAudioUpdates(std::ostringstream &stream); + + + ///////////////////////////// + // Response/Event handlers + void connectorCreateResponse(int statusCode, std::string &statusString, std::string &connectorHandle, std::string &versionID); + void loginResponse(int statusCode, std::string &statusString, std::string &accountHandle, int numberOfAliases); + void sessionCreateResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); + void sessionGroupAddSessionResponse(std::string &requestId, int statusCode, std::string &statusString, std::string &sessionHandle); + void sessionConnectResponse(std::string &requestId, int statusCode, std::string &statusString); + void logoutResponse(int statusCode, std::string &statusString); + void connectorShutdownResponse(int statusCode, std::string &statusString); + + void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); + void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); + void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); + void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); + void sessionGroupAddedEvent(std::string &sessionGroupHandle); + void sessionRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle); + void participantAddedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString, std::string &displayNameString, int participantType); + void participantRemovedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, std::string &nameString); + void participantUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, std::string &uriString, std::string &alias, bool isModeratorMuted, bool isSpeaking, int volume, F32 energy); + void auxAudioPropertiesEvent(F32 energy); + void buddyPresenceEvent(std::string &uriString, std::string &alias, std::string &statusString, std::string &applicationString); + void messageEvent(std::string &sessionHandle, std::string &uriString, std::string &alias, std::string &messageHeader, std::string &messageBody, std::string &applicationString); + void sessionNotificationEvent(std::string &sessionHandle, std::string &uriString, std::string ¬ificationType); + void subscriptionEvent(std::string &buddyURI, std::string &subscriptionHandle, std::string &alias, std::string &displayName, std::string &applicationString, std::string &subscriptionType); + + void buddyListChanged(); + void muteListChanged(); + void updateFriends(U32 mask); + + ///////////////////////////// + // Sending updates of current state + void updatePosition(void); + void setCameraPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); + void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); + bool channelFromRegion(LLViewerRegion *region, std::string &name); + + void setEarLocation(S32 loc); + + + ///////////////////////////// + // Accessors for data related to nearby speakers + + // MBW -- XXX -- Not sure how to get this data out of the TVC + BOOL getUsingPTT(const LLUUID& id); + std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable) + + ///////////////////////////// + BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + // Use this to determine whether to show a "no speech" icon in the menu bar. + + + // PTT + void setPTTKey(std::string &key); + + ///////////////////////////// + // Recording controls + void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200); + void recordingLoopSave(const std::string& filename); + void recordingStop(); + + // Playback controls + void filePlaybackStart(const std::string& filename); + void filePlaybackStop(); + void filePlaybackSetPaused(bool paused); + void filePlaybackSetMode(bool vox = false, float speed = 1.0f); + + participantState *findParticipantByID(const LLUUID& id); + + + //////////////////////////////////////// + // voice sessions. + typedef std::set<sessionState*> sessionSet; + + typedef sessionSet::iterator sessionIterator; + sessionIterator sessionsBegin(void); + sessionIterator sessionsEnd(void); + + sessionState *findSession(const std::string &handle); + sessionState *findSessionBeingCreatedByURI(const std::string &uri); + sessionState *findSession(const LLUUID &participant_id); + sessionState *findSessionByCreateID(const std::string &create_id); + + sessionState *addSession(const std::string &uri, const std::string &handle = LLStringUtil::null); + void setSessionHandle(sessionState *session, const std::string &handle = LLStringUtil::null); + void setSessionURI(sessionState *session, const std::string &uri); + void deleteSession(sessionState *session); + void deleteAllSessions(void); + + void verifySessionState(void); + + void joinedAudioSession(sessionState *session); + void leftAudioSession(sessionState *session); + + // This is called in several places where the session _may_ need to be deleted. + // It contains logic for whether to delete the session or keep it around. + void reapSession(sessionState *session); + + // Returns true if the session seems to indicate we've moved to a region on a different voice server + bool sessionNeedsRelog(sessionState *session); + + + ////////////////////////////////////// + // buddy list stuff, needed for SLIM later + struct buddyListEntry + { + buddyListEntry(const std::string &uri); + std::string mURI; + std::string mDisplayName; + LLUUID mUUID; + bool mOnlineSL; + bool mOnlineSLim; + bool mCanSeeMeOnline; + bool mHasBlockListEntry; + bool mHasAutoAcceptListEntry; + bool mNameResolved; + bool mInSLFriends; + bool mInVivoxBuddies; + bool mNeedsNameUpdate; + }; + + typedef std::map<std::string, buddyListEntry*> buddyListMap; + + // This should be called when parsing a buddy list entry sent by SLVoice. + void processBuddyListEntry(const std::string &uri, const std::string &displayName); + + buddyListEntry *addBuddy(const std::string &uri); + buddyListEntry *addBuddy(const std::string &uri, const std::string &displayName); + buddyListEntry *findBuddy(const std::string &uri); + buddyListEntry *findBuddy(const LLUUID &id); + buddyListEntry *findBuddyByDisplayName(const std::string &name); + void deleteBuddy(const std::string &uri); + void deleteAllBuddies(void); + + void deleteAllBlockRules(void); + void addBlockRule(const std::string &blockMask, const std::string &presenceOnly); + void deleteAllAutoAcceptRules(void); + void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); + void accountListBlockRulesResponse(int statusCode, const std::string &statusString); + void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); + + ///////////////////////////// + // session control messages + + void accountListBlockRulesSendMessage(); + void accountListAutoAcceptRulesSendMessage(); + + void sessionGroupCreateSendMessage(); + void sessionCreateSendMessage(sessionState *session, bool startAudio = true, bool startText = false); + void sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio = true, bool startText = false); + void sessionMediaConnectSendMessage(sessionState *session); // just joins the audio session + void sessionTextConnectSendMessage(sessionState *session); // just joins the text session + void sessionTerminateSendMessage(sessionState *session); + void sessionGroupTerminateSendMessage(sessionState *session); + void sessionMediaDisconnectSendMessage(sessionState *session); + void sessionTextDisconnectSendMessage(sessionState *session); + + // Pokes the state machine to leave the audio session next time around. + void sessionTerminate(); + + // Pokes the state machine to shut down the connector and restart it. + void requestRelog(); + + // Does the actual work to get out of the audio session + void leaveAudioSession(); + + void lookupName(const LLUUID &id); + static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + void avatarNameResolved(const LLUUID &id, const std::string &name); + +private: + LLVoiceVersionInfo mVoiceVersion; + + state mState; + bool mSessionTerminateRequested; + bool mRelogRequested; + // Number of times (in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine(). + // The larger it is the greater is possibility there is a problem with connection to voice server. + // Introduced while fixing EXT-4313. + int mSpatialJoiningNum; + + void setState(state inState); + state getState(void) { return mState; }; + std::string state2string(state inState); + + void stateMachine(); + static void idle(void *user_data); + + LLHost mDaemonHost; + LLSocket::ptr_t mSocket; + bool mConnected; + + + LLPumpIO *mPump; + friend class LLVivoxProtocolParser; + + std::string mAccountName; + std::string mAccountPassword; + std::string mAccountDisplayName; + + bool mTuningMode; + float mTuningEnergy; + std::string mTuningAudioFile; + int mTuningMicVolume; + bool mTuningMicVolumeDirty; + int mTuningSpeakerVolume; + bool mTuningSpeakerVolumeDirty; + state mTuningExitState; // state to return to when we leave tuning mode. + + std::string mSpatialSessionURI; + std::string mSpatialSessionCredentials; + + std::string mMainSessionGroupHandle; // handle of the "main" session group. + + std::string mChannelName; // Name of the channel to be looked up + bool mAreaVoiceDisabled; + sessionState *mAudioSession; // Session state for the current audio session + bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified. + + sessionState *mNextAudioSession; // Session state for the audio session we're trying to join + +// std::string mSessionURI; // URI of the session we're in. +// std::string mSessionHandle; // returned by ? + + S32 mCurrentParcelLocalID; // Used to detect parcel boundary crossings + std::string mCurrentRegionName; // Used to detect parcel boundary crossings + + std::string mConnectorHandle; // returned by "Create Connector" message + std::string mAccountHandle; // returned by login message + int mNumberOfAliases; + U32 mCommandCookie; + + std::string mVoiceAccountServerURI; + std::string mVoiceSIPURIHostName; + + int mLoginRetryCount; + + sessionMap mSessionsByHandle; // Active sessions, indexed by session handle. Sessions which are being initiated may not be in this map. + sessionSet mSessions; // All sessions, not indexed. This is the canonical session list. + + bool mBuddyListMapPopulated; + bool mBlockRulesListReceived; + bool mAutoAcceptRulesListReceived; + buddyListMap mBuddyListMap; + + LLVoiceDeviceList mCaptureDevices; + LLVoiceDeviceList mRenderDevices; + + std::string mCaptureDevice; + std::string mRenderDevice; + bool mCaptureDeviceDirty; + bool mRenderDeviceDirty; + + // This should be called when the code detects we have changed parcels. + // It initiates the call to the server that gets the parcel channel. + void parcelChanged(); + + void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); + void joinSession(sessionState *session); + + std::string nameFromAvatar(LLVOAvatar *avatar); + std::string nameFromID(const LLUUID &id); + bool IDFromName(const std::string name, LLUUID &uuid); + std::string displayNameFromAvatar(LLVOAvatar *avatar); + std::string sipURIFromAvatar(LLVOAvatar *avatar); + std::string sipURIFromName(std::string &name); + + // Returns the name portion of the SIP URI if the string looks vaguely like a SIP URI, or an empty string if not. + std::string nameFromsipURI(const std::string &uri); + + bool inSpatialChannel(void); + std::string getAudioSessionURI(); + std::string getAudioSessionHandle(); + + void sendPositionalUpdate(void); + + void buildSetCaptureDevice(std::ostringstream &stream); + void buildSetRenderDevice(std::ostringstream &stream); + + void clearAllLists(); + void checkFriend(const LLUUID& id); + void sendFriendsListUpdates(); + + // start a text IM session with the specified user + // This will be asynchronous, the session may be established at a future time. + sessionState* startUserIMSession(const LLUUID& uuid); + void sendQueuedTextMessages(sessionState *session); + + void enforceTether(void); + + bool mSpatialCoordsDirty; + + LLVector3d mCameraPosition; + LLVector3d mCameraRequestedPosition; + LLVector3 mCameraVelocity; + LLMatrix3 mCameraRot; + + LLVector3d mAvatarPosition; + LLVector3 mAvatarVelocity; + LLMatrix3 mAvatarRot; + + bool mPTTDirty; + bool mPTT; + + bool mUsePTT; + bool mPTTIsMiddleMouse; + KEY mPTTKey; + bool mPTTIsToggle; + bool mUserPTTState; + bool mMuteMic; + + // Set to true when the friends list is known to have changed. + bool mFriendsListDirty; + + enum + { + earLocCamera = 0, // ear at camera + earLocAvatar, // ear at avatar + earLocMixed // ear at avatar location/camera direction + }; + + S32 mEarLocation; + + bool mSpeakerVolumeDirty; + bool mSpeakerMuteDirty; + int mSpeakerVolume; + + int mMicVolume; + bool mMicVolumeDirty; + + bool mVoiceEnabled; + bool mWriteInProgress; + std::string mWriteString; + size_t mWriteOffset; + + LLTimer mUpdateTimer; + + BOOL mLipSyncEnabled; + + typedef std::set<LLVoiceClientParticipantObserver*> observer_set_t; + observer_set_t mParticipantObservers; + + void notifyParticipantObservers(); + + typedef std::set<LLVoiceClientStatusObserver*> status_observer_set_t; + status_observer_set_t mStatusObservers; + + void notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status); + + typedef std::set<LLFriendObserver*> friend_observer_set_t; + friend_observer_set_t mFriendObservers; + void notifyFriendObservers(); +}; + +/** + * @class LLVivoxProtocolParser + * @brief This class helps construct new LLIOPipe specializations + * @see LLIOPipe + * + * THOROUGH_DESCRIPTION + */ +class LLVivoxProtocolParser : public LLIOPipe +{ + LOG_CLASS(LLVivoxProtocolParser); +public: + LLVivoxProtocolParser(); + virtual ~LLVivoxProtocolParser(); + +protected: + /* @name LLIOPipe virtual implementations + */ + //@{ + /** + * @brief Process the data in buffer + */ + virtual EStatus process_impl( + const LLChannelDescriptors& channels, + buffer_ptr_t& buffer, + bool& eos, + LLSD& context, + LLPumpIO* pump); + //@} + + std::string mInput; + + // Expat control members + XML_Parser parser; + int responseDepth; + bool ignoringTags; + bool isEvent; + int ignoreDepth; + + // Members for processing responses. The values are transient and only valid within a call to processResponse(). + bool squelchDebugOutput; + int returnCode; + int statusCode; + std::string statusString; + std::string requestId; + std::string actionString; + std::string connectorHandle; + std::string versionID; + std::string accountHandle; + std::string sessionHandle; + std::string sessionGroupHandle; + std::string alias; + std::string applicationString; + + // Members for processing events. The values are transient and only valid within a call to processResponse(). + std::string eventTypeString; + int state; + std::string uriString; + bool isChannel; + bool incoming; + bool enabled; + std::string nameString; + std::string audioMediaString; + std::string deviceString; + std::string displayNameString; + int participantType; + bool isLocallyMuted; + bool isModeratorMuted; + bool isSpeaking; + int volume; + F32 energy; + std::string messageHeader; + std::string messageBody; + std::string notificationType; + bool hasText; + bool hasAudio; + bool hasVideo; + bool terminated; + std::string blockMask; + std::string presenceOnly; + std::string autoAcceptMask; + std::string autoAddAsBuddy; + int numberOfAliases; + std::string subscriptionHandle; + std::string subscriptionType; + + + // Members for processing text between tags + std::string textBuffer; + bool accumulateText; + + void reset(); + + void processResponse(std::string tag); + + static void XMLCALL ExpatStartTag(void *data, const char *el, const char **attr); + static void XMLCALL ExpatEndTag(void *data, const char *el); + static void XMLCALL ExpatCharHandler(void *data, const XML_Char *s, int len); + + void StartTag(const char *tag, const char **attr); + void EndTag(const char *tag); + void CharData(const char *buffer, int length); + +}; + + +#endif //LL_VIVOX_VOICE_CLIENT_H + + + diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 594435475f..d6453111d7 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1856,6 +1856,11 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m } LLTextureEntry *te = getTE(texture_index); + if(!te) + { + return ; + } + LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index << " hasMedia = " << te->hasMedia() << " : " << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 63f99273fe..3ecd1296bd 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -88,7 +88,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id); LLWearable::LLWearable(const LLTransactionID& transaction_id) : mDefinitionVersion(LLWearable::sCurrentDefinitionVersion), - mType(WT_INVALID) + mType(LLWearableType::WT_INVALID) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -96,7 +96,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) : LLWearable::LLWearable(const LLAssetID& asset_id) : mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ), - mType(WT_INVALID) + mType(LLWearableType::WT_INVALID) { mAssetID = asset_id; mTransactionID.setNull(); @@ -108,17 +108,17 @@ LLWearable::~LLWearable() const std::string& LLWearable::getTypeLabel() const { - return LLWearableDictionary::getTypeLabel(mType); + return LLWearableType::getTypeLabel(mType); } const std::string& LLWearable::getTypeName() const { - return LLWearableDictionary::getTypeName(mType); + return LLWearableType::getTypeName(mType); } LLAssetType::EType LLWearable::getAssetType() const { - return LLWearableDictionary::getAssetType(mType); + return LLWearableType::getAssetType(mType); } BOOL LLWearable::exportFile(LLFILE* file) const @@ -363,13 +363,13 @@ BOOL LLWearable::importFile( LLFILE* file ) llwarns << "Bad Wearable asset: bad type" << llendl; return FALSE; } - if( 0 <= type && type < WT_COUNT ) + if( 0 <= type && type < LLWearableType::WT_COUNT ) { - setType((EWearableType)type); + setType((LLWearableType::EType)type); } else { - mType = WT_COUNT; + mType = LLWearableType::WT_COUNT; llwarns << "Bad Wearable asset: bad type #" << type << llendl; return FALSE; } @@ -679,15 +679,15 @@ void LLWearable::writeToAvatar() // Updates the user's avatar's appearance, replacing this wearables' parameters and textures with default values. // static -void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) +void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake ) { if (!isAgentAvatarValid()) return; // You can't just remove body parts. - if( (type == WT_SHAPE) || - (type == WT_SKIN) || - (type == WT_HAIR) || - (type == WT_EYES) ) + if( (type == LLWearableType::WT_SHAPE) || + (type == LLWearableType::WT_SKIN) || + (type == LLWearableType::WT_HAIR) || + (type == LLWearableType::WT_EYES) ) { return; } @@ -789,7 +789,7 @@ const LLUUID& LLWearable::getItemID() const return mItemID; } -void LLWearable::setType(EWearableType type) +void LLWearable::setType(LLWearableType::EType type) { mType = type; createVisualParams(); @@ -1118,7 +1118,7 @@ void LLWearable::refreshName() struct LLWearableSaveData { - EWearableType mType; + LLWearableType::EType mType; }; void LLWearable::saveNewAsset() const @@ -1181,7 +1181,7 @@ void LLWearable::saveNewAsset() const void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLWearableSaveData* data = (LLWearableSaveData*)userdata; - const std::string& type_name = LLWearableDictionary::getTypeName(data->mType); + const std::string& type_name = LLWearableType::getTypeName(data->mType); if(0 == status) { // Success @@ -1207,7 +1207,7 @@ void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userda std::ostream& operator<<(std::ostream &s, const LLWearable &w) { - s << "wearable " << LLWearableDictionary::getTypeName(w.mType) << "\n"; + s << "wearable " << LLWearableType::getTypeName(w.mType) << "\n"; s << " Name: " << w.mName << "\n"; s << " Desc: " << w.mDescription << "\n"; //w.mPermissions diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 7bd5305079..458415228f 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -38,7 +38,7 @@ #include "llpermissions.h" #include "llsaleinfo.h" #include "llassetstorage.h" -#include "llwearabledictionary.h" +#include "llwearabletype.h" #include "llfile.h" #include "lllocaltextureobject.h" @@ -68,8 +68,8 @@ public: const LLUUID& getItemID() const; const LLAssetID& getAssetID() const { return mAssetID; } const LLTransactionID& getTransactionID() const { return mTransactionID; } - EWearableType getType() const { return mType; } - void setType(EWearableType type); + LLWearableType::EType getType() const { return mType; } + void setType(LLWearableType::EType type); const std::string& getName() const { return mName; } void setName(const std::string& name) { mName = name; } const std::string& getDescription() const { return mDescription; } @@ -93,7 +93,7 @@ public: void writeToAvatar(); void removeFromAvatar( BOOL upload_bake ) { LLWearable::removeFromAvatar( mType, upload_bake ); } - static void removeFromAvatar( EWearableType type, BOOL upload_bake ); + static void removeFromAvatar( LLWearableType::EType type, BOOL upload_bake ); BOOL exportFile(LLFILE* file) const; BOOL importFile(LLFILE* file); @@ -156,7 +156,7 @@ private: LLSaleInfo mSaleInfo; LLAssetID mAssetID; LLTransactionID mTransactionID; - EWearableType mType; + LLWearableType::EType mType; typedef std::map<S32, F32> param_map_t; param_map_t mSavedVisualParamMap; // last saved version of visual params diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp new file mode 100644 index 0000000000..bac66d966a --- /dev/null +++ b/indra/newview/llwearableitemslist.cpp @@ -0,0 +1,329 @@ +/** + * @file llwearableitemslist.cpp + * @brief A flat list of wearable items. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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 "llwearableitemslist.h" + +#include "lliconctrl.h" + +#include "llinventoryfunctions.h" +#include "llinventorymodel.h" +#include "lltransutil.h" + +class LLFindOutfitItems : public LLInventoryCollectFunctor +{ +public: + LLFindOutfitItems() {} + virtual ~LLFindOutfitItems() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +}; + +bool LLFindOutfitItems::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + if(item) + { + if((item->getType() == LLAssetType::AT_CLOTHING) + || (item->getType() == LLAssetType::AT_BODYPART) + || (item->getType() == LLAssetType::AT_OBJECT)) + { + return TRUE; + } + } + return FALSE; +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +void LLPanelWearableListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + LLPanelInventoryListItemBase::onMouseEnter(x, y, mask); + setWidgetsVisible(true); + reshapeWidgets(); +} + +void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + LLPanelInventoryListItemBase::onMouseLeave(x, y, mask); + setWidgetsVisible(false); + reshapeWidgets(); +} + +LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item) +: LLPanelInventoryListItemBase(item) +{ +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +// static +LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item) +{ + LLPanelClothingListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelClothingListItem(item); + list_item->init(); + } + return list_item; +} + +LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item) + : LLPanelDeletableWearableListItem(item) +{ +} + +LLPanelClothingListItem::~LLPanelClothingListItem() +{ +} + +void LLPanelClothingListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_clothing_list_item.xml"); +} + +BOOL LLPanelClothingListItem::postBuild() +{ + LLPanelDeletableWearableListItem::postBuild(); + + addWidgetToRightSide("btn_move_up"); + addWidgetToRightSide("btn_move_down"); + addWidgetToRightSide("btn_lock"); + addWidgetToRightSide("btn_edit"); + + setWidgetsVisible(false); + reshapeWidgets(); + + return TRUE; +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +// static +LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item) +{ + LLPanelBodyPartsListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelBodyPartsListItem(item); + list_item->init(); + } + return list_item; +} + +LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) +{ +} + +LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() +{ +} + +void LLPanelBodyPartsListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_body_parts_list_item.xml"); +} + +BOOL LLPanelBodyPartsListItem::postBuild() +{ + LLPanelInventoryListItemBase::postBuild(); + + addWidgetToRightSide("btn_lock"); + addWidgetToRightSide("btn_edit"); + + return TRUE; +} + + +// static +LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item) +{ + LLPanelDeletableWearableListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelDeletableWearableListItem(item); + list_item->init(); + } + return list_item; +} + +LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) +{ +} + +void LLPanelDeletableWearableListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_deletable_wearable_list_item.xml"); +} + +BOOL LLPanelDeletableWearableListItem::postBuild() +{ + LLPanelWearableListItem::postBuild(); + + addWidgetToLeftSide("btn_delete"); + + LLButton* delete_btn = getChild<LLButton>("btn_delete"); + // Reserve space for 'delete' button event if it is invisible. + setLeftWidgetsWidth(delete_btn->getRect().mRight); + + setWidgetsVisible(false); + reshapeWidgets(); + + return TRUE; +} + + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableType::EType w_type) +{ + LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type); + list_item->init(); + return list_item; +} + +void LLPanelDummyClothingListItem::updateItem() +{ + std::string title = wearableTypeToString(mWearableType); + setTitle(title, LLStringUtil::null); +} + +BOOL LLPanelDummyClothingListItem::postBuild() +{ + LLIconCtrl* icon = getChild<LLIconCtrl>("item_icon"); + setIconCtrl(icon); + setTitleCtrl(getChild<LLTextBox>("item_name")); + + addWidgetToRightSide("btn_add"); + + setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, FALSE, mWearableType, FALSE)); + updateItem(); + + // Make it look loke clothing item - reserve space for 'delete' button + setLeftWidgetsWidth(icon->getRect().mLeft); + + setWidgetsVisible(false); + reshapeWidgets(); + + return TRUE; +} + +LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type) + : LLPanelWearableListItem(NULL) + , mWearableType(w_type) +{ +} + +void LLPanelDummyClothingListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_dummy_clothing_list_item.xml"); +} + +typedef std::map<LLWearableType::EType, std::string> clothing_to_string_map_t; + +clothing_to_string_map_t init_clothing_string_map() +{ + clothing_to_string_map_t w_map; + w_map.insert(std::make_pair(LLWearableType::WT_SHIRT, "shirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_PANTS, "pants_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SHOES, "shoes_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SOCKS, "socks_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_JACKET, "jacket_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_GLOVES, "gloves_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_UNDERSHIRT, "undershirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_UNDERPANTS, "underpants_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_SKIRT, "skirt_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_ALPHA, "alpha_not_worn")); + w_map.insert(std::make_pair(LLWearableType::WT_TATTOO, "tattoo_not_worn")); + return w_map; +} + +std::string LLPanelDummyClothingListItem::wearableTypeToString(LLWearableType::EType w_type) +{ + static const clothing_to_string_map_t w_map = init_clothing_string_map(); + static const std::string invalid_str = LLTrans::getString("invalid_not_worn"); + + std::string type_str = invalid_str; + clothing_to_string_map_t::const_iterator it = w_map.find(w_type); + if(w_map.end() != it) + { + type_str = LLTrans::getString(it->second); + } + return type_str; +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); + +LLWearableItemsList::Params::Params() +{} + +LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) +: LLInventoryItemsList(p) +{} + +// virtual +LLWearableItemsList::~LLWearableItemsList() +{} + +void LLWearableItemsList::updateList(const LLUUID& category_id) +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + + LLFindOutfitItems collector = LLFindOutfitItems(); + // collectDescendentsIf takes non-const reference: + gInventory.collectDescendentsIf( + category_id, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + collector); + + refreshList(item_array); +} + +// EOF diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h new file mode 100644 index 0000000000..5e3202c687 --- /dev/null +++ b/indra/newview/llwearableitemslist.h @@ -0,0 +1,199 @@ +/** + * @file llwearableitemslist.h + * @brief A flat list of wearable items. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, 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_LLWEARABLEITEMSLIST_H +#define LL_LLWEARABLEITEMSLIST_H + +#include "llpanel.h" + +// newview +#include "llinventoryitemslist.h" +#include "llinventorymodel.h" +#include "llwearabletype.h" + +/** + * @class LLPanelWearableListItem + * + * Extends LLPanelInventoryListItemBase: + * - makes side widgets show on mouse_enter and hide on + * mouse_leave events. + * - provides callback for button clicks + */ +class LLPanelWearableListItem : public LLPanelInventoryListItemBase +{ + LOG_CLASS(LLPanelWearableListItem); +public: + + /** + * Shows buttons when mouse is over + */ + /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + + /** + * Hides buttons when mouse is out + */ + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + +protected: + + LLPanelWearableListItem(LLViewerInventoryItem* item); +}; + + +class LLPanelDeletableWearableListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelDeletableWearableListItem); +public: + + static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelDeletableWearableListItem() {}; + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + +protected: + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + +/** + * @class LLPanelClothingListItem + * + * Provides buttons for editing, moving, deleting a wearable. + */ +class LLPanelClothingListItem : public LLPanelDeletableWearableListItem +{ + LOG_CLASS(LLPanelClothingListItem); +public: + + static LLPanelClothingListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelClothingListItem(); + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowMoveUpButton(bool show) { setShowWidget("btn_move_up", show); } + + inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } + inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + + +protected: + + LLPanelClothingListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + +class LLPanelBodyPartsListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelBodyPartsListItem); +public: + + static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelBodyPartsListItem(); + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + +protected: + LLPanelBodyPartsListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + + +/** + * @class LLPanelDummyClothingListItem + * + * A dummy item panel - displays grayed clothing icon, grayed title '<clothing> not worn' and 'add' button + */ +class LLPanelDummyClothingListItem : public LLPanelWearableListItem +{ +public: + static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); + + /*virtual*/ void updateItem(); + /*virtual*/ BOOL postBuild(); + +protected: + LLPanelDummyClothingListItem(LLWearableType::EType w_type); + + /*virtual*/ void init(); + + static std::string wearableTypeToString(LLWearableType::EType w_type); + +private: + LLWearableType::EType mWearableType; +}; + +/** + * @class LLWearableItemsList + * + * A flat list of wearable inventory items. + * Collects all items that can be a part of an outfit from + * an inventory category specified by UUID and displays them + * as a flat list. + */ +class LLWearableItemsList : public LLInventoryItemsList +{ +public: + struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params> + { + Params(); + }; + + virtual ~LLWearableItemsList(); + + void updateList(const LLUUID& category_id); + +protected: + friend class LLUICtrlFactory; + LLWearableItemsList(const LLWearableItemsList::Params& p); +}; + +#endif //LL_LLWEARABLEITEMSLIST_H diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index b2de31218b..aedaeba42a 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -121,7 +121,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID bool res = wearable->importFile( fp ); if (!res) { - if (wearable->getType() == WT_COUNT) + if (wearable->getType() == LLWearableType::WT_COUNT) { isNewWearable = TRUE; } @@ -228,16 +228,14 @@ LLWearable* LLWearableList::createCopy(const LLWearable* old_wearable, const std return wearable; } -LLWearable* LLWearableList::createNewWearable( EWearableType type ) +LLWearable* LLWearableList::createNewWearable( LLWearableType::EType type ) { lldebugs << "LLWearableList::createNewWearable()" << llendl; LLWearable *wearable = generateNewWearable(); wearable->setType( type ); - LLSD item_name = LLSD().with("[WEARABLE_ITEM]", wearable->getTypeLabel()); - std::string name = LLTrans::getString("NewWearable"); - LLStringUtil::format(name, item_name); + std::string name = LLTrans::getString( LLWearableType::getTypeDefaultNewName(wearable->getType()) ); wearable->setName( name ); LLPermissions perm; diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h index 5e564ba953..16ef11b8bd 100644 --- a/indra/newview/llwearablelist.h +++ b/indra/newview/llwearablelist.h @@ -61,7 +61,7 @@ public: void* userdata); LLWearable* createCopy(const LLWearable* old_wearable, const std::string& new_name = std::string()); - LLWearable* createNewWearable(EWearableType type); + LLWearable* createNewWearable(LLWearableType::EType type); // Callback static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status); diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp new file mode 100644 index 0000000000..c692df06ad --- /dev/null +++ b/indra/newview/llwearabletype.cpp @@ -0,0 +1,138 @@ +/** + * @file llwearabletype.cpp + * @brief LLWearableType class implementation + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-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 "llwearabletype.h" +#include "llinventoryfunctions.h" +#include "lltrans.h" + +struct WearableEntry : public LLDictionaryEntry +{ + WearableEntry(const std::string &name, + const std::string& default_new_name, + LLAssetType::EType assetType, + LLInventoryIcon::EIconName iconName); + const LLAssetType::EType mAssetType; + const std::string mLabel; + const std::string mDefaultNewName; //keep mLabel for backward compatibility + LLInventoryIcon::EIconName mIconName; +}; + +WearableEntry::WearableEntry(const std::string &name, + const std::string& default_new_name, + LLAssetType::EType assetType, + LLInventoryIcon::EIconName iconName) : + LLDictionaryEntry(name), + mAssetType(assetType), + mDefaultNewName(default_new_name), + mLabel(LLTrans::getString(name)), + mIconName(iconName) +{ +} + +class LLWearableDictionary : public LLSingleton<LLWearableDictionary>, + public LLDictionary<LLWearableType::EType, WearableEntry> +{ +public: + LLWearableDictionary(); +}; + +LLWearableDictionary::LLWearableDictionary() +{ + addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SHAPE)); + addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SKIN)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_HAIR)); + addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_EYES)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHIRT)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PANTS)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHOES)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SOCKS)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO)); + addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_COUNT, NULL); +} + +// static +LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableType::EType wearable = dict->lookup(type_name); + return wearable; +} + +// static +const std::string& LLWearableType::getTypeName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mName; +} + +//static +const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mDefaultNewName; +} + +// static +const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mLabel; +} + +// static +LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mAssetType; +} + +// static +LLInventoryIcon::EIconName LLWearableType::getIconName(LLWearableType::EType type) +{ + const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const WearableEntry *entry = dict->lookup(type); + return entry->mIconName; +} + diff --git a/indra/newview/llwearabletype.h b/indra/newview/llwearabletype.h new file mode 100644 index 0000000000..8090fd8df7 --- /dev/null +++ b/indra/newview/llwearabletype.h @@ -0,0 +1,78 @@ +/** + * @file llwearabletype.h + * @brief LLWearableType class header file + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-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_LLWEARABLETYPE_H +#define LL_LLWEARABLETYPE_H + +#include "llassettype.h" +#include "lldictionary.h" +#include "llinventoryicon.h" +#include "llsingleton.h" + +class LLWearableType +{ +public: + enum EType + { + WT_SHAPE = 0, + WT_SKIN = 1, + WT_HAIR = 2, + WT_EYES = 3, + WT_SHIRT = 4, + WT_PANTS = 5, + WT_SHOES = 6, + WT_SOCKS = 7, + WT_JACKET = 8, + WT_GLOVES = 9, + WT_UNDERSHIRT = 10, + WT_UNDERPANTS = 11, + WT_SKIRT = 12, + WT_ALPHA = 13, + WT_TATTOO = 14, + WT_COUNT = 15, + + WT_INVALID = 255, + WT_NONE = -1, + }; + + static const std::string& getTypeName(EType type); + static const std::string& getTypeDefaultNewName(EType type); + static const std::string& getTypeLabel(EType type); + static LLAssetType::EType getAssetType(EType type); + static EType typeNameToType(const std::string& type_name); + static LLInventoryIcon::EIconName getIconName(EType type); + +protected: + LLWearableType() {} + ~LLWearableType() {} +}; + +#endif // LL_LLWEARABLETYPE_H diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 1a64f9d881..aa03b1afd1 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -155,7 +155,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); substitution["CHANNEL"] = LLVersionInfo::getChannel(); - substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["GRID"] = LLGridManager::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); substitution["SESSION_ID"] = gAgent.getSessionID(); substitution["FIRST_LOGIN"] = gAgent.isFirstLogin(); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 0b63f5efbd..58b9f5ce18 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -133,10 +133,11 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { LLMemType mt(LLMemType::MTYPE_REGIONS); - + llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) { + llinfos << "Region exists, removing it " << llendl; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 151180aae7..081a3721b1 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1072,18 +1072,10 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) // zoomed out, so don't display anything about the count. JC if (agent_count > 0) { - // Merov: i18n horror!!! Even using gettext(), concatenating strings is not localizable. - // The singular/plural switch form here under might make no sense in some languages. Don't do that. - message += llformat("\n%d ", agent_count); - - if (agent_count == 1) - { - message += "person"; - } - else - { - message += "people"; - } + LLStringUtil::format_map_t string_args; + string_args["[NUMBER]"] = llformat("%d", agent_count); + message += '\n'; + message += getString((agent_count == 1 ? "world_map_person" : "world_map_people") , string_args); } } tooltip_msg.assign( message ); diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 1cdccd2baa..debd6b611f 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llworldmipmap.h" +#include "llviewercontrol.h" // LLControlGroup #include "llviewertexturelist.h" #include "math.h" // log() @@ -186,8 +187,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level) { // Get the grid coordinates - std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/map-%d-%d-%d-objects.jpg", - level, grid_x, grid_y); + std::string imageurl = gSavedSettings.getString("MapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); + // DO NOT COMMIT!! DEBUG ONLY!!! // Use a local jpeg for every tile to test map speed without S3 access diff --git a/indra/newview/llworldview.cpp b/indra/newview/llworldview.cpp new file mode 100644 index 0000000000..665cc74a87 --- /dev/null +++ b/indra/newview/llworldview.cpp @@ -0,0 +1,61 @@ +/** + * @file llworldview.cpp + * @brief LLWorldView class implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-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 "llworldview.h" + +#include "llviewercontrol.h" +#include "llsidetray.h" +///////////////////////////////////////////////////// +// LLFloaterView + +static LLDefaultChildRegistry::Register<LLWorldView> r("world_view"); + +LLWorldView::LLWorldView(const Params& p) +: LLUICtrl (p) +{ +} + +void LLWorldView::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") ) + { + LLView* main_view = LLUI::getRootView()->findChild<LLView>("main_view"); + if(main_view) + { + width = main_view->getRect().getWidth(); + } + } + + LLUICtrl::reshape(width, height, called_from_parent); +} diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 15417614af..8237132ac5 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -28,6 +28,7 @@ #include "llerror.h" #include "stringize.h" #include "llxmlrpctransaction.h" +#include "llsecapi.h" #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally @@ -356,7 +357,22 @@ public: << data["errorcode"].asString() << " (" << data["error"].asString() << ")" << LL_ENDL; - // In addition to CURLE_OK, LLUserAuth distinguishes different error + + switch (curlcode) + { + case CURLE_SSL_PEER_CERTIFICATE: + case CURLE_SSL_CACERT: + { + LLPointer<LLCertificate> error_cert(mTransaction->getErrorCert()); + if(error_cert) + { + data["certificate"] = error_cert->getPem(); + } + break; + } + default: + break; + } // values of 'curlcode': // CURLE_COULDNT_RESOLVE_HOST, // CURLE_SSL_PEER_CERTIFICATE, diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 5884cdd1c3..da61840761 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -31,6 +31,9 @@ */ #include "llviewerprecompiledheaders.h" +#include <openssl/x509_vfy.h> +#include <openssl/ssl.h> +#include "llsecapi.h" #include "llxmlrpctransaction.h" #include "llxmlrpclistener.h" @@ -176,6 +179,8 @@ public: std::string mResponseText; XMLRPC_REQUEST mResponse; + std::string mCertStore; + LLPointer<LLCertificate> mErrorCert; Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip); Impl(const std::string& uri, @@ -190,7 +195,8 @@ public: private: void init(XMLRPC_REQUEST request, bool useGzip); - + static int _sslCertVerifyCallback(X509_STORE_CTX *ctx, void *param); + static CURLcode _sslCtxFunction(CURL * curl, void *sslctx, void *param); static size_t curlDownloadCallback( char* data, size_t size, size_t nmemb, void* user_data); }; @@ -228,8 +234,74 @@ LLXMLRPCTransaction::Impl::Impl(const std::string& uri, XMLRPC_RequestFree(request, 1); } +// _sslCertVerifyCallback +// callback called when a cert verification is requested. +// calls SECAPI to validate the context +int LLXMLRPCTransaction::Impl::_sslCertVerifyCallback(X509_STORE_CTX *ctx, void *param) +{ + LLXMLRPCTransaction::Impl *transaction = (LLXMLRPCTransaction::Impl *)param; + LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore(transaction->mCertStore); + LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx); + LLSD validation_params = LLSD::emptyMap(); + LLURI uri(transaction->mURI); + validation_params[CERT_HOSTNAME] = uri.hostName(); + try + { + chain->validate(VALIDATION_POLICY_SSL, store, validation_params); + } + catch (LLCertValidationTrustException& cert_exception) + { + // this exception is is handled differently than the general cert + // exceptions, as we allow the user to actually add the certificate + // for trust. + // therefore we pass back a different error code + // NOTE: We're currently 'wired' to pass around CURL error codes. This is + // somewhat clumsy, as we may run into errors that do not map directly to curl + // error codes. Should be refactored with login refactoring, perhaps. + transaction->mCurlCode = CURLE_SSL_CACERT; + // set the status directly. set curl status generates error messages and we want + // to use the fixed ones from the exceptions + transaction->setStatus(StatusCURLError, cert_exception.getMessage(), std::string()); + // We should probably have a more generic way of passing information + // back to the error handlers. + transaction->mErrorCert = cert_exception.getCert(); + return 0; + } + catch (LLCertException& cert_exception) + { + transaction->mCurlCode = CURLE_SSL_PEER_CERTIFICATE; + // set the status directly. set curl status generates error messages and we want + // to use the fixed ones from the exceptions + transaction->setStatus(StatusCURLError, cert_exception.getMessage(), std::string()); + transaction->mErrorCert = cert_exception.getCert(); + return 0; + } + catch (...) + { + // any other odd error, we just handle as a connect error. + transaction->mCurlCode = CURLE_SSL_CONNECT_ERROR; + transaction->setCurlStatus(CURLE_SSL_CONNECT_ERROR); + return 0; + } + return 1; +} +// _sslCtxFunction +// Callback function called when an SSL Context is created via CURL +// used to configure the context for custom cert validate(<, <#const & xs#>, <#T * #>, <#long #>)tion +// based on SECAPI +CURLcode LLXMLRPCTransaction::Impl::_sslCtxFunction(CURL * curl, void *sslctx, void *param) +{ + SSL_CTX * ctx = (SSL_CTX *) sslctx; + // disable any default verification for server certs + SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); + // set the verification callback. + SSL_CTX_set_cert_verify_callback(ctx, _sslCertVerifyCallback, param); + // the calls are void + return CURLE_OK; + +} void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) { @@ -237,6 +309,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) { mCurlRequest = new LLCurlEasyRequest(); } + mErrorCert = NULL; if (gSavedSettings.getBOOL("BrowserProxyEnabled")) { @@ -252,12 +325,13 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this); - BOOL verifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify() ? 2 : 0); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, verifySSLCert); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, verifySSLCert ? 2 : 0); + BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); + mCertStore = gSavedSettings.getString("CertStore"); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, vefifySSLCert); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, vefifySSLCert ? 2 : 0); // Be a little impatient about establishing connections. mCurlRequest->setopt(CURLOPT_CONNECTTIMEOUT, 40L); + mCurlRequest->setSSLCtxCallback(_sslCtxFunction, (void *)this); /* Setting the DNS cache timeout to -1 disables it completely. This might help with bug #503 */ @@ -343,11 +417,19 @@ bool LLXMLRPCTransaction::Impl::process() { if (result != CURLE_OK) { - setCurlStatus(result); - llwarns << "LLXMLRPCTransaction CURL error " - << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl; - llwarns << "LLXMLRPCTransaction request URI: " - << mURI << llendl; + if ((result != CURLE_SSL_PEER_CERTIFICATE) && + (result != CURLE_SSL_CACERT)) + { + // if we have a curl error that's not already been handled + // (a non cert error), then generate the error message as + // appropriate + setCurlStatus(result); + + llwarns << "LLXMLRPCTransaction CURL error " + << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl; + llwarns << "LLXMLRPCTransaction request URI: " + << mURI << llendl; + } return true; } @@ -425,7 +507,6 @@ void LLXMLRPCTransaction::Impl::setStatus(EStatus status, case StatusComplete: mStatusMessage = "(done)"; break; - default: // Usually this means that there's a problem with the login server, // not with the client. Direct user to status page. @@ -541,6 +622,11 @@ std::string LLXMLRPCTransaction::statusMessage() return impl.mStatusMessage; } +LLPointer<LLCertificate> LLXMLRPCTransaction::getErrorCert() +{ + return impl.mErrorCert; +} + std::string LLXMLRPCTransaction::statusURI() { return impl.mStatusURI; diff --git a/indra/newview/llxmlrpctransaction.h b/indra/newview/llxmlrpctransaction.h index c835423d67..8beb2e2623 100644 --- a/indra/newview/llxmlrpctransaction.h +++ b/indra/newview/llxmlrpctransaction.h @@ -38,6 +38,7 @@ typedef struct _xmlrpc_request* XMLRPC_REQUEST; typedef struct _xmlrpc_value* XMLRPC_VALUE; // foward decl of types from xmlrpc.h (this usage is type safe) +class LLCertificate; class LLXMLRPCValue // a c++ wrapper around XMLRPC_VALUE @@ -115,6 +116,8 @@ public: EStatus status(int* curlCode); // return status, and extended CURL code, if code isn't null + + LLPointer<LLCertificate> getErrorCert(); std::string statusMessage(); // return a message string, suitable for showing the user std::string statusURI(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 36daca174b..cc65b34a61 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -284,6 +284,7 @@ BOOL LLPipeline::sRenderFrameTest = FALSE; BOOL LLPipeline::sRenderAttachedLights = TRUE; BOOL LLPipeline::sRenderAttachedParticles = TRUE; BOOL LLPipeline::sRenderDeferred = FALSE; +BOOL LLPipeline::sAllowRebuildPriorityGroup = FALSE ; S32 LLPipeline::sVisibleLightCount = 0; F32 LLPipeline::sMinRenderSize = 0.f; @@ -1780,6 +1781,12 @@ void LLPipeline::updateGL() void LLPipeline::rebuildPriorityGroups() { + if(!sAllowRebuildPriorityGroup) + { + return ; + } + sAllowRebuildPriorityGroup = FALSE ; + LLTimer update_timer; LLMemType mt(LLMemType::MTYPE_PIPELINE); @@ -1799,7 +1806,6 @@ void LLPipeline::rebuildPriorityGroups() void LLPipeline::rebuildGroups() { - llpushcallstacks ; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); S32 min_count = llclamp((S32) ((F32) (size * size)/4096*0.25f), 1, size); @@ -2201,7 +2207,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) //LLVertexBuffer::unbind(); grabReferences(result); - + llpushcallstacks ; for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter) { LLSpatialGroup* group = *iter; @@ -2219,7 +2225,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } } - + llpushcallstacks ; for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) { LLSpatialGroup* group = *iter; @@ -2235,7 +2241,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } - + llpushcallstacks ; if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { for (LLCullResult::bridge_list_t::iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) @@ -2249,7 +2255,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } } - + llpushcallstacks ; { LLFastTimer ftm(FTM_STATESORT_DRAWABLE); for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList(); @@ -2269,6 +2275,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } postSort(camera); + llpushcallstacks ; } void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) @@ -2963,7 +2970,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - llpushcallstacks ; LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM); LLFastTimer t(FTM_RENDER_GEOMETRY); @@ -7102,8 +7108,7 @@ inline float sgn(float a) } void LLPipeline::generateWaterReflection(LLCamera& camera_in) -{ - llpushcallstacks ; +{ if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { BOOL skip_avatar_update = FALSE; @@ -7112,6 +7117,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) skip_avatar_update = TRUE; } + llpushcallstacks ; if (!skip_avatar_update) { gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON); @@ -7199,7 +7205,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) glCullFace(GL_FRONT); - static LLCullResult ref_result; U32 ref_mask = 0; if (LLDrawPoolWater::sNeedsDistortionUpdate) @@ -7211,6 +7216,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) (1 << LLPipeline::RENDER_TYPE_WL_SKY)); static LLCullResult result; updateCull(camera, result); + llpushcallstacks ; stateSort(camera, result); mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) | (1 << LLPipeline::RENDER_TYPE_CLOUDS) | @@ -7245,13 +7251,13 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLUserClipPlane clip_plane(plane, mat, projection); LLGLDisable cull(GL_CULL_FACE); updateCull(camera, ref_result, 1); + llpushcallstacks ; stateSort(camera, ref_result); } ref_mask = mRenderTypeMask; mRenderTypeMask = mask; } - if (LLDrawPoolWater::sNeedsDistortionUpdate) { mRenderTypeMask = ref_mask; @@ -7269,7 +7275,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } camera.setOrigin(camera_in.getOrigin()); - //render distortion map static BOOL last_update = TRUE; if (last_update) @@ -7303,6 +7308,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLUserClipPlane clip_plane(LLPlane(-pnorm, -(pd+pad)), mat, projection); static LLCullResult result; updateCull(camera, result, water_clip); + llpushcallstacks ; stateSort(camera, result); gGL.setColorMask(true, true); @@ -7326,7 +7332,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) glClear(GL_DEPTH_BUFFER_BIT); } glClearColor(0.f, 0.f, 0.f, 0.f); - gViewerWindow->setup3DViewport(); mRenderTypeMask = type_mask; LLDrawPoolWater::sNeedsReflectionUpdate = FALSE; @@ -7342,6 +7347,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); } + llpushcallstacks ; } } @@ -7839,7 +7845,6 @@ void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade) void LLPipeline::generateHighlight(LLCamera& camera) { //render highlighted object as white into offscreen render target - llpushcallstacks ; if (mHighlightObject.notNull()) { mHighlightSet.insert(HighlightItem(mHighlightObject)); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 60e0b0ae8c..89649a0682 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -462,6 +462,7 @@ public: static BOOL sRenderAttachedLights; static BOOL sRenderAttachedParticles; static BOOL sRenderDeferred; + static BOOL sAllowRebuildPriorityGroup; static S32 sVisibleLightCount; static F32 sMinRenderSize; diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index 12a09392f6..731953f9bb 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -129,8 +129,8 @@ TOOLSIT CURSOR "toolsit.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,0,203110 - PRODUCTVERSION 2,0,0,203110 + FILEVERSION 2,0,2,0 + PRODUCTVERSION 2,0,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -147,12 +147,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "2.0.0.203110" + VALUE "FileVersion", "2.0.2.0" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2008, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "2.0.0.203110" + VALUE "ProductVersion", "2.0.2.0" END END BLOCK "VarFileInfo" diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 99603530d8..0540a03e25 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -424,6 +424,9 @@ name="InventoryItemLibraryColor" reference="EmphasisColor" /> <color + name="InventoryItemLinkColor" + reference="LtGray_50" /> + <color name="InventorySearchStatusColor" reference="EmphasisColor" /> <color diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png Binary files differnew file mode 100644 index 0000000000..ded370a46f --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png Binary files differnew file mode 100644 index 0000000000..98bf415f84 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png Binary files differnew file mode 100644 index 0000000000..2d8d55fa91 --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_Off.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png Binary files differnew file mode 100644 index 0000000000..a91517d31f --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png diff --git a/indra/newview/skins/default/textures/icons/Female.png b/indra/newview/skins/default/textures/icons/Female.png Binary files differnew file mode 100644 index 0000000000..67b5653a94 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Female.png diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png Binary files differnew file mode 100644 index 0000000000..c067646c65 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png diff --git a/indra/newview/skins/default/textures/icons/Male.png b/indra/newview/skins/default/textures/icons/Male.png Binary files differnew file mode 100644 index 0000000000..f3fad77fd0 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Male.png diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png Binary files differnew file mode 100644 index 0000000000..5d6efbfa2a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_1.png diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png Binary files differnew file mode 100644 index 0000000000..28203324f1 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_10.png diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png Binary files differnew file mode 100644 index 0000000000..6b87be0c3f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_11.png diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png Binary files differnew file mode 100644 index 0000000000..089d58b090 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_12.png diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png Binary files differnew file mode 100644 index 0000000000..94cb73b1f7 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_2.png diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png Binary files differnew file mode 100644 index 0000000000..a04a5b5263 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_3.png diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png Binary files differnew file mode 100644 index 0000000000..a467098d82 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_4.png diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png Binary files differnew file mode 100644 index 0000000000..ea64f1d907 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_5.png diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png Binary files differnew file mode 100644 index 0000000000..fe4447935f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_6.png diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png Binary files differnew file mode 100644 index 0000000000..64fa294771 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_7.png diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png Binary files differnew file mode 100644 index 0000000000..a1c9a7f2eb --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_8.png diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png Binary files differnew file mode 100644 index 0000000000..f3e9723184 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Progress_9.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 84a99ba92a..f4206dc2e5 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -135,6 +135,7 @@ with the same filename but different name <texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" /> <texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" /> + <texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" /> <texture name="icon_group.tga" file_name="icons/Generic_Group.png" preload="false" /> <texture name="Generic_Object_Small" file_name="icons/Generic_Object_Small.png" preload="false" /> <texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" /> @@ -214,6 +215,40 @@ with the same filename but different name <texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" /> <texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" /> + <texture name="Inv_Alpha_Link" file_name="icons/Inv_Alpha_Link.png" preload="false" /> + <texture name="Inv_Animation_Link" file_name="icons/Inv_Animation_Link.png" preload="false" /> + <texture name="Inv_BodyShape_Link" file_name="icons/Inv_BodyShape_Link.png" preload="false" /> + <texture name="Inv_CallingCard_Link" file_name="icons/Inv_CallingCard_Link.png" preload="false" /> + <texture name="Inv_Clothing_Link" file_name="icons/Inv_Clothing_Link.png" preload="false" /> + <texture name="Inv_Eye_Link" file_name="icons/Inv_Eye_Link.png" preload="false" /> + <texture name="Inv_FolderClosed_Link" file_name="icons/Inv_FolderClosed_Link.png" preload="false" /> + <texture name="Inv_FolderOpen_Link" file_name="icons/Inv_FolderOpen_Link.png" preload="false" /> + <texture name="Inv_Gesture_Link" file_name="icons/Inv_Gesture_Link.png" preload="false" /> + <texture name="Inv_Gloves_Link" file_name="icons/Inv_Gloves_Link.png" preload="false" /> + <texture name="Inv_Hair_Link" file_name="icons/Inv_Hair_Link.png" preload="false" /> + <texture name="Inv_LinkItem_Link" file_name="icons/Inv_LinkItem_Link.png" preload="false" /> + <texture name="Inv_LinkFolder_Link" file_name="icons/Inv_LinkFolder_Link.png" preload="false" /> + <texture name="Inv_Jacket_Link" file_name="icons/Inv_Jacket_Link.png" preload="false" /> + <texture name="Inv_LookFolderOpen_Link" file_name="icons/Inv_LookFolderOpen_Link.png" preload="false" /> + <texture name="Inv_LookFolderClosed_Link" file_name="icons/Inv_LookFolderClosed_Link.png" preload="false" /> + <texture name="Inv_Landmark_Link" file_name="icons/Inv_Landmark_Link.png" preload="false" /> + <texture name="Inv_Notecard_Link" file_name="icons/Inv_Notecard_Link.png" preload="false" /> + <texture name="Inv_Object_Link" file_name="icons/Inv_Object_Link.png" preload="false" /> + <texture name="Inv_Object_Multi_Link" file_name="icons/Inv_Object_Multi_Link.png" preload="false" /> + <texture name="Inv_Pants_Link" file_name="icons/Inv_Pants_Link.png" preload="false" /> + <texture name="Inv_Script_Link" file_name="icons/Inv_Script_Link.png" preload="false" /> + <texture name="Inv_Shirt_Link" file_name="icons/Inv_Shirt_Link.png" preload="false" /> + <texture name="Inv_Shoe_Link" file_name="icons/Inv_Shoe_Link.png" preload="false" /> + <texture name="Inv_Skin_Link" file_name="icons/Inv_Skin_Link.png" preload="false" /> + <texture name="Inv_Skirt_Link" file_name="icons/Inv_Skirt_Link.png" preload="false" /> + <texture name="Inv_Snapshot_Link" file_name="icons/Inv_Snapshot_Link.png" preload="false" /> + <texture name="Inv_Socks_Link" file_name="icons/Inv_Socks_Link.png" preload="false" /> + <texture name="Inv_Sound_Link" file_name="icons/Inv_Sound_Link.png" preload="false" /> + <texture name="Inv_Tattoo_Link" file_name="icons/Inv_Tattoo_Link.png" preload="false" /> + <texture name="Inv_Texture_Link" file_name="icons/Inv_Texture_Link.png" preload="false" /> + <texture name="Inv_Underpants_Link" file_name="icons/Inv_Underpants_Link.png" preload="false" /> + <texture name="Inv_Undershirt_Link" file_name="icons/Inv_Undershirt_Link.png" preload="false" /> + <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/> <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/> @@ -241,6 +276,10 @@ with the same filename but different name <texture name="Movement_Down_On" file_name="bottomtray/Movement_Down_On.png" preload="false" /> <texture name="Movement_Forward_Off" file_name="bottomtray/Movement_Forward_Off.png" preload="false" /> <texture name="Movement_Forward_On" file_name="bottomtray/Movement_Forward_On.png" preload="false" /> + <texture name="Movement_Left_Off" file_name="bottomtray/Movement_Left_Off.png" preload="false" /> + <texture name="Movement_Left_On" file_name="bottomtray/Movement_Left_On.png" preload="false" /> + <texture name="Movement_Right_Off" file_name="bottomtray/Movement_Right_Off.png" preload="false" /> + <texture name="Movement_Right_On" file_name="bottomtray/Movement_Right_On.png" preload="false" /> <texture name="Movement_TurnLeft_Off" file_name="bottomtray/Movement_TurnLeft_Off.png" preload="false" /> <texture name="Movement_TurnLeft_On" file_name="bottomtray/Movement_TurnLeft_On.png" preload="false" /> <texture name="Movement_TurnRight_Off" file_name="bottomtray/Movement_TurnRight_Off.png" preload="false" /> @@ -580,4 +619,17 @@ with the same filename but different name <texture name="default_profile_picture.j2c" /> <texture name="locked_image.j2c" /> + <texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" /> + <texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" /> + <texture name="Progress_3" file_name="icons/Progress_3.png" preload="true" /> + <texture name="Progress_4" file_name="icons/Progress_4.png" preload="true" /> + <texture name="Progress_5" file_name="icons/Progress_5.png" preload="true" /> + <texture name="Progress_6" file_name="icons/Progress_6.png" preload="true" /> + <texture name="Progress_7" file_name="icons/Progress_7.png" preload="true" /> + <texture name="Progress_8" file_name="icons/Progress_8.png" preload="true" /> + <texture name="Progress_9" file_name="icons/Progress_9.png" preload="true" /> + <texture name="Progress_10" file_name="icons/Progress_10.png" preload="true" /> + <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> + <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> + </textures> diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 91db3c6b1c..435c7f4907 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -43,9 +43,14 @@ Vivox Version: [VIVOX_VERSION] </panel> <panel label="Tak til" name="credits_panel"> <text_editor name="credits_editor"> - Second Life er gjort muligt for dig af Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les og mange flere. + Second Life er lavet til dig af Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain, and many others. -Tak til følgende beboere for at sikre at denne klient er den bedste version indtil nu: (under udarbejdelse) +Tak til følgende beboere: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan, and many others. + + + + +"The work goes on, the cause endures, the hope still lives, and the dreams shall never die" - Edward Kennedy </text_editor> </panel> <panel label="Licenser" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/da/floater_animation_preview.xml b/indra/newview/skins/default/xui/da/floater_animation_preview.xml index fdbfd737ba..adf96841c0 100644 --- a/indra/newview/skins/default/xui/da/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_animation_preview.xml @@ -141,35 +141,35 @@ Maksimal animations længde er [MAX_LENGTH] sekunder. Ansigtsudtryk </text> <combo_box label="" name="emote_combo" tool_tip="Angiver hvad ansigtet gør under animationen" width="140"> - <combo_box.item label="(Intet)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Bange" name="Afraid"/> - <combo_box.item label="Vred" name="Angry"/> - <combo_box.item label="Stort smil" name="BigSmile"/> - <combo_box.item label="Keder sig" name="Bored"/> - <combo_box.item label="Græder" name="Cry"/> - <combo_box.item label="Forarget" name="Disdain"/> - <combo_box.item label="Flov" name="Embarrassed"/> - <combo_box.item label="Skuler" name="Frown"/> - <combo_box.item label="Kysser" name="Kiss"/> - <combo_box.item label="Griner" name="Laugh"/> - <combo_box.item label="Plllppt" name="Plllppt"/> - <combo_box.item label="Frastødt" name="Repulsed"/> - <combo_box.item label="Ked af det" name="Sad"/> - <combo_box.item label="Skuldertræk" name="Shrug"/> - <combo_box.item label="Smil" name="Smile"/> - <combo_box.item label="Overrasket" name="Surprise"/> - <combo_box.item label="Blinker" name="Wink"/> - <combo_box.item label="Bekymret" name="Worry"/> + <item label="(Intet)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Bange" name="Afraid" value="Bange"/> + <item label="Vred" name="Angry" value="Vred"/> + <item label="Stort smil" name="BigSmile" value="Stort smil"/> + <item label="Keder sig" name="Bored" value="Keder sig"/> + <item label="Græder" name="Cry" value="Grædende"/> + <item label="Forarget" name="Disdain" value="Foragt"/> + <item label="Flov" name="Embarrassed" value="Embarrassed"/> + <item label="Skuler" name="Frown" value="Alvorlig"/> + <item label="Kysser" name="Kiss" value="Kys"/> + <item label="Griner" name="Laugh" value="Leende"/> + <item label="Plllppt" name="Plllppt" value="Plllppt"/> + <item label="Frastødt" name="Repulsed" value="Frastødt"/> + <item label="Ked af det" name="Sad" value="Ked af det"/> + <item label="Skuldertræk" name="Shrug" value="Skuldertræk"/> + <item label="Smil" name="Smile" value="Smilende"/> + <item label="Overrasket" name="Surprise" value="Overrasket"/> + <item label="Blinker" name="Wink" value="Blink"/> + <item label="Bekymret" name="Worry" value="Bekymret"/> </combo_box> <text name="preview_label"> Vis mens </text> <combo_box label="" name="preview_base_anim" tool_tip="Se hvordan animation ser ud i forskellige typiske avatar-situationer." width="140"> - <combo_box.item label="StÃ¥ende" name="Standing"/> - <combo_box.item label="GÃ¥ende" name="Walking"/> - <combo_box.item label="Sidder" name="Sitting"/> - <combo_box.item label="Flyver" name="Flying"/> + <item label="StÃ¥ende" name="Standing" value="StÃ¥ende"/> + <item label="GÃ¥ende" name="Walking" value="GÃ¥ende"/> + <item label="Sidder" name="Sitting" value="Siddende"/> + <item label="Flyver" name="Flying" value="Flyvende"/> </combo_box> <spinner label="start (sec)" name="ease_in_time" tool_tip="Tid (i sekunder) animationen bruger pÃ¥ at komme i gang."/> <spinner label="Afslut (sec)" name="ease_out_time" tool_tip="Tid (i sekunder) animationen bruger pÃ¥ at afslutte"/> diff --git a/indra/newview/skins/default/xui/da/floater_customize.xml b/indra/newview/skins/default/xui/da/floater_customize.xml index b8b4b03277..a47e0d33df 100644 --- a/indra/newview/skins/default/xui/da/floater_customize.xml +++ b/indra/newview/skins/default/xui/da/floater_customize.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="UDSEENDE" width="509"> - <tab_container name="customize tab container" width="507"> +<floater name="floater customize" title="UDSEENDE"> + <tab_container name="customize tab container"> <text label="Krops Dele" name="body_parts_placeholder"> Kropsdele </text> @@ -522,7 +522,7 @@ <button label="Vend tilbage" label_selected="Vend tilbage" name="Revert"/> </panel> </tab_container> - <scroll_container left="212" name="panel_container"/> + <scroll_container name="panel_container"/> <button label="Script info" label_selected="Script info" name="script_info" tool_tip="Vis scripts vedhæftet pÃ¥ din avatar"/> <button label="Lav sæt" label_selected="Lav sæt" name="make_outfit_btn"/> <button label="Annullér" label_selected="Annullér" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml index 94cf4546e3..ffae3d788f 100644 --- a/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/da/floater_day_cycle_options.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Day Cycle Floater" title="DAG CYKLUS OPSÆTNING"> <tab_container name="Day Cycle Tabs"> <panel label="Dag cyklus" name="Day Cycle"> - <button label="?" name="WLDayCycleHelp" /> - <multi_slider label="" name="WLTimeSlider" /> - <multi_slider label="" name="WLDayCycleKeys" /> + <button label="?" name="WLDayCycleHelp"/> + <multi_slider label="" name="WLTimeSlider"/> + <multi_slider label="" name="WLDayCycleKeys"/> <text name="WL12am"> 00:00 </text> @@ -59,39 +59,38 @@ <text name="WL12amHash2"> | </text> - <button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey" /> - <button label="Slet key" label_selected="Slet key" name="WLDeleteKey" /> + <button label="Tilføj key" label_selected="Tilføj key" name="WLAddKey"/> + <button label="Slet key" label_selected="Slet key" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> Key-frame indstillinger: </text> <text name="WLCurKeyTimeText"> Key tid: </text> - <spinner label="Timer" name="WLCurKeyHour" /> - <spinner label="Min." name="WLCurKeyMin" /> + <spinner label="Timer" name="WLCurKeyHour"/> + <spinner label="Min." name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> Key fast indstilling: </text> - <combo_box label="Faste" name="WLKeyPresets" /> + <combo_box label="Faste" name="WLKeyPresets"/> <text name="DayCycleText"> Snap: </text> - <combo_box label="5 min" name="WLSnapOptions" /> + <combo_box label="5 min" name="WLSnapOptions"/> <text name="DayCycleText2"> Cycluslængde: </text> - <spinner label="Timer" name="WLLengthOfDayHour" /> - <spinner label="Min." name="WLLengthOfDayMin" /> - <spinner label="Sek." name="WLLengthOfDaySec" /> + <spinner label="Timer" name="WLLengthOfDayHour"/> + <spinner label="Min." name="WLLengthOfDayMin"/> + <spinner label="Sek." name="WLLengthOfDaySec"/> <text name="DayCycleText3"> - Vis: - </text> - <button label="Afspil" label_selected="Afspil" name="WLAnimSky" /> - <button label="Stop!" label_selected="Stop" name="WLStopAnimSky" /> - <button label="Benyt estate tid" label_selected="GÃ¥ til estate tid" - name="WLUseLindenTime" /> - <button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle" /> - <button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle" /> + Vis : + </text> + <button label="Afspil" label_selected="Afspil" name="WLAnimSky"/> + <button label="Stop!" label_selected="Stop" name="WLStopAnimSky"/> + <button label="Benyt estate tid" label_selected="GÃ¥ til estate tid" name="WLUseLindenTime"/> + <button label="Gem test-dag" label_selected="Gem test-dag" name="WLSaveDayCycle"/> + <button label="Hent test-dag" label_selected="Hent test-dag" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_god_tools.xml b/indra/newview/skins/default/xui/da/floater_god_tools.xml index 6b7f9ef209..5d3453e327 100644 --- a/indra/newview/skins/default/xui/da/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_god_tools.xml @@ -1,11 +1,17 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="godtools floater" title="GOD TOOLS"> <tab_container name="GodTools Tabs"> - <panel label="Grid" name="grid"> - <button label="Spark alle beboere" label_selected="Spark alle beboere" name="Kick all users"/> - </panel> + <panel label="Grid" name="grid"/> <panel label="Region" name="region"> + <text name="Region Name:"> + Region Name: + </text> <check_box label="Reset Home On Teleport" name="check reset home" tool_tip="NÃ¥r beboere teleporterer væk, sÃ¥ sæt deres hjemmeadresse til deres destinations position."/> </panel> + <panel label="Objects" name="objects"> + <text name="Region Name:"> + Region navn: + </text> + </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_image_preview.xml b/indra/newview/skins/default/xui/da/floater_image_preview.xml index 52fd9f80c0..5355127ef5 100644 --- a/indra/newview/skins/default/xui/da/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/da/floater_image_preview.xml @@ -10,16 +10,16 @@ Se billede som: </text> <combo_box label="Tøj type" name="clothing_type_combo"> - <combo_box.item label="Billede" name="Image"/> - <combo_box.item label="HÃ¥r" name="Hair"/> - <combo_box.item label="Kvinde - hoved" name="FemaleHead"/> - <combo_box.item label="Kvinde - overkrop" name="FemaleUpperBody"/> - <combo_box.item label="Kvinde - underkrop" name="FemaleLowerBody"/> - <combo_box.item label="Mand - hoved" name="MaleHead"/> - <combo_box.item label="Mand - overkrop" name="MaleUpperBody"/> - <combo_box.item label="Mand - underkrop" name="MaleLowerBody"/> - <combo_box.item label="Nederdel" name="Skirt"/> - <combo_box.item label="Sculpted Prim" name="SculptedPrim"/> + <item label="Billede" name="Image" value="Billede"/> + <item label="HÃ¥r" name="Hair" value="HÃ¥r"/> + <item label="Kvinde - hoved" name="FemaleHead" value="Hoved - kvinde"/> + <item label="Kvinde - overkrop" name="FemaleUpperBody" value="Overkrop - kvinde"/> + <item label="Kvinde - underkrop" name="FemaleLowerBody" value="Underkrop - kvinde"/> + <item label="Mand - hoved" name="MaleHead" value="Hoved - mand"/> + <item label="Mand - overkrop" name="MaleUpperBody" value="Overkrop - mand"/> + <item label="Mand - underkrop" name="MaleLowerBody" value="Underkrop - mand"/> + <item label="Nederdel" name="Skirt" value="Nederdel"/> + <item label="Sculpted Prim" name="SculptedPrim" value="Sculpted prim"/> </combo_box> <text name="bad_image_text"> Kunne ikke læse billede. diff --git a/indra/newview/skins/default/xui/da/floater_outgoing_call.xml b/indra/newview/skins/default/xui/da/floater_outgoing_call.xml index ef4e22dd8f..a5545668a2 100644 --- a/indra/newview/skins/default/xui/da/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/da/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Du er blevet koblet af fra [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] har afsluttet opkaldet. [RECONNECT_NEARBY] + Dit kald er afsluttet. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Du har afsluttet opkaldet. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/da/floater_snapshot.xml b/indra/newview/skins/default/xui/da/floater_snapshot.xml index 6140055d74..7f7fb8ddf0 100644 --- a/indra/newview/skins/default/xui/da/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/da/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="FOTO FORHÃ…NDSVINSNING"> - <text name="type_label"> - Hvor skal foto hen? - </text> - <radio_group label="Snapshot type" name="snapshot_type_radio"> - <radio_item label="Email" name="postcard"/> - <radio_item label="Min beholdning (L$[AMOUNT])" name="texture"/> - <radio_item label="Gem pÃ¥ min computer" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Tag nyt foto" name="new_snapshot_btn"/> - <button label="Send" name="send_btn"/> - <button label="Gem (L$[AMOUNT])" name="upload_btn"/> - <flyout_button label="Gem" name="save_btn" tool_tip="Gem billede i pÃ¥ din computer"> - <flyout_button_item label="Gem" name="save_item"/> - <flyout_button_item label="Gem som..." name="saveas_item"/> - </flyout_button> - <button label="Annullér" name="discard_btn"/> - <button label="Mere" name="more_btn" tool_tip="Avancerede muligheder"/> - <button label="Mindre" name="less_btn" tool_tip="Avancerede muligheder"/> - <text name="type_label2"> - Størrelse - </text> - <text name="format_label"> - Format - </text> - <combo_box label="Opløsning" name="postcard_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Manuel" name="Custom"/> - </combo_box> - <combo_box label="Opløsning" name="texture_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="Lille (128x128)" name="Small(128x128)"/> - <combo_box.item label="Medium (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Stor (512x512)" name="Large(512x512)"/> - <combo_box.item label="Manuel" name="Custom"/> - </combo_box> - <combo_box label="Opløsning" name="local_size_combo"> - <combo_box.item label="Aktuelle vindue" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Manuelt" name="Custom"/> - </combo_box> - <combo_box label="Fil-format" name="local_format_combo" width="76"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Bredde" label_width="41" name="snapshot_width" width="101"/> - <spinner label="Højde" label_width="32" left="117" name="snapshot_height" width="92"/> - <check_box label="Fasthold proportioner" name="keep_aspect_check"/> - <slider label="Billedkvalitet" name="image_quality_slider"/> - <text name="layer_type_label"> - Benyt: - </text> - <combo_box label="Billedlag" name="layer_types"> - <combo_box.item label="Farver" name="Colors"/> - <combo_box.item label="Dybde" name="Depth"/> - <combo_box.item label="Materinger" name="ObjectMattes"/> - </combo_box> - <check_box label="Snitflade" name="ui_check"/> - <check_box label="HUDs" name="hud_check"/> - <check_box label="Luk ikke vindue ved gemning" name="keep_open_check"/> - <check_box label="Fastfrys (fuldt billede)" name="freeze_frame_check"/> - <check_box label="Auto-opdater" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Foto"> + <floater.string name="unknown"> ukendt - </string> + </floater.string> + <button label="Tag nyt foto" name="new_snapshot_btn"/> + <line_editor label="Beskrivelse" name="description"/> + <button label="Del foto" name="share"/> + <button label="Del pÃ¥ internettet" name="share_to_web"/> + <button label="Gem til beholdning" name="save_to_inventory"/> + <button label="Gem foto" name="save"/> + <button label="Email foto" name="share_to_email"/> + <button label="Gem pÃ¥ computer" name="save_to_computer"/> + <button label="Sæt som profil billede" name="set_profile_pic"/> + <button label="Tilbage" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_tos.xml b/indra/newview/skins/default/xui/da/floater_tos.xml index c87fe8162f..760f60c996 100644 --- a/indra/newview/skins/default/xui/da/floater_tos.xml +++ b/indra/newview/skins/default/xui/da/floater_tos.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=""> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Fortsæt" label_selected="Fortsæt" name="Continue"/> <button label="Annullér" label_selected="Annullér" name="Cancel"/> <check_box label="Jeg er enig med "Terms of Service and Privacy Policy"" name="agree_chk"/> <text name="tos_heading"> Læs venligst følgende "Terms of Service and Privacy Policy" grundigt. For at fortsætte med at logge pÃ¥ [SECOND_LIFE], skal du acceptere aftale. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <string name="real_url"> - http://secondlife.com/app/tos/ - </string> </floater> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_other.xml b/indra/newview/skins/default/xui/da/menu_attachment_other.xml index 2cc23e27c7..ca7b184942 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Rapportér" name="abuse"/> <menu_item_call label="Frys" name="Freeze..."/> <menu_item_call label="Smid ud" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Betal" name="Pay..."/> <menu_item_call label="Objekt profil" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_self.xml b/indra/newview/skins/default/xui/da/menu_attachment_self.xml index 306ae96d49..d8bd78fa23 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_other.xml b/indra/newview/skins/default/xui/da/menu_avatar_other.xml index 66d357e7e2..a778dedf0b 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Rapportér" name="abuse"/> <menu_item_call label="Frys" name="Freeze..."/> <menu_item_call label="Smid ud" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug Teksturer" name="Debug..."/> <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Betal" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_self.xml b/indra/newview/skins/default/xui/da/menu_avatar_self.xml index 6a6831c2e3..39f3e49702 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_edit.xml b/indra/newview/skins/default/xui/da/menu_edit.xml new file mode 100644 index 0000000000..3752f42b1c --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Redigér" name="Edit"> + <menu_item_call label="Fortryd" name="Undo"/> + <menu_item_call label="Gendan" name="Redo"/> + <menu_item_call label="Klip" name="Cut"/> + <menu_item_call label="Kopiér" name="Copy"/> + <menu_item_call label="Sæt ind" name="Paste"/> + <menu_item_call label="Slet" name="Delete"/> + <menu_item_call label="Duplikér" name="Duplicate"/> + <menu_item_call label="Marker alt" name="Select All"/> + <menu_item_call label="Fjern markering" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml index 7434f2c3a2..89111d49f1 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Rapportér" name="report"/> <menu_item_call label="Frys" name="freeze"/> <menu_item_call label="Smid ud" name="eject"/> - <menu_item_call label="Debug" name="debug"/> + <menu_item_call label="Debug teksturer" name="debug"/> <menu_item_call label="Find pÃ¥ kort" name="find_on_map"/> <menu_item_call label="Zoom ind" name="zoom_in"/> <menu_item_call label="Betal" name="pay"/> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml index cfe455e21d..aeef2ccb23 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Profil" name="my_profile"/> <menu_item_call label="Venner" name="my_friends"/> <menu_item_call label="Grupper" name="my_groups"/> + <menu_item_call label="Debug teksturer" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..c3b03232bf --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Luk" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index cdfcad9b1c..0ea21dc409 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Del" name="Share"/> <menu_item_call label="Køb" name="Task Buy"/> <menu_item_call label="Ã¥ben" name="Task Open"/> <menu_item_call label="Afspil" name="Task Play"/> diff --git a/indra/newview/skins/default/xui/da/menu_login.xml b/indra/newview/skins/default/xui/da/menu_login.xml index 7fc7d43c20..36e82e8bc4 100644 --- a/indra/newview/skins/default/xui/da/menu_login.xml +++ b/indra/newview/skins/default/xui/da/menu_login.xml @@ -6,19 +6,10 @@ </menu> <menu label="Hjælp" name="Help"> <menu_item_call label="[SECOND_LIFE] hjælp" name="Second Life Help"/> + <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Vis debug menu" name="Show Debug Menu"/> <menu label="Debug" name="Debug"> - <menu label="Redigér" name="Edit"> - <menu_item_call label="Fortryd" name="Undo"/> - <menu_item_call label="Gendan" name="Redo"/> - <menu_item_call label="Klip" name="Cut"/> - <menu_item_call label="Kopiér" name="Copy"/> - <menu_item_call label="Sæt ind" name="Paste"/> - <menu_item_call label="Slet" name="Delete"/> - <menu_item_call label="Duplikér" name="Duplicate"/> - <menu_item_call label="Vælg alle" name="Select All"/> - <menu_item_call label="Vælg intet" name="Deselect"/> - </menu> <menu_item_call label="Vis debug opsætning" name="Debug Settings"/> <menu_item_call label="UI/farve opsætning" name="UI/Color Settings"/> <menu label="UI tests" name="UI Tests"/> @@ -26,5 +17,7 @@ <menu_item_call label="Vis betingelser" name="TOS"/> <menu_item_call label="Vis vigtig besked" name="Critical"/> <menu_item_call label="Test i web browser" name="Web Browser Test"/> + <menu_item_check label="Vis gitter vælger" name="Show Grid Picker"/> + <menu_item_call label="Vis notifikationskonsol" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/da/menu_participant_list.xml b/indra/newview/skins/default/xui/da/menu_participant_list.xml index c2595dcb3d..02b7e8466b 100644 --- a/indra/newview/skins/default/xui/da/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/da/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Opkald" name="Call"/> <menu_item_call label="Del" name="Share"/> <menu_item_call label="Betal" name="Pay"/> + <menu_item_check label="Se person ikoner" name="View Icons"/> <menu_item_check label="Blokér stemme" name="Block/Unblock"/> <menu_item_check label="Blokér tekst" name="MuteText"/> <context_menu label="Moderator muligheder >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/da/menu_save_outfit.xml b/indra/newview/skins/default/xui/da/menu_save_outfit.xml new file mode 100644 index 0000000000..3d89715ea8 --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Gem" name="save_outfit"/> + <menu_item_call label="Gem som ny" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/da/menu_script_chiclet.xml b/indra/newview/skins/default/xui/da/menu_script_chiclet.xml new file mode 100644 index 0000000000..cdd3212373 --- /dev/null +++ b/indra/newview/skins/default/xui/da/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Luk" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index 7e7d1b190a..e195ebfeed 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -29,6 +29,7 @@ <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Opret landemærke for dette sted" name="Create Landmark Here"/> <menu label="Profil for sted" name="Land"> + <menu_item_call label="Profil for sted" name="Place Profile"/> <menu_item_call label="Om land" name="About Land"/> <menu_item_call label="Region/Estate" name="Region/Estate"/> </menu> @@ -64,17 +65,6 @@ <menu_item_call label="Byg værktøj" name="Create"/> <menu_item_call label="Land værktøj" name="Land"/> </menu> - <menu label="Redigér" name="Edit"> - <menu_item_call label="Fortryd" name="Undo"/> - <menu_item_call label="Gendan" name="Redo"/> - <menu_item_call label="Klip" name="Cut"/> - <menu_item_call label="Kopiér" name="Copy"/> - <menu_item_call label="Sæt ind" name="Paste"/> - <menu_item_call label="Slet" name="Delete"/> - <menu_item_call label="Duplikér" name="Duplicate"/> - <menu_item_call label="Vælg alt" name="Select All"/> - <menu_item_call label="Fravælg" name="Deselect"/> - </menu> <menu_item_call label="Sammenkæd" name="Link"/> <menu_item_call label="Adskil" name="Unlink"/> <menu_item_check label="Redigér sammekædede objekter" name="Edit Linked Parts"/> @@ -119,8 +109,10 @@ <menu_item_call label="[SECOND_LIFE] Help" name="Second Life Help"/> <menu_item_call label="Rapporter misbrug" name="Report Abuse"/> <menu_item_call label="Rapportér fejl" name="Report Bug"/> + <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanceret" name="Advanced"> + <menu_item_check label="Vis avanceret menu" name="Show Advanced Menu"/> <menu_item_call label="Stop animering af min avatar" name="Stop Animating My Avatar"/> <menu_item_call label="Gendan teksturer" name="Rebake Texture"/> <menu_item_call label="Sæt UI størrelse til standard" name="Set UI Size to Default"/> @@ -142,7 +134,6 @@ <menu_item_check label="Fremhæv gennemsigtigt" name="Highlight Transparent"/> <menu_item_check label="Vis HUD vedhæftninger" name="Show HUD Attachments"/> <menu_item_check label="Vis muse-sigte" name="ShowCrosshairs"/> - <menu_item_check label="Vis tips om land" name="Land Tips"/> </menu> <menu label="Gengivelsestyper" name="Rendering Types"> <menu_item_check label="Simpel" name="Simple"/> @@ -168,7 +159,7 @@ <menu_item_check label="TÃ¥ge" name="Fog"/> <menu_item_check label="Fleksible objekter" name="Flexible Objects"/> </menu> - <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> + <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> <menu_item_call label="Tøm gruppe cache" name="ClearGroupCache"/> <menu_item_check label="Muse udjævning" name="Mouse Smoothing"/> <menu label="Shortcuts" name="Shortcuts"> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 30e19ee901..afccc1e904 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -224,6 +224,9 @@ Er du sikker pÃ¥ at du vil fortsætte? Ikke nok penge til at oprette annonce. <usetemplate name="okbutton" yestext="OK"/> </notification> + <notification name="DeleteAvatarPick"> + Slet favorit <nolink>[PICK]</nolink>? + </notification> <notification name="CacheWillClear"> Cache vil blive tømt ved næste genstart af [APP_NAME]. </notification> @@ -391,6 +394,16 @@ Tilbyd venskab til [NAME]? <button name="Cancel" text="Annullér"/> </form> </notification> + <notification label="Gem sæt" name="SaveOutfitAs"> + Gem det som jeg har pÃ¥ som nyt sæt: + <form name="form"> + <input name="message"> + [DESC] (ny) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annullér"/> + </form> + </notification> <notification name="ErrorMessage"> <usetemplate name="okbutton" yestext="OK"/> </notification> @@ -584,6 +597,10 @@ Chat og personlige beskeder vil blive skjult. Personlige beskeder vil fÃ¥ din &a Teleport til [CLASSIFIED]? <usetemplate ignoretext="Bekræft at du ønsker at teleportere til lokation in annoncer" name="okcancelignore" notext="Annullér" yestext="Teleport"/> </notification> + <notification name="TeleportToHistoryEntry"> + Teleport til [HISTORY_ENTRY]? + <usetemplate ignoretext="Bekræft at du ønsker at teleportere til en lokation i din historik" name="okcancelignore" notext="Annullér" yestext="Teleport"/> + </notification> <notification label="Change Linden Estate" name="ChangeLindenEstate"> Du er i færd med at ændre et Linden ejet estate (mainland, teeen grid, orientation etc.). @@ -619,6 +636,9 @@ Du kan klikke pÃ¥ 'Ændre præference' for at ændre din indholdsratin <ignore name="ignore" text="Din valgte indholdsrating forhindrer dig i at kommer til en region"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Din indholdsrating er nu [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Du kan ikke kræve dette land pÃ¥ grund af din nuværende indholdsrating indstillinge . Dette kan skyldes manglende validering af din alder. @@ -813,6 +833,9 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Annulléret </notification> @@ -838,6 +861,11 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati Uploader billeder fra verdenen og www... (Tager omkring 5 minutter.) </notification> + <notification name="UploadConfirmation"> + Omkostninger ved at sende: L$[AMOUNT]. +Ønsker du at fortsætte? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="Send"/> + </notification> <notification name="UploadPayment"> Du betalte L$[AMOUNT] for at uploade. </notification> @@ -1180,9 +1208,9 @@ Prøv igen om lidt. </form> </notification> <notification name="TeleportOffered"> - [NAME] har tilbudt dig en teleport til lokationen: + [NAME_SLURL] har tilbudt en teleport til deres lokation: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teleportér"/> <button name="Cancel" text="Annullér"/> @@ -1200,9 +1228,11 @@ Prøv igen om lidt. </form> </notification> <notification name="OfferFriendship"> - [NAME] tilbyder venskab. + [NAME_SLURL] tilbyder venskab. -Som standard vil du kunne se andres onlinestatus. +[MESSAGE] + +(Som udgangspunkt vil I være i stand til at se hinandens online status.) <form name="form"> <button name="Accept" text="Acceptér"/> <button name="Decline" text="Afvis"/> @@ -1256,6 +1286,9 @@ Fra genstand: [OBJECTNAME], ejer: [NAME]? <notification name="FailedToFindWearable"> Det lykkedes ikke at finde [TYPE] med navnet [DESC] i databasen. </notification> + <notification name="ShareToWebFailed"> + Fejl ved afsendelse af billede til web. + </notification> <notification name="InvalidWearable"> Den genstand du prøver at tage pÃ¥ benytter en funktion din klient ikke kan forstÃ¥. Upgradér venligst din version af [APP_NAME] for at kunne tage denne genstand pÃ¥. </notification> @@ -1451,6 +1484,12 @@ De vil blive blokeret nogle fÃ¥ sekunder af sikkerhedsmæssige Ã¥rsager. Den valgte knap kan ikke vises lige nu. Knappen vil blive vist nÃ¥r der er nok plads til den. </notification> + <notification name="ShareNotification"> + Træk genstande fra beholdning til en person i beboer vælgeren + </notification> + <notification name="AvatarRezNotification"> + Avatar '[NAME]' rezzed pÃ¥ [TIME] sekunder. + </notification> <global name="UnsupportedGLRequirements"> Det ser ikke ud til at din hardware opfylder minimumskravene til [APP_NAME]. [APP_NAME] kræver et OpenGL grafikkort som understøter 'multitexture'. Check eventuelt om du har de nyeste drivere for grafikkortet, og de nyeste service-packs og patches til dit operativsystem. diff --git a/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml new file mode 100644 index 0000000000..e2d1f26d42 --- /dev/null +++ b/indra/newview/skins/default/xui/da/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Model fane"/> diff --git a/indra/newview/skins/default/xui/da/panel_edit_eyes.xml b/indra/newview/skins/default/xui/da/panel_edit_eyes.xml index 9c0d77c370..d801118cea 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iris" name="Iris" tool_tip="Klik for at vælge billede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Øjne"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Øjne"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml index 1d3ba061bc..837abdac80 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Handsker"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Handsker"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_hair.xml b/indra/newview/skins/default/xui/da/panel_edit_hair.xml index 14511d51d5..e91e6324e8 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Tekstur" name="Texture" tool_tip="Klik for at vælge et billede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Farve"/> - <accordion_tab name="hair_style_tab" title="Stil"/> - <accordion_tab name="hair_eyebrows_tab" title="Øjenbryn"/> - <accordion_tab name="hair_facial_tab" title="Skæg"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Farve"/> + <accordion_tab name="hair_style_tab" title="Stil"/> + <accordion_tab name="hair_eyebrows_tab" title="Øjenbryn"/> + <accordion_tab name="hair_facial_tab" title="Ansigt"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml index 4c9973c0bd..62934e96c8 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Stof forneden" name="Lower Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Jakke"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Jakke"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_pants.xml b/indra/newview/skins/default/xui/da/panel_edit_pants.xml index bcb1450258..36a9bc60a9 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et bilede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Bukser"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Bukser"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shape.xml b/indra/newview/skins/default/xui/da/panel_edit_shape.xml index 19c27748ca..1c8567d27c 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Mand" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Krop"/> - <accordion_tab name="shape_head_tab" title="Hoved"/> - <accordion_tab name="shape_eyes_tab" title="Øjne"/> - <accordion_tab name="shape_ears_tab" title="Ører"/> - <accordion_tab name="shape_nose_tab" title="Næse"/> - <accordion_tab name="shape_mouth_tab" title="Mund"/> - <accordion_tab name="shape_chin_tab" title="Hage"/> - <accordion_tab name="shape_torso_tab" title="Overkrop"/> - <accordion_tab name="shape_legs_tab" title="Ben"/> - </accordion> + <panel label="Trøje" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Krop"/> + <accordion_tab name="shape_head_tab" title="Hoved"/> + <accordion_tab name="shape_eyes_tab" title="Øjne"/> + <accordion_tab name="shape_ears_tab" title="Ører"/> + <accordion_tab name="shape_nose_tab" title="Næse"/> + <accordion_tab name="shape_mouth_tab" title="Mund"/> + <accordion_tab name="shape_chin_tab" title="Hage"/> + <accordion_tab name="shape_torso_tab" title="Overkrop"/> + <accordion_tab name="shape_legs_tab" title="Ben"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml index cd2e8d8cb3..e49667dc8f 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Trøje"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Trøje"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml index 54a0cc01a4..00d31da95a 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Sko"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Shoes"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_skin.xml b/indra/newview/skins/default/xui/da/panel_edit_skin.xml index 46dce354a9..608e1d6e0b 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Øvre tatoveringer" name="Upper Tattoos" tool_tip="Klik for at vælge et bilede"/> <texture_picker label="Nedre tatoveringer" name="Lower Tattoos" tool_tip="Klik for at vælge et bilede"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Hudfarve"/> - <accordion_tab name="skin_face_tab" title="Ansigtsdetaljer"/> - <accordion_tab name="skin_makeup_tab" title="Makeup"/> - <accordion_tab name="skin_body_tab" title="Kropsdetaljer"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Hudfarve"/> + <accordion_tab name="skin_face_tab" title="Ansigtsdetaljer"/> + <accordion_tab name="skin_makeup_tab" title="Makeup"/> + <accordion_tab name="skin_body_tab" title="Kropsdetaljer"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml index 4407c87d36..44a5beca45 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Nederdel"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Nederdel"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_socks.xml b/indra/newview/skins/default/xui/da/panel_edit_socks.xml index 6ef6dad86c..b7abd9d1a0 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/> <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Strømper"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Strømper"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml index de52146e29..32596be57b 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Underbukser"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Underbukser"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml index 6c2e1f5833..14cf79b97f 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/> <color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at Ã¥bne farvevælger"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Undertrøje"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Undertrøje"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml index 12bc120c45..4afb7ba45c 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Trøje" name="wearable_type_panel"> <text name="description_text" value="Kropsbygning:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Valg"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Gem som" name="save_as_button"/> <button label="Vend tilbage" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/da/panel_group_general.xml b/indra/newview/skins/default/xui/da/panel_group_general.xml index becb5ab70a..3079a23d20 100644 --- a/indra/newview/skins/default/xui/da/panel_group_general.xml +++ b/indra/newview/skins/default/xui/da/panel_group_general.xml @@ -45,8 +45,11 @@ <check_box label="Tilmeldingsgebyr" name="check_enrollment_fee" tool_tip="Angiver om der kræves et gebyr, for at tilmelde sig gruppen"/> <spinner label="L$" left_delta="130" name="spin_enrollment_fee" tool_tip="Nye medlemmer skal betale dette gebyr for at tilmelde sig gruppen, nÃ¥r "Tilmeldingsgebyr" er valgt." width="60"/> <combo_box name="group_mature_check" tool_tip="Angiver om din gruppes information anses som 'mature'." width="150"> - <combo_box.item label="PG indhold" name="pg"/> + <combo_item name="select_mature"> + - Vælg Mature - + </combo_item> <combo_box.item label="Mature indhold" name="mature"/> + <combo_box.item label="PG indhold" name="pg"/> </combo_box> <check_box initial_value="true" label="Vis i søgning" name="show_in_group_list" tool_tip="Lad folk se denne gruppe i søgeresultater."/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_im_control_panel.xml b/indra/newview/skins/default/xui/da/panel_im_control_panel.xml index be9bfab1f6..5cecb93d40 100644 --- a/indra/newview/skins/default/xui/da/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/da/panel_im_control_panel.xml @@ -20,7 +20,7 @@ <button label="Opkald" name="call_btn"/> </layout_panel> <layout_panel name="end_call_btn_panel"> - <button label="Forlad opkald" name="end_call_btn"/> + <button label="Afslut kald" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> <button label="Stemme kontroller" name="voice_ctrls_btn"/> diff --git a/indra/newview/skins/default/xui/da/panel_inventory_item.xml b/indra/newview/skins/default/xui/da/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml index 70570920cd..84468eb2a7 100644 --- a/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/da/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Ejer + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_owner_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_owner_control"/> + <text name="group_label"> + Gruppe: + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_group_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_group_control"/> + <text name="anyone_label"> + Enhver + </text> <check_box initial_value="false" label="Tillad navigation og interaktion" name="perms_anyone_interact"/> <check_box initial_value="false" label="Vis kontrol bjælke" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_nearby_media.xml b/indra/newview/skins/default/xui/da/panel_nearby_media.xml index 7a8b5a6389..95bfc89f20 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld media items) + </string> <string name="empty_item_text"> <tom> </string> @@ -16,15 +19,10 @@ <button label="Stop alt" name="all_nearby_media_disable_btn" tool_tip="Stop al media tæt pÃ¥"/> <button label="Start alt" name="all_nearby_media_enable_btn" tool_tip="Tænd al media tæt pÃ¥"/> <button name="open_prefs_btn" tool_tip="Vis media preferencer"/> - <button label="Mere >>" label_selected="Mindre <<" name="more_less_btn" tool_tip="Avanceret opsætning"/> + <button label="Mere >>" label_selected="Mindre <<" name="more_btn" tool_tip="Advancerede kontroller"/> + <button label="Mere >>" label_selected="Mindre <<" name="less_btn" tool_tip="Advancerede kontroller"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Media i nærheden - </text> - <text name="show"> - Vis: - </text> <combo_box name="show_combo"> <combo_box.item label="Overalt" name="All"/> <combo_box.item label="PÃ¥ dette sted" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Navn" name="media_name"/> <scroll_list.columns label="Debug" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Stop valgte medie"/> @@ -47,16 +45,16 @@ <button name="play_btn" tool_tip="Afspil valgte medie"/> </layout_panel> <layout_panel name="pause"> - <button name="pause_btn" tool_tip="Pause valgte medie"/> + <button name="pause_btn" tool_tip="Pause valgt medie"/> </layout_panel> <layout_panel name="volume_slider_ctrl"> - <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Volumen for valgte medie"/> + <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Lydstyrke for valgte medie"/> </layout_panel> <layout_panel name="mute"> - <button name="mute_btn" tool_tip="Sluk for lyd for valgte medie"/> + <button name="mute_btn" tool_tip="Sluk lyd fra valgte medie"/> </layout_panel> <layout_panel name="zoom"> - <button name="zoom_btn" tool_tip="Zoom ind til valgte medie"/> + <button name="zoom_btn" tool_tip="Zoom til valgte medie"/> </layout_panel> <layout_panel name="unzoom"> <button name="unzoom_btn" tool_tip="Zoom tilbage fra valgte medie"/> diff --git a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml new file mode 100644 index 0000000000..de68366610 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Redigér sæt" name="outfit_edit"> + <string name="No Outfit" value="Intet sæt"/> + <panel.string name="not_available"> + (Ikke relevant) + </panel.string> + <panel.string name="unknown"> + (ukendt) + </panel.string> + <string name="Filter.All" value="Alle"/> + <string name="Filter.Clothes/Body" value="Tøj/Krop"/> + <string name="Filter.Objects" value="Objekter"/> + <button label="redigér" name="edit_wearable_btn"/> + <text name="title" value="Redigér sæt"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Retter..."/> + <text name="curr_outfit_name" value="[Current Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="IM kontrolpanel" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Se genstand" name="look_item"/> + <scroll_list.columns label="Sorter genstande i sæt" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filter" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="IM kontrolpanel" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Tilføj til sæt:"/> + <button label="O" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="F" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Gem" name="save_btn"/> + <button label="Gendan" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml index df00cfb2eb..681701aba2 100644 --- a/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/da/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Ting" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MINE SÆT" name="outfitslist_tab"/> + <panel label="MINE SÆT" name="outfitslist_tab"/> <inventory_panel label="HAR PÃ…" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Fjern valgte genstand"/> <button label="Gem sæt" name="make_outfit_btn" tool_tip="Gem udseende som nyt sæt"/> <button label="Tag pÃ¥" name="wear_btn" tool_tip="Tag valgte sæt pÃ¥"/> - <button label="M" name="look_edit_btn"/> + <button label="Redigér sæt" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index 93aac7d08b..db72125b84 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Personer" name="people_panel"> - <string name="no_people" value="Ingen personer"/> - <string name="no_one_near" value="Ingen tæt pÃ¥"/> + <string name="no_recent_people" value="Ingen tidligere personer. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> + <string name="no_filtered_recent_people" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_one_near" value="Ingen i nærheden. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> + <string name="no_one_filtered_near" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> <string name="no_friends_online" value="Ingen venner online"/> <string name="no_friends" value="Ingen venner"/> + <string name="no_friends_msg"> + Find venner via [secondlife:///app/search/people Search] eller højre-klik pÃ¥ en beboer og tilføj dem som venner. +Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap World Map]. + </string> + <string name="no_filtered_friends_msg"> + Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]. + </string> <string name="people_filter_label" value="Filtrér personer"/> <string name="groups_filter_label" value="Filtrér grupper"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Try finding the group in search?]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Try searching for some groups to join.]"/> + <string name="no_filtered_groups_msg" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/groups Search]."/> + <string name="no_groups_msg" value="Leder du efter grupper at være med i? Prøv [secondlife:///app/search/groups Search]."/> <filter_editor label="Filtrér" name="filter_input"/> <tab_container name="tabs"> <panel label="TÆT PÃ…" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Tilbyd venskab til en beboer"/> <button name="del_btn" tool_tip="Fjern valgte person fra din venneliste"/> </panel> - <text name="no_friends_msg"> - For at tilføje venner prøv [secondlife:///app/search/people global search] eller klik pÃ¥ en bruger for at tilføje dem som ven. -Hvis du leder efter beboere at være sammen med, [secondlife:///app/worldmap prøv kortet]. - </text> </panel> <panel label="MINE GRUPPER" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/da/panel_places.xml b/indra/newview/skins/default/xui/da/panel_places.xml index 3ac4ebaae9..c06176f994 100644 --- a/indra/newview/skins/default/xui/da/panel_places.xml +++ b/indra/newview/skins/default/xui/da/panel_places.xml @@ -11,5 +11,6 @@ <button label="Gem" name="save_btn"/> <button label="Annullér" name="cancel_btn"/> <button label="Luk" name="close_btn"/> + <button label="Profil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml index 1570960745..4d505db30e 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="Talebobler" name="bubble_text_chat"/> <slider label="Synlighed" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Vælg farve for talebobler"/> + <text name="UI Size:"> + Brugerflade størrelse + </text> <check_box label="Vis script fejl i:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Brug walkie-talkie modus" name="modifier_combo"/> <button label="Angiv taste" name="set_voice_hotkey_button"/> <button label="Midterste museknap" name="set_voice_middlemouse_button" tool_tip="Nulstil til midterste musetaste"/> + <button label="Andre enheder" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_world_map.xml b/indra/newview/skins/default/xui/da/panel_world_map.xml index bea5ea6b36..138b922df1 100644 --- a/indra/newview/skins/default/xui/da/panel_world_map.xml +++ b/indra/newview/skins/default/xui/da/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NV </panel.string> + <panel.string name="world_map_person"> + 1 person + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] people + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml index ae029f5939..9a2a348f58 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Profil" name="info_btn"/> + <button label="Del" name="share_btn"/> <button label="Bær" name="wear_btn"/> <button label="Afspil" name="play_btn"/> <button label="Teleportér" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index 37501a3534..bd5ab62be9 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -246,6 +246,9 @@ <string name="BUTTON_CLOSE_WIN"> Luk (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Luk + </string> <string name="BUTTON_RESTORE"> Gendan </string> @@ -285,6 +288,9 @@ <string name="GroupNameNone"> (ingen) </string> + <string name="AvalineCaller"> + Avaline opkalder [ORDER] + </string> <string name="AssetErrorNone"> Ingen fejl </string> @@ -880,7 +886,7 @@ Tryk ESC for at skift til normalt udsyn </string> <string name="InventoryNoMatchingItems"> - Ingen matchende genstande fundet i beholdning. Prøv evt. [secondlife:///app/search/groups "Search"]. + Fandt du ikke hvad du ledte efter. Prøv [secondlife:///app/search/all Search]. </string> <string name="FavoritesNoMatchingItems"> Træk et landemærke hertil for at tilføje den som favorit. @@ -1539,9 +1545,7 @@ <string name="RegionNoCovenantOtherOwner"> Der er ingen regler for dette estate. Land pÃ¥ dette estate sælges af estate ejeren, ikke af Linden Lab. Kontakt venligst estate ejeren for detaljer om salg. </string> - <string name="covenant_last_modified"> - Sidst ændret: - </string> + <string name="covenant_last_modified" value="Sidst rettet:"/> <string name="none_text" value=" (ingen) "/> <string name="never_text" value=" (aldrig) "/> <string name="GroupOwned"> @@ -3218,6 +3222,15 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="LocationCtrlComboBtnTooltip"> Min lokationshistorik </string> + <string name="LocationCtrlAdultIconTooltip"> + Adult region + </string> + <string name="LocationCtrlModerateIconTooltip"> + Moderate region + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Generel region + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Opdatér </string> @@ -3248,6 +3261,12 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Opstart af klient fejlede </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Genstande modtages for hurtigt fra [FROM_NAME], automatisk visning er slÃ¥et fra i [TIME] sekunder + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Genstande modtages for hurtigt, automatisk visning er slÃ¥et fra i [TIME] sekunder + </string> <string name="IM_logging_string"> -- Logning af IM aktiveret -- </string> @@ -3275,6 +3294,9 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="IM_moderator_label"> (Moderator) </string> + <string name="answered_call"> + Dit opkald er blevet besvaret + </string> <string name="started_call"> startede et stemme opkald </string> @@ -3356,12 +3378,18 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] har sagt noget nyt </string> + <string name="session_initialization_timed_out_error"> + Initialisering af session er "timed out" + </string> <string name="paid_you_ldollars"> [NAME] betalte dig L$[AMOUNT] </string> <string name="you_paid_ldollars"> Du betalte [NAME] L$[AMOUNT] [REASON]. </string> + <string name="you_paid_ldollars_no_info"> + Du betalte L$[AMOUNT]. + </string> <string name="you_paid_ldollars_no_reason"> Du betalte [NAME] L$[AMOUNT]. </string> @@ -3472,4 +3500,13 @@ Krænkelsesanmeldelse <string name="Contents"> Indhold </string> + <string name="AvatarBirthDateFormat"> + [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + ingen/ingen + </string> + <string name="texture_load_dimensions_error"> + Kan ikke hente billeder større end [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml index c19f98516d..89f9f87043 100644 --- a/indra/newview/skins/default/xui/de/floater_about.xml +++ b/indra/newview/skins/default/xui/de/floater_about.xml @@ -43,13 +43,14 @@ Vivox-Version: [VIVOX_VERSION] </panel> <panel label="Danksagung" name="credits_panel"> <text_editor name="credits_editor"> - Second Life wird Ihnen präsentiert von Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl und vielen anderen. + Second Life wird Ihnen präsentiert von Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain und vielen anderen. -Vielen Dank den folgenden Einwohnern, die uns geholfen haben, dies zur bisher besten Version zu machen: able whitman, Adeon Writer, adonaira aabye, Aeron Kohime, Agathos Frascati, Aimee Trescothick, Aleric Inglewood, Alissa Sabre, Aminom Marvin, Angela Talamasca, Aralara Rajal, Armin Weatherwax, Ashrilyn Hayashida, Athanasius Skytower, Aura Dirval, Barney Boomslang, Biancaluce Robbiani, Biker Offcourse, Borg Capalini, Bulli Schumann, catherine pfeffer, Chalice Yao, Corre Porta, Court Goodman, Cummere Mayo, Dale Innis, Darien Caldwell, Darjeeling Schoonhoven, Daten Thielt, dimentox travanti, Dirk Talamasca, Drew Dwi, Duckless Vandyke, Elanthius Flagstaff, Electro Burnstein, emiley tomsen, Escort DeFarge, Eva Rau, Ezian Ecksol, Fire Centaur, Fluf Fredriksson, Francisco Koolhoven, Frontera Thor, Frungi Stastny, Gally Young, gearsawe stonecutter, Gigs Taggart, Gordon Wendt, Gudmund Shepherd, Gypsy Paz, Harleen Gretzky, Henri Beauchamp, Inma Rau, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Jessicka Graves, Joeseph Albanese, Joshua Philgarlic, Khyota Wulluf, kirstenlee Cinquetti, Latif Khalifa, Lex Neva, Lilibeth Andree, Lisa Lowe, Lunita Savira, Loosey Demonia, lum pfohl, Marcos Fonzarelli, MartinRJ Fayray, Marusame Arai, Matthew Dowd, Maya Remblai, McCabe Maxsted, Meghan Dench, Melchoir Tokhes, Menos Short, Michelle2 Zenovka, Mimika Oh, Minerva Memel, Mm Alder, Ochi Wolfe, Omei Turnbull, Pesho Replacement, Phantom Ninetails, phoenixflames kukulcan, Polo Gufler, prez pessoa, princess niven, Prokofy Neva, Qie Niangao, Rem Beattie, RodneyLee Jessop, Saijanai Kuhn, Seg Baphomet, Sergen Davies, Shirley Marquez, SignpostMarv Martin, Sindy Tsure, Sira Arbizu, Skips Jigsaw, Sougent Harrop, Spritely Pixel, Squirrel Wood, StarSong Bright, Subversive Writer, Sugarcult Dagger, Sylumm Grigorovich, Tammy Nowotny, Tanooki Darkes, Tayra Dagostino, Theoretical Chemistry, Thickbrick Sleaford, valerie rosewood, Vex Streeter, Vixen Heron, Whoops Babii, Winter Ventura, Xiki Luik, Yann Dufaux, Yina Yao, Yukinoroh Kamachi, Zolute Infinity, Zwagoth Klaar +Wir bedanken uns bei folgenden Einwohnern, die uns geholfen haben, dies zur bisher besten Version zu machen: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan und vielen anderen. -Um im Geschäftsleben erfolreich zu sein, sei kühn, sei schnell, sei anders. --Henry Marchant + +„Die Arbeit beginnt aufs Neue, die Hoffnung lebt weiter, und der Traum wird niemals sterben.“ - Edward Kennedy </text_editor> </panel> <panel label="Lizenzen" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 5322febe27..3026ff64b2 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -264,7 +264,7 @@ werden. <text left="204" name="selected_objects_text" width="48"> [COUNT] </text> - <text left="4" name="Autoreturn" width="410"> + <text name="Autoreturn"> Objekte anderer Einwohner automatisch zurückgeben (Minuten, 0 für aus): </text> <line_editor name="clean other time" right="-10" width="56"/> @@ -353,7 +353,7 @@ Nur große Parzellen können in der Suche aufgeführt werden. <combo_box.item label="Shopping" name="item11"/> <combo_box.item label="Sonstige" name="item12"/> </combo_box> - <combo_box left="266" name="land category" width="130"> + <combo_box name="land category"> <combo_box.item label="Alle Kategorien" name="item0"/> <combo_box.item label="Lindenort" name="item1"/> <combo_box.item label="Kunst und Kultur" name="item3"/> diff --git a/indra/newview/skins/default/xui/de/floater_animation_preview.xml b/indra/newview/skins/default/xui/de/floater_animation_preview.xml index 0d55ea7413..82a4a51d07 100644 --- a/indra/newview/skins/default/xui/de/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/de/floater_animation_preview.xml @@ -142,35 +142,35 @@ Maximal erlaubt sind [MAX_LENGTH] Sekunden. Ausdruck </text> <combo_box label="" name="emote_combo" tool_tip="Steuert Gesichtsregungen während der Animation"> - <combo_box.item label="(Keiner)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Ängstlich" name="Afraid"/> - <combo_box.item label="Verärgert" name="Angry"/> - <combo_box.item label="Grinst" name="BigSmile"/> - <combo_box.item label="Gelangweilt" name="Bored"/> - <combo_box.item label="Weinen" name="Cry"/> - <combo_box.item label="Verachten" name="Disdain"/> - <combo_box.item label="Verlegen" name="Embarrassed"/> - <combo_box.item label="Stirnrunzeln" name="Frown"/> - <combo_box.item label="Küssen" name="Kiss"/> - <combo_box.item label="Lachen" name="Laugh"/> - <combo_box.item label="Bäääh" name="Plllppt"/> - <combo_box.item label="Angewidert" name="Repulsed"/> - <combo_box.item label="Traurig" name="Sad"/> - <combo_box.item label="Schulterzucken" name="Shrug"/> - <combo_box.item label="Lächeln" name="Smile"/> - <combo_box.item label="Ãœberraschung" name="Surprise"/> - <combo_box.item label="Zwinkern" name="Wink"/> - <combo_box.item label="Sorgenvoll" name="Worry"/> + <item label="(Keiner)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Ängstlich" name="Afraid" value="Ängstlich"/> + <item label="Verärgert" name="Angry" value="Verärgert"/> + <item label="Grinst" name="BigSmile" value="Grinsend"/> + <item label="Gelangweilt" name="Bored" value="Gelangweilt"/> + <item label="Weinen" name="Cry" value="Weinen"/> + <item label="Verachten" name="Disdain" value="Verachten"/> + <item label="Verlegen" name="Embarrassed" value="Verlegen"/> + <item label="Stirnrunzeln" name="Frown" value="Stirnrunzeln"/> + <item label="Küssen" name="Kiss" value="Küssen"/> + <item label="Lachen" name="Laugh" value="Lachen"/> + <item label="Bäääh" name="Plllppt" value="Bäääh"/> + <item label="Angewidert" name="Repulsed" value="Angewidert"/> + <item label="Traurig" name="Sad" value="Traurig"/> + <item label="Schulterzucken" name="Shrug" value="Schulterzucken"/> + <item label="Lächeln" name="Smile" value="Lächeln"/> + <item label="Ãœberraschung" name="Surprise" value="Ãœberraschung"/> + <item label="Zwinkern" name="Wink" value="Zwinkern"/> + <item label="Sorgenvoll" name="Worry" value="Sorgenvoll"/> </combo_box> <text name="preview_label" width="97"> Vorschau während: </text> <combo_box label="" left_delta="107" name="preview_base_anim" tool_tip="Hiermit können Sie das Verhalten Ihres Avatars testen, während Ihr Avatar normale Bewegungen ausführt."> - <combo_box.item label="Stehend" name="Standing"/> - <combo_box.item label="Geht" name="Walking"/> - <combo_box.item label="Sitzt" name="Sitting"/> - <combo_box.item label="Fliegen" name="Flying"/> + <item label="Stehend" name="Standing" value="Stehend"/> + <item label="Geht" name="Walking" value="Gehend"/> + <item label="Sitzt" name="Sitting" value="Sitzend"/> + <item label="Fliegen" name="Flying" value="Fliegen"/> </combo_box> <spinner label="Eingang glätten (s)" label_width="105" name="ease_in_time" tool_tip="Einblendungsgeschwindigkeit von Animationen (in Sekunden)" width="175"/> <spinner bottom_delta="-20" label="Ausgang glätten (s)" label_width="105" left="10" name="ease_out_time" tool_tip="Ausblendegeschwindigkeit von Animationen (in Sekunden)" width="175"/> diff --git a/indra/newview/skins/default/xui/de/floater_buy_currency.xml b/indra/newview/skins/default/xui/de/floater_buy_currency.xml index 21e3bd280f..1f79889bb7 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_currency.xml @@ -60,8 +60,7 @@ <button label="Jetzt kaufen" name="buy_btn"/> <button label="Abbrechen" name="cancel_btn"/> <text height="40" left="160" name="info_cannot_buy" width="200"> - Kauf nicht -möglich + Kauf nicht möglich </text> - <button label="Weiter zum Internet" name="error_web"/> + <button label="Weiter zur Kontoseite" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_buy_object.xml b/indra/newview/skins/default/xui/de/floater_buy_object.xml index b23163b4a3..c697014b04 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_object.xml @@ -6,7 +6,7 @@ <text name="buy_text"> [AMOUNT] L$ von [NAME] kaufen? </text> - <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn" width="73"/> + <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn"/> <button label="Kaufen" label_selected="Kaufen" name="buy_btn"/> <text name="title_buy_text"> Kaufen diff --git a/indra/newview/skins/default/xui/de/floater_color_picker.xml b/indra/newview/skins/default/xui/de/floater_color_picker.xml index aed4bacb30..0fe154b531 100644 --- a/indra/newview/skins/default/xui/de/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_color_picker.xml @@ -18,7 +18,7 @@ <text name="l_val_text"> Hell.: </text> - <check_box label="Jetzt übernehmen" name="apply_immediate"/> + <check_box label="Sofort übernehmen" name="apply_immediate"/> <button label="" label_selected="" name="color_pipette"/> <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn"/> <button label="OK" label_selected="OK" name="select_btn"/> diff --git a/indra/newview/skins/default/xui/de/floater_customize.xml b/indra/newview/skins/default/xui/de/floater_customize.xml index f284d7cd6b..3651577797 100644 --- a/indra/newview/skins/default/xui/de/floater_customize.xml +++ b/indra/newview/skins/default/xui/de/floater_customize.xml @@ -81,7 +81,7 @@ <texture_picker label="Untere Tattoos" name="Lower Tattoos" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/> <button label="Neue Haut" label_selected="Neue Haut" name="Create New"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Haar" name="Hair"> @@ -116,7 +116,7 @@ <texture_picker label="Textur" name="Texture" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/> <button label="Neue Haare" label_selected="Neue Haare" name="Create New"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Augen" name="Eyes"> @@ -147,7 +147,7 @@ <texture_picker label="Iris" name="Iris" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/> <button label="Neue Augen" label_selected="Neue Augen" name="Create New"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <text label="Kleidung" name="clothes_placeholder"> @@ -159,7 +159,7 @@ <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button label="Neues Hemd" label_selected="Neues Hemd" name="Create New"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> <text name="title"> [DESC] @@ -192,7 +192,7 @@ <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button label="Neue Hose" label_selected="Neue Hose" name="Create New"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> <text name="title"> [DESC] @@ -249,7 +249,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Socken" name="Socks"> @@ -282,7 +282,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Jacke" name="Jacket"> @@ -316,7 +316,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Handschuhe" name="Gloves"> @@ -349,7 +349,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Unterhemd" name="Undershirt"> @@ -382,7 +382,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Unterhose" name="Underpants"> @@ -415,7 +415,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Rock" name="Skirt"> @@ -448,7 +448,7 @@ <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <button font="SansSerifSmall" label="Ausziehen" label_selected="Ausziehen" name="Take Off"/> <button font="SansSerifSmall" label="Speichern" label_selected="Speichern" left="107" name="Save"/> - <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." left="194" name="Save As" width="105"/> + <button font="SansSerifSmall" label="Speichern unter..." label_selected="Speichern unter..." name="Save As"/> <button font="SansSerifSmall" label="Zurücksetzen" label_selected="Zurücksetzen" name="Revert"/> </panel> <panel label="Tätowierung" name="Tattoo"> diff --git a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml index 837dfa9e8c..8599737106 100644 --- a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Day Cycle Floater" title="TAGESZYKLUS-EDITOR"> <tab_container name="Day Cycle Tabs"> <panel label="Tageszyklus" name="Day Cycle"> - <button label=" ?" name="WLDayCycleHelp" /> + <button label=" ?" name="WLDayCycleHelp"/> <text name="WL12am"> 24:00 </text> @@ -57,40 +57,38 @@ <text name="WL12amHash2"> | </text> - <button label="Key hinzu" label_selected="Key hinzu" name="WLAddKey" /> - <button label="Key löschen" label_selected="Key löschen" name="WLDeleteKey" /> + <button label="Key hinzu" label_selected="Key hinzu" name="WLAddKey"/> + <button label="Key löschen" label_selected="Key löschen" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> Keyframe-Einstellungen: </text> <text name="WLCurKeyTimeText"> Key-Zeit: </text> - <spinner label="Std." name="WLCurKeyHour" /> + <spinner label="Std." name="WLCurKeyHour"/> <spinner label="Min." name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> Key-Voreinstellung: </text> - <combo_box label="Voreinstellung" name="WLKeyPresets" /> + <combo_box label="Voreinstellung" name="WLKeyPresets"/> <text name="DayCycleText"> Einrasten: </text> - <combo_box label="5 min" name="WLSnapOptions" /> + <combo_box label="5 min" name="WLSnapOptions"/> <text name="DayCycleText2"> Zykluslänge: </text> - <spinner label="Std." name="WLLengthOfDayHour" /> + <spinner label="Std." name="WLLengthOfDayHour"/> <spinner label="Min." name="WLLengthOfDayMin"/> <spinner label="Sek." name="WLLengthOfDaySec"/> <text name="DayCycleText3"> Vorschau: </text> - <button label="Start" label_selected="Start" name="WLAnimSky" /> - <button label="Stopp" label_selected="Stopp" name="WLStopAnimSky" /> - <button label="Grundbesitzzeit verw" label_selected="Zur Grundbesitzzeit" - name="WLUseLindenTime" /> - <button label="Testtag speichern" label_selected="Testtag speichern" - name="WLSaveDayCycle" /> - <button label="Testtag laden" label_selected="Testtag laden" name="WLLoadDayCycle" /> + <button label="Start" label_selected="Start" name="WLAnimSky"/> + <button label="Stopp" label_selected="Stopp" name="WLStopAnimSky"/> + <button label="Grundbesitzzeit verw" label_selected="Zur Grundbesitzzeit" name="WLUseLindenTime"/> + <button label="Testtag speichern" label_selected="Testtag speichern" name="WLSaveDayCycle"/> + <button label="Testtag laden" label_selected="Testtag laden" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml index 9708d7603f..8cb1af9f7d 100644 --- a/indra/newview/skins/default/xui/de/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml @@ -2,12 +2,11 @@ <floater name="godtools floater" title="GOTT-WERKZEUGE"> <tab_container name="GodTools Tabs"> <panel label="Raster" name="grid"> - <button label="Alle Benutzer hinauswerfen" label_selected="Alle Benutzer hinauswerfen" name="Kick all users" width="175"/> <button label="Sichtbarkeits-Cache dieser Regionskarte leeren" label_selected="Sichtbarkeits-Cache dieser Regionskarte leeren" name="Flush This Region's Map Visibility Caches" width="285"/> </panel> <panel label="Region" name="region"> - <text name="Sim Name:" width="55"> - Sim: + <text name="Region Name:"> + Name der Region: </text> <check_box label="Startbereich Einleitung" name="check prelude" tool_tip="Diese Region zu einem Startbereich machen."/> <check_box label="Sonne fest" name="check fixed sun" tool_tip="Fixiert den Sonnenstand (wie in „Region/Grundbesitz“ > „Terrain“."/> @@ -35,8 +34,8 @@ <text name="Redirect to Grid: " width="110"> Auf Raster umleiten: </text> - <line_editor left_delta="110" name="redirectx" width="35" left_pad="0"/> - <line_editor left_delta="45" name="redirecty" width="35" /> + <line_editor left_delta="110" left_pad="0" name="redirectx" width="35"/> + <line_editor left_delta="45" name="redirecty" width="35"/> <text font="SansSerifSmall" name="billable factor text"> Abrechnungsfaktor: </text> @@ -52,8 +51,8 @@ <panel.string name="no_target"> (kein Ziel) </panel.string> - <text name="Sim Name:" width="55"> - Sim-Name: + <text name="Region Name:"> + Name der Region: </text> <text name="region name"> Welsh diff --git a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml index d01ea145f1..d931596efe 100644 --- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml @@ -22,7 +22,7 @@ VBO aktivieren: </text> <check_box initial_value="true" label="OpenGL Vertex-Buffer-Objekte aktivieren" name="vbo" tool_tip="Wenn Sie über moderne Grafikhardware verfügen, können Sie durch Aktivieren dieser Option die Geschwindigkeit verbessern. Bei alter Hardware sind die VBO oft schlecht implementiert, was zu Abstürzen führen kann, wenn diese Option aktiviert ist."/> - <slider label="Texturspeicher (MB):" name="GraphicsCardTextureMemory" tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen."/> + <slider label="Texturen-Cache (MB):" name="GraphicsCardTextureMemory" tool_tip="Speicherplatz, der für Texturen zur Verfügung steht. In der Regel handelt es sich um Grafikkartenspeicher. Ein kleinerer Wert kann die Geschwindigkeit erhöhen, aber auch zu Texturunschärfen führen."/> <spinner label="Nebeldistanzverhältnis:" name="fog"/> <button label="OK" label_selected="OK" name="OK"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_image_preview.xml b/indra/newview/skins/default/xui/de/floater_image_preview.xml index fd675f8808..d581c6051b 100644 --- a/indra/newview/skins/default/xui/de/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/de/floater_image_preview.xml @@ -10,16 +10,16 @@ Bildvorschau als: </text> <combo_box label="Kleidungstyp" name="clothing_type_combo"> - <combo_box.item label="Bild" name="Image"/> - <combo_box.item label="Haare" name="Hair"/> - <combo_box.item label="Kopf (Frau)" name="FemaleHead"/> - <combo_box.item label="Oberkörper (Frau)" name="FemaleUpperBody"/> - <combo_box.item label="Unterkörper (Frau)" name="FemaleLowerBody"/> - <combo_box.item label="Kopf (Mann)" name="MaleHead"/> - <combo_box.item label="Oberkörper (Mann)" name="MaleUpperBody"/> - <combo_box.item label="Unterkörper (Mann)" name="MaleLowerBody"/> - <combo_box.item label="Rock" name="Skirt"/> - <combo_box.item label="Geformtes Primitiv" name="SculptedPrim"/> + <item label="Bild" name="Image" value="Bild"/> + <item label="Haare" name="Hair" value="Haare"/> + <item label="Kopf (Frau)" name="FemaleHead" value="Kopf (Frau)"/> + <item label="Oberkörper (Frau)" name="FemaleUpperBody" value="Oberkörper (Frau)"/> + <item label="Unterkörper (Frau)" name="FemaleLowerBody" value="Unterkörper (Frau)"/> + <item label="Kopf (Mann)" name="MaleHead" value="Kopf (Mann)"/> + <item label="Oberkörper (Mann)" name="MaleUpperBody" value="Oberkörper (Mann)"/> + <item label="Unterkörper (Mann)" name="MaleLowerBody" value="Unterkörper (Mann)"/> + <item label="Rock" name="Skirt" value="Rock"/> + <item label="Geformtes Primitiv" name="SculptedPrim" value="Geformtes Primitiv"/> </combo_box> <text name="bad_image_text"> Bild kann nicht gelesen werden. diff --git a/indra/newview/skins/default/xui/de/floater_outgoing_call.xml b/indra/newview/skins/default/xui/de/floater_outgoing_call.xml index 5372b8387e..81079a3c52 100644 --- a/indra/newview/skins/default/xui/de/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/de/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Die Verbindung zu [VOICE_CHANNEL_NAME] wurde abgebrochen. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] hat den Anruf beendet. [RECONNECT_NEARBY] + Ihr Anfruf wurde beendet. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Sie haben das Gespräch beendet. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/de/floater_snapshot.xml b/indra/newview/skins/default/xui/de/floater_snapshot.xml index 9ee50c7c5c..4c417710bd 100644 --- a/indra/newview/skins/default/xui/de/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/de/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="FOTO-VORSCHAU"> - <text name="type_label"> - Zweck des Fotos - </text> - <radio_group label="Fototyp" name="snapshot_type_radio"> - <radio_item label="Emailen" name="postcard"/> - <radio_item label="Mein Inventar ([AMOUNT] L$)" name="texture"/> - <radio_item label="Auf meinem Computer speichern" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Foto aktualisieren" name="new_snapshot_btn"/> - <button label="Senden" name="send_btn"/> - <button label="Speichern ([AMOUNT] L$)" name="upload_btn"/> - <flyout_button label="Speichern" name="save_btn" tool_tip="Bild als Datei speichern"> - <flyout_button_item label="Speichern" name="save_item"/> - <flyout_button_item label="Speichern unter..." name="saveas_item"/> - </flyout_button> - <button label="Abbrechen" name="discard_btn"/> - <button label="Mehr" name="more_btn" tool_tip="Erweiterte Optionen"/> - <button label="Weniger" name="less_btn" tool_tip="Erweiterte Optionen"/> - <text name="type_label2"> - Größe - </text> - <text name="format_label"> - Format - </text> - <combo_box label="Auflösung" name="postcard_size_combo"> - <combo_box.item label="Aktuelles Fenster" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Benutzerdefiniert" name="Custom"/> - </combo_box> - <combo_box label="Auflösung" name="texture_size_combo"> - <combo_box.item label="Aktuelles Fenster" name="CurrentWindow"/> - <combo_box.item label="Klein (128x128)" name="Small(128x128)"/> - <combo_box.item label="Mittel (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Groß (512x512)" name="Large(512x512)"/> - <combo_box.item label="Benutzerdefiniert" name="Custom"/> - </combo_box> - <combo_box label="Auflösung" name="local_size_combo"> - <combo_box.item label="Aktuelles Fenster" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Benutzerdefiniert" name="Custom"/> - </combo_box> - <combo_box label="Format" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Breite" name="snapshot_width"/> - <spinner label="Höhe" name="snapshot_height"/> - <check_box label="Seitenverhältnis beibehalten" name="keep_aspect_check"/> - <slider label="Bildqualität" name="image_quality_slider"/> - <text name="layer_type_label" width="66"> - Aufnehmen: - </text> - <combo_box label="Bildlayer" left="73" name="layer_types" width="132"> - <combo_box.item label="Farben" name="Colors"/> - <combo_box.item label="Tiefe" name="Depth"/> - <combo_box.item label="Objektmasken" name="ObjectMattes"/> - </combo_box> - <check_box label="Oberfläche" name="ui_check"/> - <check_box label="HUDs" name="hud_check"/> - <check_box label="Nach dem Speichern offen lassen" name="keep_open_check"/> - <check_box label="Frame einfrieren (Vollbild)" name="freeze_frame_check"/> - <check_box label="Automatisch aktualisieren" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Foto"> + <floater.string name="unknown"> unbekannt - </string> + </floater.string> + <button label="Foto aktualisieren" name="new_snapshot_btn"/> + <line_editor label="Beschreibung" name="description"/> + <button label="Foto freigeben" name="share"/> + <button label="Ins Internet stellen" name="share_to_web"/> + <button label="Objekt in meinem Inventar speichern" name="save_to_inventory"/> + <button label="Foto speichern" name="save"/> + <button label="Foto per E-Mail senden" name="share_to_email"/> + <button label="Auf meinem Computer speichern" name="save_to_computer"/> + <button label="Als Profilbild festlegen" name="set_profile_pic"/> + <button label="Zurück" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_tos.xml b/indra/newview/skins/default/xui/de/floater_tos.xml index 27c15a0337..1f3ef2f0b4 100644 --- a/indra/newview/skins/default/xui/de/floater_tos.xml +++ b/indra/newview/skins/default/xui/de/floater_tos.xml @@ -1,22 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=" "> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Weiter" label_selected="Weiter" name="Continue"/> <button label="Abbrechen" label_selected="Abbrechen" name="Cancel"/> - <radio_group name="tos_agreement"> - <radio_item label="Ich stimme den Servicebedingungen nicht zu" name="radio_disagree"/> - <radio_item label="Ich stimme den Servicebedingungen zu" name="radio_agree"/> - </radio_group> - <text name="tos_title"> - Nutzungsvereinbarung - </text> <check_box label="Ich stimme den Servicebedingungen und Datenschutzbestimmungen zu." name="agree_chk"/> <text name="tos_heading"> Lesen Sie die folgenden Servicebedingungen und Datenbestimmungen sorgfältig durch. Sie müssen den Servicebedingungen zustimmen, um sich bei [SECOND_LIFE] anmelden zu können. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <text name="real_url"> - http://secondlife.com/app/tos/ - </text> </floater> diff --git a/indra/newview/skins/default/xui/de/menu_attachment_other.xml b/indra/newview/skins/default/xui/de/menu_attachment_other.xml index d234443fae..237c92f7d2 100644 --- a/indra/newview/skins/default/xui/de/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/de/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Melden" name="abuse"/> <menu_item_call label="Einfrieren" name="Freeze..."/> <menu_item_call label="Hinauswerfen" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Fehler in Texturen beseitigen" name="Debug..."/> <menu_item_call label="Hineinzoomen" name="Zoom In"/> <menu_item_call label="Bezahlen" name="Pay..."/> <menu_item_call label="Objektprofil" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/de/menu_attachment_self.xml b/indra/newview/skins/default/xui/de/menu_attachment_self.xml index bc33b9b93d..3af69d2f31 100644 --- a/indra/newview/skins/default/xui/de/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/de/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Meine Freunde" name="Friends..."/> <menu_item_call label="Meine Gruppen" name="Groups..."/> <menu_item_call label="Mein Profil" name="Profile..."/> + <menu_item_call label="Fehler in Texturen beseitigen" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_avatar_other.xml b/indra/newview/skins/default/xui/de/menu_avatar_other.xml index 05eade1d34..8aee0be3d2 100644 --- a/indra/newview/skins/default/xui/de/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/de/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Melden" name="abuse"/> <menu_item_call label="Einfrieren" name="Freeze..."/> <menu_item_call label="Hinauswerfen" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Fehler in Texturen beseitigen" name="Debug..."/> <menu_item_call label="Hineinzoomen" name="Zoom In"/> <menu_item_call label="Bezahlen" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_avatar_self.xml b/indra/newview/skins/default/xui/de/menu_avatar_self.xml index 3a116b84a2..d310d10ea5 100644 --- a/indra/newview/skins/default/xui/de/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/de/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Meine Freunde" name="Friends..."/> <menu_item_call label="Meine Gruppen" name="Groups..."/> <menu_item_call label="Mein Profil" name="Profile..."/> + <menu_item_call label="Fehler in Texturen beseitigen" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/de/menu_edit.xml b/indra/newview/skins/default/xui/de/menu_edit.xml new file mode 100644 index 0000000000..37f68d68d5 --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Bearbeiten" name="Edit"> + <menu_item_call label="Rückgängig" name="Undo"/> + <menu_item_call label="Wiederherstellen" name="Redo"/> + <menu_item_call label="Ausschneiden" name="Cut"/> + <menu_item_call label="Kopieren" name="Copy"/> + <menu_item_call label="Einfügen" name="Paste"/> + <menu_item_call label="Löschen" name="Delete"/> + <menu_item_call label="Duplizieren" name="Duplicate"/> + <menu_item_call label="Alle auswählen" name="Select All"/> + <menu_item_call label="Auswahl aufheben" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/de/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/de/menu_inspect_avatar_gear.xml index 6f003dc9a5..edad34a1d5 100644 --- a/indra/newview/skins/default/xui/de/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/de/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Melden" name="report"/> <menu_item_call label="Einfrieren" name="freeze"/> <menu_item_call label="Hinauswerfen" name="eject"/> - <menu_item_call label="Debug" name="debug"/> + <menu_item_call label="Fehler in Texturen beseitigen" name="debug"/> <menu_item_call label="Auf Karte anzeigen" name="find_on_map"/> <menu_item_call label="Hineinzoomen" name="zoom_in"/> <menu_item_call label="Bezahlen" name="pay"/> diff --git a/indra/newview/skins/default/xui/de/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/de/menu_inspect_self_gear.xml index 383ee7831e..a74c41bb0c 100644 --- a/indra/newview/skins/default/xui/de/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/de/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Mein Profil" name="my_profile"/> <menu_item_call label="Meine Freunde" name="my_friends"/> <menu_item_call label="Meine Gruppen" name="my_groups"/> + <menu_item_call label="Fehler in Texturen beseitigen" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/de/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/de/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..71cff7136b --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Schließen" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/de/menu_inventory.xml b/indra/newview/skins/default/xui/de/menu_inventory.xml index a0625d88a8..306ef19de3 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Teilen" name="Share"/> <menu_item_call label="Kaufen" name="Task Buy"/> <menu_item_call label="Öffnen" name="Task Open"/> <menu_item_call label="Abspielen" name="Task Play"/> @@ -49,9 +50,9 @@ <menu_item_call label="Aktuelles Outfit ersetzen" name="Replace Outfit"/> <menu_item_call label="Zum aktuellen Outfit hinzufügen" name="Add To Outfit"/> <menu_item_call label="Vom aktuellen Outfit entfernen" name="Remove From Outfit"/> + <menu_item_call label="Original suchen" name="Find Original"/> <menu_item_call label="Objekt löschen" name="Purge Item"/> <menu_item_call label="Objekt wiederherstellen" name="Restore Item"/> - <menu_item_call label="Original suchen" name="Find Original"/> <menu_item_call label="Öffnen" name="Open"/> <menu_item_call label="Eigenschaften" name="Properties"/> <menu_item_call label="Umbenennen" name="Rename"/> diff --git a/indra/newview/skins/default/xui/de/menu_login.xml b/indra/newview/skins/default/xui/de/menu_login.xml index fffa056cac..70d31f93de 100644 --- a/indra/newview/skins/default/xui/de/menu_login.xml +++ b/indra/newview/skins/default/xui/de/menu_login.xml @@ -8,18 +8,8 @@ <menu_item_call label="[SECOND_LIFE]-Hilfe" name="Second Life Help"/> <menu_item_call label="INFO ÃœBER [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Debug-Menü anzeigen" name="Show Debug Menu"/> <menu label="Debug" name="Debug"> - <menu label="Bearbeiten" name="Edit"> - <menu_item_call label="Rückgängig" name="Undo"/> - <menu_item_call label="Wiederherstellen" name="Redo"/> - <menu_item_call label="Ausschneiden" name="Cut"/> - <menu_item_call label="Kopieren" name="Copy"/> - <menu_item_call label="Einfügen" name="Paste"/> - <menu_item_call label="Löschen" name="Delete"/> - <menu_item_call label="Duplizieren" name="Duplicate"/> - <menu_item_call label="Alle auswählen" name="Select All"/> - <menu_item_call label="Auswahl aufheben" name="Deselect"/> - </menu> <menu_item_call label="Debug-Einstellungen anzeigen" name="Debug Settings"/> <menu_item_call label="UI/Farb-Einstellungen" name="UI/Color Settings"/> <menu_item_call label="XUI-Editor" name="UI Preview Tool"/> @@ -28,5 +18,7 @@ <menu_item_call label="Servicebedingungen anzeigen" name="TOS"/> <menu_item_call label="Wichtige Meldung anzeigen" name="Critical"/> <menu_item_call label="Web-Browser-Test" name="Web Browser Test"/> + <menu_item_check label="Grid-Auswahl anzeigen" name="Show Grid Picker"/> + <menu_item_call label="Benachrichtigungs-Konsole anzeigen" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/de/menu_participant_list.xml b/indra/newview/skins/default/xui/de/menu_participant_list.xml index 5ca4eaaa50..ca0d9f8c2d 100644 --- a/indra/newview/skins/default/xui/de/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/de/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Anrufen" name="Call"/> <menu_item_call label="Teilen" name="Share"/> <menu_item_call label="Bezahlen" name="Pay"/> + <menu_item_check label="Symbole für Personen anzeigen" name="View Icons"/> <menu_item_check label="Voice ignorieren" name="Block/Unblock"/> <menu_item_check label="Text ignorieren" name="MuteText"/> <context_menu label="Moderator-Optionen >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/de/menu_save_outfit.xml b/indra/newview/skins/default/xui/de/menu_save_outfit.xml new file mode 100644 index 0000000000..70bca077ab --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Speichern" name="save_outfit"/> + <menu_item_call label="Als neue Datei speichern" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/de/menu_script_chiclet.xml b/indra/newview/skins/default/xui/de/menu_script_chiclet.xml new file mode 100644 index 0000000000..3256aa1a87 --- /dev/null +++ b/indra/newview/skins/default/xui/de/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Schließen" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 84ed19e253..c416ebd7c1 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -31,6 +31,7 @@ <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Landmarke für diesen Ort setzen" name="Create Landmark Here"/> <menu label="Ortsprofil" name="Land"> + <menu_item_call label="Ortsprofil" name="Place Profile"/> <menu_item_call label="Land-Info" name="About Land"/> <menu_item_call label="Region/Grundbesitz" name="Region/Estate"/> </menu> @@ -66,17 +67,6 @@ <menu_item_call label="Erstellen" name="Create"/> <menu_item_call label="Land" name="Land"/> </menu> - <menu label="Bearbeiten" name="Edit"> - <menu_item_call label="Rückgängig" name="Undo"/> - <menu_item_call label="Wiederherstellen" name="Redo"/> - <menu_item_call label="Ausschneiden" name="Cut"/> - <menu_item_call label="Kopieren" name="Copy"/> - <menu_item_call label="Einfügen" name="Paste"/> - <menu_item_call label="Löschen" name="Delete"/> - <menu_item_call label="Duplizieren" name="Duplicate"/> - <menu_item_call label="Alle auswählen" name="Select All"/> - <menu_item_call label="Auswahl aufheben" name="Deselect"/> - </menu> <menu_item_call label="Verknüpfung" name="Link"/> <menu_item_call label="Verknüpfung auflösen" name="Unlink"/> <menu_item_check label="Verknüpfte Teile bearbeiten" name="Edit Linked Parts"/> @@ -124,6 +114,7 @@ <menu_item_call label="INFO ÃœBER [APP_NAME]" name="About Second Life"/> </menu> <menu label="Erweitert" name="Advanced"> + <menu_item_check label="Menü „Erweitert“ anzeigen" name="Show Advanced Menu"/> <menu_item_call label="Animation meines Avatars stoppen" name="Stop Animating My Avatar"/> <menu_item_call label="Textur neu laden" name="Rebake Texture"/> <menu_item_call label="UI-Größe auf Standard setzen" name="Set UI Size to Default"/> @@ -145,7 +136,6 @@ <menu_item_check label="Durchsichtig hervorheben" name="Highlight Transparent"/> <menu_item_check label="HUD-Anhänge anzeigen" name="Show HUD Attachments"/> <menu_item_check label="Fadenkreuz für Mouselook anzeigen" name="ShowCrosshairs"/> - <menu_item_check label="Land-Kurzinfos anzeigen" name="Land Tips"/> </menu> <menu label="Darstellungstypen" name="Rendering Types"> <menu_item_check label="Einfach" name="Simple"/> diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 97387e9e87..aa1ee71c3f 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -359,7 +359,7 @@ Sind Sie sicher, dass Sie fortfahren wollen? <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - Auswahl [PICK] löschen? + Auswahl <nolink>[PICK]</nolink> löschen? <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> </notification> <notification name="PromptGoToEventsPage"> @@ -937,6 +937,16 @@ Sie sind nicht berechtigt, Land für die aktive Gruppe zu kaufen. <button name="Cancel" text="Abbrechen"/> </form> </notification> + <notification label="Outfit speichern" name="SaveOutfitAs"> + Mein aktuelles Outfit als neues Outfit speichern: + <form name="form"> + <input name="message"> + [DESC] (neu) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Abbrechen"/> + </form> + </notification> <notification name="RemoveFromFriends"> Möchten Sie [FIRST_NAME] [LAST_NAME] aus Ihrer Freundesliste entfernen? <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> @@ -1426,6 +1436,10 @@ Chat und Instant Messages werden ausgeblendet. Instant Messages (Sofortnachricht Zu [CLASSIFIED] teleportieren? <usetemplate ignoretext="Bestätigen, dass ich zu einer Position in Anzeigen teleportieren möchte." name="okcancelignore" notext="Abbrechen" yestext="Teleportieren"/> </notification> + <notification name="TeleportToHistoryEntry"> + Nach [HISTORY_ENTRY] teleportieren? + <usetemplate ignoretext="Bestätigen, dass ich zu einem Standort aus der Teleportliste teleportieren möchte" name="okcancelignore" notext="Abbrechen" yestext="Teleportieren"/> + </notification> <notification label="Nachricht an alle auf diesem Grundbesitz" name="MessageEstate"> Geben Sie eine kurze Nachricht ein, die an jede Person auf Ihrem Grundbesitz gesendet wird. <form name="form"> @@ -1517,6 +1531,9 @@ Klicken Sie auf „Einstellung ändern“, um Ihre Einstellung für Altereinstuf <ignore name="ignore" text="Meine Alterseinstufung lässt nicht zu, dass ich eine Region betrete."/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Ihre Inhaltseinstufung ist jetzt [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Sie haben aufgrund Ihrer Alterseinstufung keinen Anspruch auf dieses Land. Der Grund hierfür ist möglicherweise, dass Sie nicht altersüberprüft sind. @@ -1932,6 +1949,9 @@ Von einer Webseite zu diesem Formular linken, um anderen leichten Zugang zu dies <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Abgebrochen </notification> @@ -1960,6 +1980,11 @@ Von einer Webseite zu diesem Formular linken, um anderen leichten Zugang zu dies In-Welt- und Website-Fotos werden hochgeladen... (Dauert ca. 5 Minuten.) </notification> + <notification name="UploadConfirmation"> + Kosten für Hochladen: [AMOUNT] L$. +Möchten Sie fortfahren? + <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="Hochladen"/> + </notification> <notification name="UploadPayment"> Sie haben für das Hochladen [AMOUNT] L$ bezahlt. </notification> @@ -2304,9 +2329,9 @@ Versuchen Sie es in einigen Minuten erneut. </form> </notification> <notification name="TeleportOffered"> - [NAME] hat Ihnen einen Teleport an seine/ihre Position angeboten: + [NAME_SLURL] hat Ihnen einen Teleport an seine/ihre Position angeboten: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teleportieren"/> <button name="Cancel" text="Abbrechen"/> @@ -2324,11 +2349,11 @@ Versuchen Sie es in einigen Minuten erneut. </form> </notification> <notification name="OfferFriendship"> - [NAME] bietet Ihnen die Freundschaft an. + [NAME_SLURL] bietet Ihnen die Freundschaft an. [MESSAGE] -(Standardmäßig werden Sie gegenseitig ihren Online-Status sehen können.) +(Standardmäßig können Sie gegenseitig ihren Online-Status sehen.) <form name="form"> <button name="Accept" text="Akzeptieren"/> <button name="Decline" text="Ablehnen"/> @@ -2391,6 +2416,9 @@ Von Objekt: [OBJECTNAME], Eigentümer: [NAME]? <notification name="FailedToFindWearable"> [TYPE] namens [DESC] nicht in Datenbank. </notification> + <notification name="ShareToWebFailed"> + Bild aus Internet konnte nicht hochgeladen werden. + </notification> <notification name="InvalidWearable"> Dieser Artikel verwendet eine Funktion, die Ihr Viewer nicht unterstützt. Bitte aktualisieren Sie Ihre Version von [APP_NAME], um dieses Objekt anziehen zu können. </notification> @@ -2432,14 +2460,6 @@ Anfrage gestatten? <button name="Ignore" text="Ignorieren"/> </form> </notification> - <notification name="ScriptToast"> - [FIRST] [LAST]s '[TITLE]' fordert Eingaben vom Benutzer an. - <form name="form"> - <button name="Open" text="Dialog öffnen"/> - <button name="Ignore" text="Ignorieren"/> - <button name="Block" text="Ignorieren"/> - </form> - </notification> <notification name="BuyLindenDollarSuccess"> Vielen Dank für Ihre Zahlung. @@ -2596,6 +2616,12 @@ Diese werden für ein paar Sekunden sicherheitshalber gesperrt. Die ausgewählte Schaltfläche kann zur Zeit nicht angezeigt werden. Die Schaltfläche wird angezeigt, wenn genügend Platz vorhanden ist. </notification> + <notification name="ShareNotification"> + Artikel aus Inventar auf eine Person im Fenster „Einwohner auswählen“ ziehen. + </notification> + <notification name="AvatarRezNotification"> + Avatar '[NAME]' wurde in [TIME] Sekunden gerezzt. + </notification> <global name="UnsupportedCPU"> - Ihre CPU-Geschwindigkeit entspricht nicht den Mindestanforderungen. </global> diff --git a/indra/newview/skins/default/xui/de/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/de/outfit_accordion_tab.xml new file mode 100644 index 0000000000..bac885e5d8 --- /dev/null +++ b/indra/newview/skins/default/xui/de/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/de/panel_edit_eyes.xml b/indra/newview/skins/default/xui/de/panel_edit_eyes.xml index 31251ed48f..69bcf2fb71 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iris" name="Iris" tool_tip="Zum Auswählen eines Bildes hier klicken"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Augen"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Augen"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_gloves.xml b/indra/newview/skins/default/xui/de/panel_edit_gloves.xml index 2d11befbfd..ad87e432d6 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Handschuhe"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Handschuhe"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_hair.xml b/indra/newview/skins/default/xui/de/panel_edit_hair.xml index d255b1c16c..d6efde8306 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Textur" name="Texture" tool_tip="Zum Auswählen eines Bildes hier klicken"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Farbe"/> - <accordion_tab name="hair_style_tab" title="Stil"/> - <accordion_tab name="hair_eyebrows_tab" title="Augenbrauen"/> - <accordion_tab name="hair_facial_tab" title="Gesicht"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Farbe"/> + <accordion_tab name="hair_style_tab" title="Stil"/> + <accordion_tab name="hair_eyebrows_tab" title="Augenbrauen"/> + <accordion_tab name="hair_facial_tab" title="Gesicht"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_jacket.xml b/indra/newview/skins/default/xui/de/panel_edit_jacket.xml index 950c9023fe..8fe76f6225 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Stoff: unten" name="Lower Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Jacke"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Jacke"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_pants.xml b/indra/newview/skins/default/xui/de/panel_edit_pants.xml index 1ff439dc26..d40a27c5fd 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Hose"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Hose"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_shape.xml b/indra/newview/skins/default/xui/de/panel_edit_shape.xml index 37be3c1d90..393a586903 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Männlich" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Körper"/> - <accordion_tab name="shape_head_tab" title="Kopf"/> - <accordion_tab name="shape_eyes_tab" title="Augen"/> - <accordion_tab name="shape_ears_tab" title="Ohren"/> - <accordion_tab name="shape_nose_tab" title="Nase"/> - <accordion_tab name="shape_mouth_tab" title="Mund"/> - <accordion_tab name="shape_chin_tab" title="Kinn"/> - <accordion_tab name="shape_torso_tab" title="Oberkörper"/> - <accordion_tab name="shape_legs_tab" title="Beine"/> - </accordion> + <panel label="Hemd" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Körper"/> + <accordion_tab name="shape_head_tab" title="Kopf"/> + <accordion_tab name="shape_eyes_tab" title="Augen"/> + <accordion_tab name="shape_ears_tab" title="Ohren"/> + <accordion_tab name="shape_nose_tab" title="Nase"/> + <accordion_tab name="shape_mouth_tab" title="Mund"/> + <accordion_tab name="shape_chin_tab" title="Kinn"/> + <accordion_tab name="shape_torso_tab" title="Oberkörper"/> + <accordion_tab name="shape_legs_tab" title="Beine"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_shirt.xml b/indra/newview/skins/default/xui/de/panel_edit_shirt.xml index 6025606777..344b0b412a 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Hemd"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Hemd"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_shoes.xml b/indra/newview/skins/default/xui/de/panel_edit_shoes.xml index 15e8a21dd7..56aee5d0fe 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Schuhe"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Schuhe"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_skin.xml b/indra/newview/skins/default/xui/de/panel_edit_skin.xml index 90b06a29bc..f167f45e98 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Obere Tattoos" name="Upper Tattoos" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <texture_picker label="Untere Tattoos" name="Lower Tattoos" tool_tip="Zum Auswählen eines Bildes hier klicken"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Hautfarbe"/> - <accordion_tab name="skin_face_tab" title="Gesichtsdetails"/> - <accordion_tab name="skin_makeup_tab" title="Make-Up"/> - <accordion_tab name="skin_body_tab" title="Körperdetails"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Hautfarbe"/> + <accordion_tab name="skin_face_tab" title="Gesichtsdetails"/> + <accordion_tab name="skin_makeup_tab" title="Make-Up"/> + <accordion_tab name="skin_body_tab" title="Körperdetails"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_skirt.xml b/indra/newview/skins/default/xui/de/panel_edit_skirt.xml index 4fa9126c37..c8931bc947 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Rock"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Rock"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_socks.xml b/indra/newview/skins/default/xui/de/panel_edit_socks.xml index c2ecad8642..abbeefa44e 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Socken"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Strümpfe"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_underpants.xml b/indra/newview/skins/default/xui/de/panel_edit_underpants.xml index 4484068c1d..03c61a495d 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Unterhose"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Unterhose"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml index 847f806fce..39919393e1 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/> <color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Unterhemd"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Unterhemd"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml index c3ffb2f353..17a632b46e 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Hemd" name="wearable_type_panel"> <text name="description_text" value="Form:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Optionen"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Speichern unter" name="save_as_button"/> <button label="Zurücksetzen" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/de/panel_group_general.xml b/indra/newview/skins/default/xui/de/panel_group_general.xml index f300679e16..9d4301de73 100644 --- a/indra/newview/skins/default/xui/de/panel_group_general.xml +++ b/indra/newview/skins/default/xui/de/panel_group_general.xml @@ -47,8 +47,11 @@ Bewegen Sie die Maus über die Optionen, um weitere Informationen anzuzeigen. <check_box label="Kosten für Beitritt" name="check_enrollment_fee" tool_tip="Festlegen, ob Neumitglieder eine Beitrittsgebühr zahlen müssen"/> <spinner label="L$" name="spin_enrollment_fee" tool_tip="Wenn Beitrittsgebühr aktiviert ist, müssen neue Mitglieder diesen Betrag zahlen."/> <combo_box name="group_mature_check" tool_tip="Legt fest, ob Ihre Gruppeninformation moderate Inhalte enthält"> - <combo_box.item label="Genereller Inhalt" name="pg"/> + <combo_item name="select_mature"> + - Inhaltseinstufung auswählen - + </combo_item> <combo_box.item label="Moderater Inhalt" name="mature"/> + <combo_box.item label="Genereller Inhalt" name="pg"/> </combo_box> <check_box initial_value="true" label="In Suche anzeigen" name="show_in_group_list" tool_tip="Diese Gruppe in Suchergebnissen anzeigen"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_inventory_item.xml b/indra/newview/skins/default/xui/de/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/de/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/de/panel_media_settings_permissions.xml index 7ee0074a3b..dd408b8275 100644 --- a/indra/newview/skins/default/xui/de/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/de/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Eigentümer + </text> <check_box initial_value="false" label="Naviation & Interaktion zulassen" name="perms_owner_interact"/> <check_box initial_value="false" label="Steuerungsleiste anzeigen" name="perms_owner_control"/> + <text name="group_label"> + Gruppe: + </text> <check_box initial_value="false" label="Naviation & Interaktion zulassen" name="perms_group_interact"/> <check_box initial_value="false" label="Steuerungsleiste anzeigen" name="perms_group_control"/> + <text name="anyone_label"> + Jeder + </text> <check_box initial_value="false" label="Naviation & Interaktion zulassen" name="perms_anyone_interact"/> <check_box initial_value="false" label="Steuerungsleiste anzeigen" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_nearby_media.xml b/indra/newview/skins/default/xui/de/panel_nearby_media.xml index 32750f14d4..e633ae1dde 100644 --- a/indra/newview/skins/default/xui/de/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/de/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ls Medien-Objekte) + </string> <string name="empty_item_text"> <leer> </string> @@ -16,15 +19,10 @@ <button label="Stoppen" name="all_nearby_media_disable_btn" tool_tip="Alle Medien in der Nähe ausschalten"/> <button label="Starten" name="all_nearby_media_enable_btn" tool_tip="Alle Medien in der Nähe einschalten"/> <button name="open_prefs_btn" tool_tip="Medien-Einstellungen öffnen"/> - <button label="Mehr >>" label_selected="Weniger <<" name="more_less_btn" tool_tip="Erweiterte Steuerung"/> + <button label="Mehr >>" label_selected="Weniger <<" name="more_btn" tool_tip="Erweiterte Steuerung"/> + <button label="Mehr >>" label_selected="Weniger <<" name="less_btn" tool_tip="Erweiterte Steuerung"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Medien in der Nähe - </text> - <text name="show"> - Anzeigen: - </text> <combo_box name="show_combo"> <combo_box.item label="Alle" name="All"/> <combo_box.item label="Auf dieser Parzelle" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Name" name="media_name"/> <scroll_list.columns label="Fehler beseitigen" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Ausgewählte Medien stoppen"/> diff --git a/indra/newview/skins/default/xui/de/panel_outfit_edit.xml b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml new file mode 100644 index 0000000000..5ff088d41c --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Outfit bearbeiten" name="outfit_edit"> + <string name="No Outfit" value="Kein Outfit"/> + <panel.string name="not_available"> + k.A. + </panel.string> + <panel.string name="unknown"> + (unbekannt) + </panel.string> + <string name="Filter.All" value="Alle"/> + <string name="Filter.Clothes/Body" value="Kleider/Körper"/> + <string name="Filter.Objects" value="Objekte"/> + <button label="Bearbeiten" name="edit_wearable_btn"/> + <text name="title" value="Outfit bearbeiten"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Wird bearbeitet..."/> + <text name="curr_outfit_name" value="[Aktuelles Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="IM Steuerkonsole" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Look-Artikel" name="look_item"/> + <scroll_list.columns label="Outfit-Artikel sortieren" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filter" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="IM Steuerkonsole" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Zum Outfit hinzufügen:"/> + <button label="O" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="O" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Speichern" name="save_btn"/> + <button label="Zurücksetzen" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml index 54c56992fd..f695d67d1b 100644 --- a/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/de/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Sonstiges" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MEINE OUTFITS" name="outfitslist_tab"/> + <panel label="MEINE OUTFITS" name="outfitslist_tab"/> <inventory_panel label="AKTUELLES OUTFIT" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Auswahl löschen"/> <button label="Outfit speichern" name="make_outfit_btn" tool_tip="Aussehen als Outfit speichern"/> <button label="Anziehen" name="wear_btn" tool_tip="Ausgewähltes Outfit tragen"/> - <button label="M" name="look_edit_btn"/> + <button label="Outfit bearbeiten" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_people.xml b/indra/newview/skins/default/xui/de/panel_people.xml index cc45f25c82..59cc3a8b70 100644 --- a/indra/newview/skins/default/xui/de/panel_people.xml +++ b/indra/newview/skins/default/xui/de/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Leute" name="people_panel"> - <string name="no_people" value="Keine Leute"/> - <string name="no_one_near" value="Keiner in der Nähe"/> + <string name="no_recent_people" value="Hier sind keine Leute. Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/search/people Suche] oder die [secondlife:///app/worldmap Karte]."/> + <string name="no_filtered_recent_people" value="Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/people Suche]."/> + <string name="no_one_near" value="Es ist niemand in der Nähe. Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/search/people Suche] oder die [secondlife:///app/worldmap Karte]."/> + <string name="no_one_filtered_near" value="Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/people Suche]."/> <string name="no_friends_online" value="Keine Freunde online"/> <string name="no_friends" value="Keine Freunde"/> + <string name="no_friends_msg"> + Verwenden Sie die [secondlife:///app/search/people Suche], um Freunde zu finden. Oder klicken Sie mit rechts auf einen Einwohner und fügen Sie diesen als Freund hinzu. +Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/worldmap Karte]. + </string> + <string name="no_filtered_friends_msg"> + Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/people Suche]. + </string> <string name="people_filter_label" value="Nach Leuten filtern"/> <string name="groups_filter_label" value="Nach Gruppen filtern"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Suche verwenden, um die Gruppe zu finden?]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Suche verwenden, um Gruppen zu finden?]"/> + <string name="no_filtered_groups_msg" value="Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/groups Suche]."/> + <string name="no_groups_msg" value="Suchen Sie nach Gruppen? Versuchen Sie es mit der [secondlife:///app/search/groups Suche]."/> <filter_editor label="Filter" name="filter_input"/> <tab_container name="tabs"> <panel label="IN DER NÄHE" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Bieten Sie einem Einwohner die Freundschaft an"/> <button name="del_btn" tool_tip="Ausgewählte Person von Ihrer Freundesliste entfernen"/> </panel> - <text name="no_friends_msg"> - Verwenden Sie [secondlife:///app/search/people die globale Suche], um Freunde hinzuzufügen. Oder klicken Sie mit rechts auf einen Einwohner und fügen Sie diesen als Freund hinzu. -Wenn Sie nach Orten suchen, an denen sich Leute befinden, verwenden Sie [secondlife:///app/worldmap die Karte]. - </text> </panel> <panel label="MEINE GRUPPEN" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/de/panel_places.xml b/indra/newview/skins/default/xui/de/panel_places.xml index 2215ea3988..37ccdbeb7d 100644 --- a/indra/newview/skins/default/xui/de/panel_places.xml +++ b/indra/newview/skins/default/xui/de/panel_places.xml @@ -11,5 +11,6 @@ <button label="Speichern" name="save_btn" width="66"/> <button label="Abbrechen" name="cancel_btn" width="66"/> <button label="Schließen" name="close_btn"/> + <button label="Profil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml index c0ab69fcdf..f9d5c93dc0 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="Blasen-Chat" name="bubble_text_chat"/> <slider label="Deckkraft" label_width="66" name="bubble_chat_opacity"/> <color_swatch left_pad="35" name="background" tool_tip="Farbe für Blasen-Chat auswählen"/> + <text name="UI Size:"> + UI-Größe + </text> <check_box label="Skript-Fehler anzeigen:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat in der Nähe" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Auslöser für Zum-Sprechen-drücken:" name="modifier_combo"/> <button label="Taste festlegen" name="set_voice_hotkey_button"/> <button label="Mittlere Maustaste" name="set_voice_middlemouse_button" tool_tip="Auf mittlere Maustaste zurücksetzen"/> + <button label="Andere Geräte" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index aa1a93efac..bf150daf87 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -52,7 +52,7 @@ <text name="requires_restart_label"> (Neustart erforderlich) </text> - <radio_group name="chat_window" tool_tip="Zeigen Sie Ihre Sofortnachrichten (Instant Messages) in einem anderen Fenster oder in einem einzigen Fenster mit viele Registerkarten an (Neustart erforderlich)."> + <radio_group name="chat_window" tool_tip="Zeigen Sie Ihre Sofortnachrichten (Instant Messages) in einem anderen Fenster oder in einem einzigen Fenster mit vielen Registerkarten an (Neustart erforderlich)."> <radio_item label="Getrennte Fenster" name="radio" value="0"/> <radio_item label="Registerkarten" name="radio2" value="1"/> </radio_group> diff --git a/indra/newview/skins/default/xui/de/panel_world_map.xml b/indra/newview/skins/default/xui/de/panel_world_map.xml index f7454dd634..35fe3d3ffc 100644 --- a/indra/newview/skins/default/xui/de/panel_world_map.xml +++ b/indra/newview/skins/default/xui/de/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NW </panel.string> + <panel.string name="world_map_person"> + 1 Person + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] Leute + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml index f6cf911bb3..26bde94ffd 100644 --- a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Profil" name="info_btn"/> + <button label="Teilen" name="share_btn"/> <button label="Anziehen" name="wear_btn"/> <button label="Wiedergeben" name="play_btn"/> <button label="Teleportieren" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index b3aeb8cd68..03c858c880 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -261,6 +261,9 @@ <string name="BUTTON_CLOSE_WIN"> Schließen (Strg+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Schließen + </string> <string name="BUTTON_RESTORE"> Wiederherstellen </string> @@ -303,6 +306,9 @@ <string name="GroupNameNone"> (keiner) </string> + <string name="AvalineCaller"> + Avaline-Anfrufer [ORDER] + </string> <string name="AssetErrorNone"> Kein Fehler </string> @@ -904,7 +910,7 @@ ESC drücken, um zur Normalansicht zurückzukehren </string> <string name="InventoryNoMatchingItems"> - Im Inventar wurden keine passenden Objekte gefunden. Versuchen Sie es mit [secondlife:///app/search/groups „Suche"]. + Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/all Suche]. </string> <string name="FavoritesNoMatchingItems"> Landmarke hier hin ziehen, um diese hinzuzufügen. @@ -1555,7 +1561,7 @@ Objektinhalt </string> <string name="BusyModeResponseDefault"> - Der Einwohner/Die Einwohnerin ist „beschäftigt", d.h. er/sie möchte im Moment nicht gestört werden. Ihre Nachricht wird dem Einwohner/der Einwohnerin als IM angezeigt, und kann später beantwortet werden. + Der Einwohner/Die Einwohnerin ist „beschäftigtâ€, d.h. er/sie möchte im Moment nicht gestört werden. Ihre Nachricht wird dem Einwohner/der Einwohnerin als IM angezeigt, und kann später beantwortet werden. </string> <string name="MuteByName"> (nach Namen) @@ -1575,9 +1581,7 @@ <string name="RegionNoCovenantOtherOwner"> Für diesen Grundbesitz liegt kein Vertrag vor. Das Land auf diesem Grundbesitz wird vom Grundbesitzer und nicht von Linden Lab verkauft. Für Informationen zum Verkauf setzen Sie sich bitte mit dem Grundbesitzer in Verbindung. </string> - <string name="covenant_last_modified"> - Zuletzt geändert: - </string> + <string name="covenant_last_modified" value="Zuletzt geändert:"/> <string name="none_text" value=" (keiner) "/> <string name="never_text" value=" (nie) "/> <string name="GroupOwned"> @@ -3311,6 +3315,15 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="LocationCtrlDamageTooltip"> Gesundheit </string> + <string name="LocationCtrlAdultIconTooltip"> + Adult-Region + </string> + <string name="LocationCtrlModerateIconTooltip"> + Moderate Region + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Generelle Region + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Aktualisierung </string> @@ -3341,6 +3354,12 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="UpdaterFailStartTitle"> Viewer konnte nicht gestartet werden </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Zuviele Objekte auf einmal von [FROM_NAME]. Automaitsche Vorschau ist für [TIME] Sekunden nicht verfügbar. + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Zuviele Objekte auf einmal. Automaitsche Vorschau ist für [TIME] Sekunden nicht verfügbar. + </string> <string name="IM_logging_string"> -- Instant-Message-Protokoll aktiviert -- </string> @@ -3368,6 +3387,9 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="IM_moderator_label"> (Moderator) </string> + <string name="answered_call"> + Ihr Anruf wurde entgegengenommen + </string> <string name="started_call"> haben/hat einen Anruf initiiert </string> @@ -3461,12 +3483,18 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich bitte an [SUPPORT_ <string name="unread_chat_multiple"> [SOURCES] haben etwas Neues gesagt </string> + <string name="session_initialization_timed_out_error"> + Die Initialisierung der Sitzung ist fehlgeschlagen + </string> <string name="paid_you_ldollars"> [NAME] hat Ihnen [AMOUNT] L$ bezahlt. </string> <string name="you_paid_ldollars"> Sie haben [REASON] [AMOUNT] L$ an [NAME] bezahlt. </string> + <string name="you_paid_ldollars_no_info"> + Sie haben [AMOUNT] L$ bezahlt. + </string> <string name="you_paid_ldollars_no_reason"> Sie haben [AMOUNT] L$ an [NAME] bezahlt. </string> @@ -3577,7 +3605,13 @@ Missbrauchsbericht <string name="Contents"> Inhalt </string> - <string name="AvatarBirthDateFormat"> - [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] - </string> + <string name="AvatarBirthDateFormat"> + [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + Keine/Keiner + </string> + <string name="texture_load_dimensions_error"> + Bilder, die größer sind als [WIDTH]*[HEIGHT] können nicht geladen werden + </string> </strings> diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index a6a4c79da4..b5be03346e 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -49,7 +49,7 @@ libcurl Version: [LIBCURL_VERSION] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] Qt Webkit Version: [QT_WEBKIT_VERSION] -Vivox Version: [VIVOX_VERSION] +Voice Server Version: [VOICE_VERSION] </floater.string> <floater.string name="none"> 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 59f1889808..40c6b14a4a 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1061,7 +1061,8 @@ Leyla Linden </text> left="10" name="Autoreturn" top_pad="0" - width="310"> + width="412" + wrap="true"> Auto return other Residents' objects (minutes, 0 for off): </text> <line_editor @@ -1073,9 +1074,9 @@ Leyla Linden </text> layout="topleft" max_length="6" name="clean other time" - right="-72" - width="56" - top_delta="-6"/> + left_pad="0" + width="46" + top_delta="-2"/> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml index f0e5e30010..3d8f5d678b 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml @@ -5,7 +5,7 @@ height="290" layout="topleft" min_height="150" - min_width="200" + min_width="225" name="contents" help_topic="contents" save_rect="true" @@ -52,7 +52,7 @@ <text type="string" length="1" - follows="all" + follows="left|top|right" font="SansSerif" height="16" layout="topleft" @@ -90,7 +90,8 @@ name="buy_text" text_color="white" top_pad="5" - width="276"> + use_ellipses="true" + width="260"> Buy for L$[AMOUNT] from [NAME]? </text> <button diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 32460e937d..01bced81d0 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -11,7 +11,7 @@ save_rect="true" title="APPEARANCE" top_delta="-185" - width="524"> + width="600"> <tab_container height="517" layout="topleft" @@ -21,7 +21,7 @@ tab_position="left" tab_height="50" top="26" - width="506"> + width="580"> <text type="string" length="1" @@ -65,15 +65,15 @@ mouse_opaque="true" width="16" /> <button - follows="right|bottom" + follows="left|top" height="23" - label="Revert" - label_selected="Revert" + label="Create New Shape" + label_selected="Create New Shape" layout="topleft" - right="390" - name="Revert" - top="477" - width="82" /> + left="10" + name="Create New" + top="104" + width="160" /> <button follows="left|top" height="23" @@ -280,46 +280,46 @@ type="string" length="1" top="488" - follows="left|top|right" + follows="left|top" font="SansSerif" halign="right" height="23" layout="topleft" + left="10" name="Item Action Label" - right="90" - width="100"> + width="130"> Shape: </text> <button - follows="left|top" - height="23" - label="Create New Shape" - label_selected="Create New Shape" - layout="topleft" - left="10" - name="Create New" - top="104" - width="160" /> - <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" name="Save" - right="186" + left_pad="2" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" name="Save As" top="477" - right="304" + left_pad="3" width="115" /> + <button + follows="left|bottom" + height="23" + label="Revert" + label_selected="Revert" + layout="topleft" + left_pad="3" + name="Revert" + top="477" + width="120" /> </panel> <panel border="false" @@ -352,6 +352,16 @@ <button follows="left|top" height="23" + label="Create New Skin" + label_selected="Create New Skin" + layout="topleft" + left_delta="0" + name="Create New" + top_delta="-249" + width="160" /> + <button + follows="left|top" + height="23" label="Skin Color" label_selected="Skin Color" layout="topleft" @@ -479,20 +489,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - top="488" - follows="left|top|right" - font="SansSerif" - halign="right" - height="23" - layout="topleft" - name="Item Action Label" - right="90" - width="100"> - Skin: - </text> <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -532,46 +528,50 @@ tool_tip="Click to choose a picture" top_delta="102" width="82" /> - <button + <text + type="string" + length="1" + top="488" follows="left|top" + font="SansSerif" + halign="right" height="23" - label="Create New Skin" - label_selected="Create New Skin" layout="topleft" - left_delta="0" - name="Create New" - top_delta="-249" - width="160" /> + left="10" + name="Item Action Label" + width="130"> + Skin: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -729,20 +729,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - top="488" - follows="left|top|right" - font="SansSerif" - halign="right" - height="23" - layout="topleft" - name="Item Action Label" - right="90" - width="100"> - Hair: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -765,36 +751,50 @@ name="Create New" top_delta="-89" width="160" /> + <text + type="string" + length="1" + top="488" + follows="left|top" + font="SansSerif" + halign="right" + height="23" + layout="topleft" + name="Item Action Label" + left="10" + width="130"> + Hair: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -914,20 +914,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Eyes: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -949,36 +935,50 @@ name="Create New" top="66" width="160" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + left="10" + width="130"> + Eyes: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <text type="string" @@ -1063,36 +1063,50 @@ name="Create New" top="66" width="160" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + left="10" + width="130"> + Shirt: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> <text type="string" length="1" @@ -1183,20 +1197,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Shirt: - </text> </panel> <panel border="false" @@ -1266,36 +1266,50 @@ name="Create New" top="66" width="160" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + left="10" + width="130"> + Pants: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> <text type="string" length="1" @@ -1386,20 +1400,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Pants: - </text> </panel> <panel border="false" @@ -1528,20 +1528,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Shoes: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1573,36 +1559,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Shoes: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -1731,20 +1731,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Socks: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1776,36 +1762,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Socks: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -1934,20 +1934,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Jacket: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1990,36 +1976,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Jacket: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -2148,20 +2148,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Gloves: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2193,36 +2179,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Gloves: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -2351,20 +2351,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Undershirt: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2396,36 +2382,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Undershirt: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -2554,20 +2554,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Underpants: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2599,36 +2585,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Underpants: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -2757,20 +2757,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Skirt: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2802,36 +2788,50 @@ name="Take Off" top_pad="4" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Skirt: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -2960,20 +2960,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Tattoo: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -3018,36 +3004,50 @@ top_pad="4" left="10" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Tattoo: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> <panel border="false" @@ -3176,20 +3176,6 @@ width="373"> You do not have permission to modify this wearable. </text> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom|right" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - right="90" - width="100"> - Alpha: - </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -3299,47 +3285,61 @@ left="10" top_pad="20" width="82" /> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + left="10" + name="Item Action Label" + width="130"> + Alpha: + </text> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - right="186" + left_pad="2" name="Save" top="477" width="82" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - right="304" + left_pad="3" name="Save As" top="477" width="115" /> <button - follows="right|bottom" + follows="left|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - right="390" + left_pad="3" name="Revert" top="477" - width="82" /> + width="120" /> </panel> </tab_container> <scroll_container follows="left|top|right|bottom" height="409" layout="topleft" - left="211" + left="247" mouse_opaque="false" name="panel_container" top="92" - width="292"> + width="330"> <scrolling_panel_list follows="left|bottom" layout="topleft" @@ -3355,7 +3355,7 @@ name="script_info" tool_tip="Show scripts attached to your avatar" left="13" - width="90" /> + width="90" ></button> <button bottom="574" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 65a05f3ec5..ced8c29199 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -11,7 +11,7 @@ save_visibility="true" single_instance="true" title="CONVERSATIONS" - width="392"> + width="396"> <tab_container follows="left|right|top|bottom" height="390" @@ -27,7 +27,7 @@ halign="left" use_ellipses="true" top="0" - width="390" /> + width="394" /> <icon color="DefaultShadowLight" enabled="false" @@ -38,5 +38,5 @@ left="1" name="im_box_tab_container_icon" bottom="10" - width="390" /> + width="394" /> </multi_floater> 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 422e50f035..f537c81860 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -13,7 +13,7 @@ can_minimize="true" can_close="true" visible="false" - width="385" + width="394" can_resize="true" min_width="250" min_height="190"> @@ -22,7 +22,7 @@ default_tab_group="2" follows="all" height="320" - width="385" + width="394" layout="topleft" orientation="horizontal" name="im_panels" @@ -43,7 +43,7 @@ tab_group="2" top="0" height="200" - width="245" + width="254" user_resize="true"> <button height="20" @@ -70,7 +70,7 @@ parse_highlights="true" allow_html="true" left="1" - width="240"> + width="249"> </chat_history> <line_editor bottom="0" @@ -81,7 +81,7 @@ layout="bottomleft" name="chat_editor" tab_group="3" - width="240"> + width="249"> </line_editor> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/floater_land_holdings.xml b/indra/newview/skins/default/xui/en/floater_land_holdings.xml index 06c766f744..0b9ae3c9f3 100644 --- a/indra/newview/skins/default/xui/en/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/en/floater_land_holdings.xml @@ -99,7 +99,7 @@ name="allowed_label" top="366" left="10" - width="290"> + width="365"> Allowed land holdings at current payment plan: </text> <text @@ -110,7 +110,7 @@ layout="topleft" name="allowed_text" top="366" - left="305" + left="380" width="290"> [AREA] m² </text> @@ -123,7 +123,7 @@ top="386" left="10" name="current_label" - width="290"> + width="365"> Current land holdings: </text> <text @@ -133,7 +133,7 @@ height="16" layout="topleft" top="386" - left="305" + left="380" name="current_text" width="290"> [AREA] m² @@ -148,7 +148,7 @@ top="406" left="10" name="available_label" - width="290"> + width="365"> Available for land purchases: </text> <text @@ -160,7 +160,7 @@ layout="topleft" name="available_text" top="406" - left="305" + left="380" width="290"> [AREA] m² </text> diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 8e2c57764b..a685094190 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -13,7 +13,7 @@ save_rect="true" save_visibility="true" save_dock_state="true" - width="115"> + width="113"> <string name="walk_forward_tooltip"> Walk Forward (press Up Arrow or W) @@ -23,6 +23,14 @@ Walk Backwards (press Down Arrow or S) </string> <string + name="walk_left_tooltip"> + Walk left (press Shift + Left Arrow or A) + </string> + <string + name="walk_right_tooltip"> + Walk right (press Shift + Right Arrow or D) + </string> + <string name="run_forward_tooltip"> Run Forward (press Up Arrow or W) </string> @@ -31,6 +39,14 @@ Run Backwards (press Down Arrow or S) </string> <string + name="run_left_tooltip"> + Run left (press Shift + Left Arrow or A) + </string> + <string + name="run_right_tooltip"> + Run right (press Shift + Right Arrow or D) + </string> + <string name="fly_forward_tooltip"> Fly Forward (press Up Arrow or W) </string> @@ -39,6 +55,30 @@ Fly Backwards (press Down Arrow or S) </string> <string + name="fly_left_tooltip"> + Fly left (press Shift + Left Arrow or A) + </string> + <string + name="fly_right_tooltip"> + Fly right (press Shift + Right Arrow or D) + </string> + <string + name="fly_up_tooltip"> + Fly up (press E) + </string> + <string + name="fly_down_tooltip"> + Fly down (press C) + </string> + <string + name="jump_tooltip"> + Jump (press E) + </string> + <string + name="crouch_tooltip"> + Crouch (press C) + </string> + <string name="walk_title"> Walk </string> @@ -59,59 +99,91 @@ mouse_opaque="false" name="panel_actions" top="0" - width="115"> + width="113"> + <!-- Buttons in panel are organized in 3 columns to enable their easy vertical adjustment via top_pad--> + <!-- Left column --> <button follows="left|bottom" - height="25" + height="24" + image_selected="Movement_Up_On" + image_pressed_selected="Movement_Up_On" + image_unselected="Movement_Up_Off" + layout="topleft" + left="23" + name="move up btn" + scale_image="false" + tool_tip="Fly up (press E)" + top="18" + width="24" /> + <button + follows="left|bottom" + height="24" image_selected="Movement_TurnLeft_On" image_pressed_selected="Movement_TurnLeft_On" image_unselected="Movement_TurnLeft_Off" layout="topleft" - left="17" + left="15" name="turn left btn" scale_image="false" tool_tip="Turn left (press Left Arrow or A)" - top="45" - width="25" /> - <button - follows="left|bottom" - height="25" - image_selected="Movement_TurnRight_On" - image_pressed_selected="Movement_TurnRight_On" - image_unselected="Movement_TurnRight_Off" - layout="topleft" - left_pad="34" - name="turn right btn" - scale_image="false" - tool_tip="Turn right (press Right Arrow or D)" - top_delta="0" - width="25" /> - <button + top_pad="-3" + width="24" /> + <joystick_slide follows="left|bottom" - height="25" - image_selected="Movement_Up_On" - image_pressed_selected="Movement_Up_On" - image_unselected="Movement_Up_Off" + height="24" + image_selected="Movement_Left_On" + image_pressed_selected="Movement_Left_On" + image_unselected="Movement_Left_Off" layout="topleft" - left="10" - name="move up btn" + left="18" + name="move left btn" + quadrant="left" scale_image="false" - tool_tip="Fly up, press E" - top="14" - width="25" /> + tool_tip="Walk left (press Shift + Left Arrow or A)" + top_pad="-3" + width="24" /> + <!-- Right column --> <button follows="left|bottom" - height="25" + height="24" image_selected="Movement_Down_On" image_pressed_selected="Movement_Down_On" image_unselected="Movement_Down_Off" layout="topleft" - left_pad="45" + right="-21" name="move down btn" scale_image="false" - tool_tip="Fly down, press C" - top_delta="0" - width="20" /> + tool_tip="Fly down (press C)" + top="18" + width="24" /> + <button + follows="left|bottom" + height="24" + image_selected="Movement_TurnRight_On" + image_pressed_selected="Movement_TurnRight_On" + image_unselected="Movement_TurnRight_Off" + layout="topleft" + right="-13" + name="turn right btn" + scale_image="false" + tool_tip="Turn left (press Right Arrow or D)" + top_pad="-3" + width="24" /> + <joystick_slide + follows="left|bottom" + height="24" + image_selected="Movement_Right_On" + image_pressed_selected="Movement_Right_On" + image_unselected="Movement_Right_Off" + layout="topleft" + name="move right btn" + quadrant="right" + right="-16" + scale_image="false" + tool_tip="Walk right (press Shift + Right Arrow or D)" + top_pad="-3" + width="24" /> + <!-- Middle column --> <joystick_turn follows="left|bottom" height="25" @@ -124,7 +196,7 @@ quadrant="up" scale_image="false" tool_tip="Walk forward (press up arrow or W)" - top_delta="10" + top="22" width="21" /> <joystick_turn follows="left|bottom" @@ -138,7 +210,7 @@ quadrant="down" scale_image="false" tool_tip="Walk backward (press down arrow or S)" - top_delta="30" + top_pad="7" width="21" /> </panel> <!-- Width and height of this panel should be synchronized with panel_stand_stop_flying.xml --> @@ -149,7 +221,7 @@ left="0" name="panel_modes" top_pad="0" - width="115"> + width="113"> <button follows="left|bottom" height="23" 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 5ea207675b..9db6568ee3 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -119,7 +119,7 @@ No Answer. Please try again later. layout="topleft" left="77" name="leaving" - top="52" + top="62" width="315" word_wrap="true"> Leaving [CURRENT_CHAT]. diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 49361784ae..6e82bb09ee 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -47,7 +47,7 @@ tab_group="1" tab_position="left" tab_width="115" - tab_padding_right="5" + tab_padding_right="0" top="21" width="658"> <panel diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index 14c0081c0d..0e8eef2a21 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -84,8 +84,18 @@ label="Save" label_selected="Save" layout="topleft" - left="288" + left="178" name="Save" top="332" width="100" /> + <button + follows="right|bottom" + height="22" + label="Delete" + label_selected="Delete" + layout="topleft" + left="288" + name="Delete" + top="332" + width="100" /> </floater> 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 114b9a84e3..5b77f11d71 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -10,7 +10,9 @@ name="floater_voice_controls" help_topic="floater_voice_controls" title="Voice Controls" + save_dock_state="true" save_visibility="true" + save_rect="true" single_instance="true" width="282"> <string diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index b2e4a7ad95..e42b88abc3 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -50,7 +50,7 @@ name="non_side_tray_view" user_resize="false" width="500"> - <view bottom="500" + <world_view bottom="500" follows="all" height="500" left="0" diff --git a/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..45a0a6635b --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="101" + layout="topleft" + left="100" + mouse_opaque="false" + name="InvOfferChiclet Menu" + top="724" + visible="false" + width="128"> + <menu_item_call + label="Close" + layout="topleft" + name="Close"> + <menu_item_call.on_click + function="InvOfferChiclet.Action" + parameter="end" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 5e1f6b58e8..11459ad0e6 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -410,6 +410,14 @@ parameter="open" /> </menu_item_call> <menu_item_call + label="Open Original" + layout="topleft" + name="Open Original"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="open_original" /> + </menu_item_call> + <menu_item_call label="Properties" layout="topleft" name="Properties"> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index e95300a4b3..9fac296e26 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -22,7 +22,7 @@ </menu_item_call> <menu_item_separator /> <menu_item_call - label="Quit [APP_NAME]" + label="Exit [APP_NAME]" name="Quit" shortcut="control|Q"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 8b10c7b049..6ca8766e3f 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -18,16 +18,16 @@ name="Edit..."> <menu_item_call.on_click function="Object.Edit" /> - <menu_item_call.on_visible + <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"/> + function="Object.Build" /> + <menu_item_call.on_visible + function="EnableEdit"/> </menu_item_call> <menu_item_call enabled="false" 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 2515b60868..f126431263 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -6,31 +6,31 @@ label="Sort by Name" layout="topleft" name="SortByName"> - <menu_item_check.on_click - function="ParticipantList.Sort" - parameter="sort_by_name" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_sorted_by_name" /> + <on_click + function="ParticipantList.Sort" + parameter="sort_by_name" /> </menu_item_check> <menu_item_check label="Sort by Recent Speakers" layout="topleft" name="SortByRecentSpeakers"> - <menu_item_check.on_click - function="ParticipantList.Sort" - parameter="sort_by_recent_speakers" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_sorted_by_recent_speakers" /> + <on_click + function="ParticipantList.Sort" + parameter="sort_by_recent_speakers" /> </menu_item_check> <menu_item_call label="View Profile" layout="topleft" name="View Profile"> - <menu_item_call.on_click + <on_click function="Avatar.Profile" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_view_profile" /> </menu_item_call> @@ -38,9 +38,9 @@ label="Add Friend" layout="topleft" name="Add Friend"> - <menu_item_call.on_click + <on_click function="Avatar.AddFriend" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_add" /> </menu_item_call> @@ -48,9 +48,9 @@ label="IM" layout="topleft" name="IM"> - <menu_item_call.on_click + <on_click function="Avatar.IM" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_im" /> </menu_item_call> @@ -58,20 +58,19 @@ label="Call" layout="topleft" name="Call"> - <menu_item_call.on_click + <on_click function="Avatar.Call" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_call" /> </menu_item_call> <menu_item_call - enabled="true" label="Share" layout="topleft" name="Share"> - <menu_item_call.on_click + <on_click function="Avatar.Share" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_share" /> </menu_item_call> @@ -79,37 +78,38 @@ label="Pay" layout="topleft" name="Pay"> - <menu_item_call.on_click + <on_click function="Avatar.Pay" /> - <menu_item_call.on_enable + <on_enable function="ParticipantList.EnableItem" parameter="can_pay" /> </menu_item_call> <menu_item_separator - layout="topleft" - name="View Icons Separator" /> + layout="topleft" + name="View Icons Separator" /> <menu_item_check - label="View People Icons" - name="View Icons"> - <on_click - function="ToggleControl" - parameter="ParticipantListShowIcons"/> - <on_check - function="CheckControl" - parameter="ParticipantListShowIcons" /> + label="View People Icons" + layout="topleft" + name="View Icons"> + <on_check + function="CheckControl" + parameter="ParticipantListShowIcons" /> + <on_click + function="ToggleControl" + parameter="ParticipantListShowIcons" /> </menu_item_check> <menu_item_separator - layout="topleft" /> + layout="topleft" /> <menu_item_check label="Block Voice" layout="topleft" name="Block/Unblock"> - <menu_item_check.on_click - function="Avatar.BlockUnblock" /> - <menu_item_check.on_check + <on_check function="ParticipantList.CheckItem" parameter="is_blocked" /> - <menu_item_check.on_enable + <on_click + function="Avatar.BlockUnblock" /> + <on_enable function="ParticipantList.EnableItem" parameter="can_block" /> </menu_item_check> @@ -126,71 +126,71 @@ function="ParticipantList.EnableItem" parameter="can_mute_text" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator + layout="topleft" /> <context_menu label="Moderator Options >" layout="topleft" - name="Moderator Options" > - <menu_item_check - label="Allow text chat" - layout="topleft" - name="AllowTextChat"> - <on_check - function="ParticipantList.CheckItem" - parameter="is_allowed_text_chat" /> - <on_click - function="ParticipantList.ToggleAllowTextChat" /> - <on_enable - function="ParticipantList.EnableItem" - parameter="can_allow_text_chat" /> - </menu_item_check> - <menu_item_separator - layout="topleft" - name="moderate_voice_separator" /> - <menu_item_call - label="Mute this participant" - layout="topleft" - name="ModerateVoiceMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Mute everyone else" - layout="topleft" - name="ModerateVoiceMuteOthers"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="others" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute this participant" - layout="topleft" - name="ModerateVoiceUnMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute everyone else" - layout="topleft" - name="ModerateVoiceUnMuteOthers"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="others" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> + name="Moderator Options"> + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check + function="ParticipantList.CheckItem" + parameter="is_allowed_text_chat" /> + <on_click + function="ParticipantList.ToggleAllowTextChat" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_allow_text_chat" /> + </menu_item_check> + <menu_item_separator + layout="topleft" + name="moderate_voice_separator" /> + <menu_item_call + label="Mute this participant" + layout="topleft" + name="ModerateVoiceMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Mute everyone" + layout="topleft" + name="ModerateVoiceMute"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="mute_all" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone" + layout="topleft" + name="ModerateVoiceUnmute"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="unmute_all" /> + <on_enable + function="ParticipantList.EnableItem.Moderate" + parameter="can_moderate_voice" /> + </menu_item_call> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml new file mode 100644 index 0000000000..db29d9cebc --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="101" + layout="topleft" + left="100" + mouse_opaque="false" + name="ScriptChiclet Menu" + top="724" + visible="false" + width="128"> + <menu_item_call + label="Close" + layout="topleft" + name="Close"> + <menu_item_call.on_click + function="ScriptChiclet.Action" + parameter="end" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml index fa05dac148..73f0fa7979 100644 --- a/indra/newview/skins/default/xui/en/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml @@ -7,7 +7,7 @@ layout="topleft" name="show_agent"> <menu_item_call.on_click - function="Url.Execute" /> + function="Url.ShowProfile" /> </menu_item_call> <menu_item_separator layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_url_group.xml b/indra/newview/skins/default/xui/en/menu_url_group.xml index c5eaf94d22..2cb125ce09 100644 --- a/indra/newview/skins/default/xui/en/menu_url_group.xml +++ b/indra/newview/skins/default/xui/en/menu_url_group.xml @@ -7,7 +7,7 @@ layout="topleft" name="show_group"> <menu_item_call.on_click - function="Url.Execute" /> + function="Url.ShowProfile" /> </menu_item_call> <menu_item_separator layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 3af80f63fe..c9ebeb60fb 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -90,7 +90,6 @@ <menu_item_call.on_click function="World.SetAway" /> </menu_item_call> - <menu_item_separator/> <menu_item_call label="Busy" name="Set Busy"> @@ -116,7 +115,7 @@ </menu_item_call> <menu_item_separator/> <menu_item_call - label="Quit [APP_NAME]" + label="Exit [APP_NAME]" name="Quit" shortcut="control|Q"> <menu_item_call.on_click @@ -1339,6 +1338,16 @@ function="ToggleControl" parameter="RunMultipleThreads" /> </menu_item_check> + <menu_item_check + label="Use Plugin Read Thread" + name="Use Plugin Read Thread"> + <menu_item_check.on_check + function="CheckControl" + parameter="PluginUseReadThread" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="PluginUseReadThread" /> + </menu_item_check> <menu_item_call label="Clear Group Cache" name="ClearGroupCache"> @@ -1555,15 +1564,6 @@ <menu_item_call.on_click function="View.ZoomOut" /> </menu_item_call> - <menu_item_separator/> - <menu_item_call - label="Toggle Fullscreen" - name="Toggle Fullscreen" - > - <!-- Note: shortcut="alt|Enter" was deleted from the preceding node--> - <menu_item_call.on_click - function="View.Fullscreen" /> - </menu_item_call> </menu> <menu_item_separator/> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 8e1e5ff062..a585069faa 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -120,7 +120,7 @@ none </widgettype> <impl> - media_plugin_quicktime + media_plugin_webkit </impl> </mimetype> <mimetype name="none/none"> @@ -130,6 +130,9 @@ <widgettype> none </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/*"> <label name="audio2_label"> @@ -160,6 +163,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype menu="1" name="video/vnd.secondlife.qt.legacy"> <label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/ogg"> <label name="application/ogg_label"> @@ -187,6 +196,9 @@ <widgettype> audio </widgettype> + <impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="application/pdf"> <label name="application/pdf_label"> @@ -195,6 +207,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/postscript"> <label name="application/postscript_label"> @@ -203,6 +218,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/rtf"> <label name="application/rtf_label"> @@ -211,6 +229,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/smil"> <label name="application/smil_label"> @@ -219,6 +240,9 @@ <widgettype> movie </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/xhtml+xml"> <label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/x-director"> <label name="application/x-director_label"> @@ -235,6 +262,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/mid"> <label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml index 4748c14554..e95b371d00 100644 --- a/indra/newview/skins/default/xui/en/mime_types_linux.xml +++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml @@ -120,7 +120,7 @@ none </widgettype> <impl> - media_plugin_gstreamer + media_plugin_webkit </impl> </mimetype> <mimetype name="none/none"> @@ -130,6 +130,9 @@ <widgettype> none </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/*"> <label name="audio2_label"> @@ -160,6 +163,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype menu="1" name="video/vnd.secondlife.qt.legacy"> <label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/ogg"> <label name="application/ogg_label"> @@ -187,6 +196,9 @@ <widgettype> audio </widgettype> + <impl> + media_plugin_gstreamer + </impl> </mimetype> <mimetype name="application/pdf"> <label name="application/pdf_label"> @@ -195,6 +207,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/postscript"> <label name="application/postscript_label"> @@ -203,6 +218,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/rtf"> <label name="application/rtf_label"> @@ -211,6 +229,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/smil"> <label name="application/smil_label"> @@ -219,6 +240,9 @@ <widgettype> movie </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/xhtml+xml"> <label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/x-director"> <label name="application/x-director_label"> @@ -235,6 +262,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/mid"> <label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml index 8e1e5ff062..7931e55c0a 100644 --- a/indra/newview/skins/default/xui/en/mime_types_mac.xml +++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml @@ -130,6 +130,9 @@ <widgettype> none </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/*"> <label name="audio2_label"> @@ -160,6 +163,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype menu="1" name="video/vnd.secondlife.qt.legacy"> <label name="vnd.secondlife.qt.legacy_label"> @@ -179,6 +185,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/ogg"> <label name="application/ogg_label"> @@ -187,6 +196,9 @@ <widgettype> audio </widgettype> + <impl> + media_plugin_quicktime + </impl> </mimetype> <mimetype name="application/pdf"> <label name="application/pdf_label"> @@ -195,6 +207,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/postscript"> <label name="application/postscript_label"> @@ -203,6 +218,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/rtf"> <label name="application/rtf_label"> @@ -211,6 +229,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/smil"> <label name="application/smil_label"> @@ -219,6 +240,9 @@ <widgettype> movie </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/xhtml+xml"> <label name="application/xhtml+xml_label"> @@ -227,6 +251,9 @@ <widgettype> web </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="application/x-director"> <label name="application/x-director_label"> @@ -235,6 +262,9 @@ <widgettype> image </widgettype> + <impl> + media_plugin_webkit + </impl> </mimetype> <mimetype name="audio/mid"> <label name="audio/mid_label"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ca922bf724..a2acb8100f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -735,6 +735,14 @@ You need an account to enter [SECOND_LIFE]. Would you like to create one now? <notification icon="alertmodal.tga" + name="InvalidCredentialFormat" + type="alertmodal"> +You need to enter both the First and Last name of your avatar into the Username field, then login again. + </notification> + + + <notification + icon="alertmodal.tga" name="AddClassified" type="alertmodal"> Classified ads appear in the 'Classified' section of the Search directory and on [http://secondlife.com/community/classifieds secondlife.com] for one week. @@ -800,7 +808,7 @@ Insufficient funds to create classified. icon="alertmodal.tga" name="DeleteAvatarPick" type="alertmodal"> -Delete pick [PICK]? +Delete pick <nolink>[PICK]</nolink>? <usetemplate name="okcancelbuttons" notext="Cancel" @@ -1199,6 +1207,7 @@ Eject [AVATAR_NAME] from your land? <notification icon="alertmodal.tga" name="EjectAvatarFromGroup" + persist="true" type="notify"> You ejected [AVATAR_NAME] from group [GROUP_NAME] </notification> @@ -1384,6 +1393,18 @@ Unable to encode file: [FILE] <notification icon="alertmodal.tga" + name="CorruptedProtectedDataStore" + type="alertmodal"> + We are unable to read your protected data so it is being reset. + This may happen when you change network setup. + + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="CorruptResourceFile" type="alertmodal"> Corrupt resource file: [FILE] @@ -2124,6 +2145,19 @@ Please enter a higher price. <notification icon="alertmodal.tga" + name="ConfirmItemDeleteHasLinks" + type="alertmodal"> +At least one of the items you has link items that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first. + +Are you sure you want to delete these items? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="ConfirmObjectDeleteLock" type="alertmodal"> At least one of the items you have selected is locked. @@ -2417,6 +2451,57 @@ Please choose the male or female avatar. You can change your mind later. notext="Female" yestext="Male"/> </notification> + <notification icon="alertmodal.tga" + name="CantTeleportToGrid" + type="alertmodal"> +Could not teleport to [SLURL] as it's on a different grid ([GRID]) than the current grid ([CURRENT_GRID]). Please close your viewer and try again. + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification icon="alertmodal.tga" + name="GeneralCertificateError" + type="alertmodal"> +Could not connect to the server. +[REASON] + +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Valid From: [VALID_FROM] +Valid To: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification icon="alertmodal.tga" + name="TrustCertificateError" + type="alertmodal"> +The certification authority for this server is not known. + +Certificate Information: +SubjectName: [SUBJECT_NAME_STRING] +IssuerName: [ISSUER_NAME_STRING] +Valid From: [VALID_FROM] +Valid To: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + +Would you like to trust this authority? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Trust"/> + </notification> <notification icon="alertmodal.tga" @@ -2428,6 +2513,7 @@ Please choose the male or female avatar. You can change your mind later. <notification icon="alertmodal.tga" name="GrantedModifyRights" + persist="true" type="notify"> [NAME] has given you permission to edit their objects. </notification> @@ -2435,6 +2521,7 @@ Please choose the male or female avatar. You can change your mind later. <notification icon="alertmodal.tga" name="RevokedModifyRights" + persist="true" type="notify"> Your privilege to modify [NAME]'s objects has been revoked </notification> @@ -3364,7 +3451,7 @@ You are not allowed in that region due to your maturity Rating. type="alertmodal"> You are not allowed in that Region due to your maturity Rating preference. -You can click 'Change Preference' to raise your maturity Rating preference now and allow you to enter. You will be able to search and access [REGIONMATURITY] content from now on. If you later want to change this setting back, go to Me > Preferences > General. +Click 'Change Preference' to raise your maturity Rating preference for immediate entry. Doing so will allow you to search for and access [REGIONMATURITY] content. If you wish to change this setting later, you may do so from Me > Preferences > General. <form name="form"> <button index="0" @@ -3383,7 +3470,7 @@ You can click 'Change Preference' to raise your maturity Rating prefer icon="notifytip.tga" name="PreferredMaturityChanged" type="notifytip"> -Your maturity rating preference is now [RATING]. +Your maturity Rating preference is now [RATING]. </notification> <notification @@ -4349,6 +4436,7 @@ Replaced missing clothing/body part with default. <notification icon="groupnotify" name="GroupNotice" + persist="true" type="groupnotify"> Topic: [SUBJECT], Message: [MESSAGE] </notification> @@ -4397,6 +4485,7 @@ Do you wish to proceed? <notification icon="notify.tga" name="UploadPayment" + persist="true" type="notify"> You paid L$[AMOUNT] to upload. </notification> @@ -4684,6 +4773,7 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="SystemMessage" + persist="true" type="notify"> [MESSAGE] </notification> @@ -4691,10 +4781,13 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" name="PaymentRecived" + persist="true" type="notify"> [MESSAGE] </notification> + <!-- EventNotification couldn't be persist since server decide is it necessary to notify + user about subscribed event via LLEventNotifier--> <notification icon="notify.tga" name="EventNotification" @@ -4722,6 +4815,7 @@ Event Notification: <notification icon="notify.tga" name="TransferObjectsHighlighted" + persist="true" type="notify"> All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted. @@ -4737,6 +4831,7 @@ All objects on this parcel that will transfer to the purchaser of this parcel ar <notification icon="notify.tga" name="DeactivatedGesturesTrigger" + persist="true" type="notify"> Deactivated gestures with same trigger: [NAMES] @@ -4745,6 +4840,7 @@ Deactivated gestures with same trigger: <notification icon="notify.tga" name="NoQuickTime" + persist="true" type="notify"> Apple's QuickTime software does not appear to be installed on your system. If you want to view streaming media on parcels that support it you should go to the [http://www.apple.com/quicktime QuickTime site] and install the QuickTime Player. @@ -4752,6 +4848,7 @@ If you want to view streaming media on parcels that support it you should go to <notification icon="notify.tga" name="NoPlugin" + persist="true" type="notify"> No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable. </notification> @@ -4771,6 +4868,7 @@ Please re-install the plugin or contact the vendor if you continue to experience <notification icon="notify.tga" name="OwnedObjectsReturned" + persist="true" type="notify"> The objects you own on the selected parcel of land have been returned back to your inventory. </notification> @@ -4778,6 +4876,7 @@ The objects you own on the selected parcel of land have been returned back to yo <notification icon="notify.tga" name="OtherObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory. </notification> @@ -4785,6 +4884,7 @@ The objects on the selected parcel of land that is owned by [FIRST] [LAST] have <notification icon="notify.tga" name="OtherObjectsReturned2" + persist="true" type="notify"> The objects on the selected parcel of land owned by the Resident '[NAME]' have been returned to their owner. </notification> @@ -4792,6 +4892,7 @@ The objects on the selected parcel of land owned by the Resident '[NAME]&ap <notification icon="notify.tga" name="GroupObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. @@ -4801,6 +4902,7 @@ Non-transferable objects that are deeded to the group have been deleted. <notification icon="notify.tga" name="UnOwnedObjectsReturned" + persist="true" type="notify"> The objects on the selected parcel that are NOT owned by you have been returned to their owners. </notification> @@ -4808,6 +4910,7 @@ The objects on the selected parcel that are NOT owned by you have been returned <notification icon="notify.tga" name="ServerObjectMessage" + persist="true" type="notify"> Message from [NAME]: <nolink>[MSG]</nolink> @@ -4816,6 +4919,7 @@ Message from [NAME]: <notification icon="notify.tga" name="NotSafe" + persist="true" type="notify"> This land has damage enabled. You can be hurt here. If you die, you will be teleported to your home location. @@ -4825,6 +4929,7 @@ You can be hurt here. If you die, you will be teleported to your home location. <notification icon="notify.tga" name="NoFly" + persist="true" type="notify"> This area has flying disabled. You can't fly here. @@ -4834,6 +4939,7 @@ You can't fly here. <notification icon="notify.tga" name="PushRestricted" + persist="true" type="notify"> This area does not allow pushing. You can't push others here unless you own the land. <unique/> @@ -4842,6 +4948,7 @@ This area does not allow pushing. You can't push others here unless you own <notification icon="notify.tga" name="NoVoice" + persist="true" type="notify"> This area has voice chat disabled. You won't be able to hear anyone talking. <unique/> @@ -4850,6 +4957,7 @@ This area has voice chat disabled. You won't be able to hear anyone talking <notification icon="notify.tga" name="NoBuild" + persist="true" type="notify"> This area has building disabled. You can't build or rez objects here. <unique/> @@ -4858,6 +4966,7 @@ This area has building disabled. You can't build or rez objects here. <notification icon="notify.tga" name="ScriptsStopped" + persist="true" type="notify"> An administrator has temporarily stopped scripts in this region. </notification> @@ -4865,6 +4974,7 @@ An administrator has temporarily stopped scripts in this region. <notification icon="notify.tga" name="ScriptsNotRunning" + persist="true" type="notify"> This region is not running any scripts. </notification> @@ -4872,6 +4982,7 @@ This region is not running any scripts. <notification icon="notify.tga" name="NoOutsideScripts" + persist="true" type="notify"> This land has outside scripts disabled. @@ -4881,6 +4992,7 @@ No scripts will work here except those belonging to the land owner. <notification icon="notify.tga" name="ClaimPublicLand" + persist="true" type="notify"> You can only claim public land in the Region you're in. </notification> @@ -4888,6 +5000,7 @@ You can only claim public land in the Region you're in. <notification icon="notify.tga" name="RegionTPAccessBlocked" + persist="true" type="notify"> You aren't allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. @@ -4897,6 +5010,7 @@ Please go to the Knowledge Base for details on accessing areas with this maturit <notification icon="notify.tga" name="URBannedFromRegion" + persist="true" type="notify"> You are banned from the region. </notification> @@ -4904,6 +5018,7 @@ You are banned from the region. <notification icon="notify.tga" name="NoTeenGridAccess" + persist="true" type="notify"> Your account cannot connect to this teen grid region. </notification> @@ -4911,6 +5026,7 @@ Your account cannot connect to this teen grid region. <notification icon="notify.tga" name="ImproperPaymentStatus" + persist="true" type="notify"> You do not have proper payment status to enter this region. </notification> @@ -4918,6 +5034,7 @@ You do not have proper payment status to enter this region. <notification icon="notify.tga" name="MustGetAgeRgion" + persist="true" type="notify"> You must be age-verified to enter this region. </notification> @@ -4925,6 +5042,7 @@ You must be age-verified to enter this region. <notification icon="notify.tga" name="MustGetAgeParcel" + persist="true" type="notify"> You must be age-verified to enter this parcel. </notification> @@ -4932,6 +5050,7 @@ You must be age-verified to enter this parcel. <notification icon="notify.tga" name="NoDestRegion" + persist="true" type="notify"> No destination region found. </notification> @@ -4939,6 +5058,7 @@ No destination region found. <notification icon="notify.tga" name="NotAllowedInDest" + persist="true" type="notify"> You are not allowed into the destination. </notification> @@ -4946,6 +5066,7 @@ You are not allowed into the destination. <notification icon="notify.tga" name="RegionParcelBan" + persist="true" type="notify"> Cannot region cross into banned parcel. Try another way. </notification> @@ -4953,6 +5074,7 @@ Cannot region cross into banned parcel. Try another way. <notification icon="notify.tga" name="TelehubRedirect" + persist="true" type="notify"> You have been redirected to a telehub. </notification> @@ -4960,6 +5082,7 @@ You have been redirected to a telehub. <notification icon="notify.tga" name="CouldntTPCloser" + persist="true" type="notify"> Could not teleport closer to destination. </notification> @@ -4967,6 +5090,7 @@ Could not teleport closer to destination. <notification icon="notify.tga" name="TPCancelled" + persist="true" type="notify"> Teleport cancelled. </notification> @@ -4974,6 +5098,7 @@ Teleport cancelled. <notification icon="notify.tga" name="FullRegionTryAgain" + persist="true" type="notify"> The region you are attempting to enter is currently full. Please try again in a few moments. @@ -4982,6 +5107,7 @@ Please try again in a few moments. <notification icon="notify.tga" name="GeneralFailure" + persist="true" type="notify"> General failure. </notification> @@ -4989,6 +5115,7 @@ General failure. <notification icon="notify.tga" name="RoutedWrongRegion" + persist="true" type="notify"> Routed to wrong region. Please try again. </notification> @@ -4996,6 +5123,7 @@ Routed to wrong region. Please try again. <notification icon="notify.tga" name="NoValidAgentID" + persist="true" type="notify"> No valid agent id. </notification> @@ -5003,6 +5131,7 @@ No valid agent id. <notification icon="notify.tga" name="NoValidSession" + persist="true" type="notify"> No valid session id. </notification> @@ -5010,6 +5139,7 @@ No valid session id. <notification icon="notify.tga" name="NoValidCircuit" + persist="true" type="notify"> No valid circuit code. </notification> @@ -5017,6 +5147,7 @@ No valid circuit code. <notification icon="notify.tga" name="NoValidTimestamp" + persist="true" type="notify"> No valid timestamp. </notification> @@ -5024,6 +5155,7 @@ No valid timestamp. <notification icon="notify.tga" name="NoPendingConnection" + persist="true" type="notify"> Unable to create pending connection. </notification> @@ -5031,6 +5163,7 @@ Unable to create pending connection. <notification icon="notify.tga" name="InternalUsherError" + persist="true" type="notify"> Internal error attempting to connect agent usher. </notification> @@ -5038,6 +5171,7 @@ Internal error attempting to connect agent usher. <notification icon="notify.tga" name="NoGoodTPDestination" + persist="true" type="notify"> Unable to find a good teleport destination in this region. </notification> @@ -5045,6 +5179,7 @@ Unable to find a good teleport destination in this region. <notification icon="notify.tga" name="InternalErrorRegionResolver" + persist="true" type="notify"> Internal error attempting to activate region resolver. </notification> @@ -5052,6 +5187,7 @@ Internal error attempting to activate region resolver. <notification icon="notify.tga" name="NoValidLanding" + persist="true" type="notify"> A valid landing point could not be found. </notification> @@ -5059,6 +5195,7 @@ A valid landing point could not be found. <notification icon="notify.tga" name="NoValidParcel" + persist="true" type="notify"> No valid parcel could be found. </notification> @@ -5087,28 +5224,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC <notification icon="notify.tga" - name="ObjectGiveItemUnknownUser" - type="offer"> -An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you this [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button - index="0" - name="Keep" - text="Keep"/> - <button - index="1" - name="Discard" - text="Discard"/> - <button - index="2" - name="Mute" - text="Block"/> - </form> - </notification> - - <notification - icon="notify.tga" name="UserGiveItem" type="offer"> [NAME_SLURL] has given you this [OBJECTTYPE]: @@ -5132,6 +5247,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="GodMessage" + persist="true" type="notify"> [NAME] @@ -5141,6 +5257,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="JoinGroup" + persist="true" type="notify"> [MESSAGE] <form name="form"> @@ -5165,7 +5282,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th type="offer"> [NAME_SLURL] has offered to teleport you to their location: -[MESSAGE], ([MATURITY]) +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button index="0" @@ -5189,6 +5306,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="GotoURL" + persist="true" type="notify"> [MESSAGE] [URL] @@ -5235,6 +5353,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="OfferFriendshipNoMessage" + persist="true" type="notify"> [NAME] is offering friendship. @@ -5261,6 +5380,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th <notification icon="notify.tga" name="FriendshipDeclined" + persist="true" type="notify"> [NAME] declined your friendship offer. </notification> @@ -5282,6 +5402,7 @@ Friendship offer declined. <notification icon="notify.tga" name="OfferCallingCard" + persist="true" type="notify"> [FIRST] [LAST] is offering their calling card. This will add a bookmark in your inventory so you can quickly IM this Resident. @@ -5302,6 +5423,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident. name="RegionRestartMinutes" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [MINUTES] minutes. If you stay in this region you will be logged out. @@ -5312,6 +5434,7 @@ If you stay in this region you will be logged out. name="RegionRestartSeconds" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [SECONDS] seconds. If you stay in this region you will be logged out. @@ -5320,6 +5443,7 @@ If you stay in this region you will be logged out. <notification icon="notify.tga" name="LoadWebPage" + persist="true" type="notify"> Load web page [URL]? @@ -5341,6 +5465,7 @@ From object: [OBJECTNAME], owner: [NAME]? <notification icon="notify.tga" name="FailedToFindWearableUnnamed" + persist="true" type="notify"> Failed to find [TYPE] in database. </notification> @@ -5348,6 +5473,7 @@ Failed to find [TYPE] in database. <notification icon="notify.tga" name="FailedToFindWearable" + persist="true" type="notify"> Failed to find [TYPE] named [DESC] in database. </notification> @@ -5355,6 +5481,7 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" name="ShareToWebFailed" + persist="true" type="notify"> Failed to upload image to web. </notification> @@ -5362,6 +5489,7 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" name="InvalidWearable" + persist="true" type="notify"> The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. </notification> @@ -5369,6 +5497,7 @@ The item you are trying to wear uses a feature that your Viewer can't read. <notification icon="notify.tga" name="ScriptQuestion" + persist="true" type="notify"> '[OBJECTNAME]', an object owned by '[NAME]', would like to: @@ -5394,6 +5523,7 @@ Is this OK? icon="notify.tga" name="ScriptQuestionCaution" priority="high" + persist="true" type="notify"> An object named '[OBJECTNAME]', owned by '[NAME]' would like to: @@ -5421,6 +5551,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialog" + persist="true" type="notify"> [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5435,6 +5566,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialogGroup" + persist="true" type="notify"> [GROUPNAME]'s '[TITLE]' [MESSAGE] @@ -5450,6 +5582,7 @@ Grant this request? <notification icon="notify.tga" name="FirstBalanceIncrease" + persist="true" type="notify"> You just received L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5458,6 +5591,7 @@ Your L$ balance is shown in the upper-right. <notification icon="notify.tga" name="FirstBalanceDecrease" + persist="true" type="notify"> You just paid L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5467,6 +5601,7 @@ Your L$ balance is shown in the upper-right. <notification icon="notify.tga" name="BuyLindenDollarSuccess" + persist="true" type="notify"> Thank you for your payment! @@ -5479,6 +5614,7 @@ The status of your payment can be checked on your Transaction History page on yo <notification icon="notify.tga" name="FirstSit" + persist="true" type="notify"> You are sitting. Use your arrow keys (or AWSD) to look around. @@ -5488,6 +5624,7 @@ Click the 'Stand Up' button to stand. <notification icon="notify.tga" name="FirstMap" + persist="true" type="notify"> Click and drag the map to look around. Double-click to teleport. @@ -5497,6 +5634,7 @@ Use the controls on the right to find things and display different backgrounds. <notification icon="notify.tga" name="FirstBuild" + persist="true" type="notify"> You have opened the Build Tools. Every object you see around you was created using these tools. </notification> @@ -5506,6 +5644,7 @@ You have opened the Build Tools. Every object you see around you was created usi <notification icon="notify.tga" name="FirstLeftClickNoHit" + persist="true" type="notify"> Left-clicking interacts with special objects. If the mouse pointer changes to a hand, you can interact with the object. @@ -5515,6 +5654,7 @@ You have opened the Build Tools. Every object you see around you was created usi <notification icon="notify.tga" name="FirstTeleport" + persist="true" type="notify"> You can only teleport to certain areas in this region. The arrow points to your specific destination. Click the arrow to dismiss it. </notification> @@ -5524,6 +5664,7 @@ You can only teleport to certain areas in this region. The arrow points to your <notification icon="notify.tga" name="FirstOverrideKeys" + persist="true" type="notify"> Your movement keys are now being handled by an object. Try the arrow keys or AWSD to see what they do. @@ -5535,6 +5676,7 @@ Press 'M' to do this. <notification icon="notify.tga" name="FirstAppearance" + persist="true" type="notify"> You are editing your Appearance. Use the arrow keys to look around. @@ -5544,6 +5686,7 @@ When you are done, press 'Save All'. <notification icon="notify.tga" name="FirstInventory" + persist="true" type="notify"> This is your Inventory, which contains items you own. @@ -5556,6 +5699,7 @@ This is your Inventory, which contains items you own. <notification icon="notify.tga" name="FirstSandbox" + persist="true" type="notify"> This is a sandbox area, and is meant to help Residents learn how to build. @@ -5566,6 +5710,7 @@ Things you build here will be deleted after you leave, so don't forget to r <notification icon="notify.tga" name="FirstFlexible" + persist="true" type="notify"> This object is flexible. Flexis must be phantom and not physical. </notification> @@ -5573,6 +5718,7 @@ This object is flexible. Flexis must be phantom and not physical. <notification icon="notify.tga" name="FirstDebugMenus" + persist="true" type="notify"> You opened the Advanced menu. @@ -5585,6 +5731,7 @@ To toggle this menu, <notification icon="notify.tga" name="FirstSculptedPrim" + persist="true" type="notify"> You are editing a Sculpted prim. Sculpties require a special texture to define their shape. </notification> @@ -5594,6 +5741,7 @@ You are editing a Sculpted prim. Sculpties require a special texture to define t <notification icon="notify.tga" name="FirstMedia" + persist="true" type="notify"> You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. </notification> @@ -5634,6 +5782,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByIM" + persist="true" type="notify"> [FIRST] [LAST] was sent an instant message and has been automatically unblocked. </notification> @@ -5641,6 +5790,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByMoney" + persist="true" type="notify"> [FIRST] [LAST] was given money and has been automatically unblocked. </notification> @@ -5648,6 +5798,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block <notification icon="notify.tga" name="AutoUnmuteByInventory" + persist="true" type="notify"> [FIRST] [LAST] was offered inventory and has been automatically unblocked. </notification> @@ -5975,6 +6126,36 @@ Drag items from inventory onto a person in the resident picker Avatar '[NAME]' rezzed in [TIME] seconds. </notification> + <notification + icon="alertmodal.tga" + name="ConfirmLeaveCall" + type="alert"> +Are you sure you want to leave this call? + <usetemplate + ignoretext="Confirm before I leave call" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <unique/> + </notification> + + <notification + icon="alertmodal.tga" + name="ConfirmMuteAll" + type="alert"> +You have selected to mute all participants in a group call. +This will also cause all residents that later join the call to be +muted, even after you have left the call. + +Mute everyone? + <usetemplate + ignoretext="Confirm before I mute all participants in a group call" + name="okcancelignore" + notext="Ok" + yestext="Cancel"/> + <unique/> + </notification> + <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. </global> diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml new file mode 100644 index 0000000000..5fcc9b012b --- /dev/null +++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime--> +<!-- Non of string values of controls below are visible to user. They are not need to be translated. --> +<accordion_tab + display_children="false" + follows="all" + height="45" + layout="topleft" + name="Mockup Tab" + title="Mockup Tab" + translate="false" + width="0"> + <wearable_items_list + allow_select="true" + follows="all" + keep_one_selected="true" + name="wearable_items_list" + translate="false" + /> +</accordion_tab> 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 28a6995186..e70abc0975 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 @@ -37,7 +37,7 @@ layout="topleft" name="speakers_list" opaque="false" - show_info_btn="false" + show_info_btn="true" show_profile_btn="false" show_speaking_indicator="false" width="147" /> diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..115964e5f2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="22" + layout="topleft" + left="0" + name="wearable_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <icon + height="16" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left="0" + name="item_icon" + top="2" + width="16" /> + <text + follows="left|right" + height="16" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="white" + top="4" + value="..." + width="359" /> + <icon + name="btn_lock" + layout="topleft" + follows="top|right" + image_name="Lock2" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_unselected="Icon_Gear_Background" + image_selected="Icon_Gear_Background" + top="0" + left_pad="3" + height="20" + width="20" + tab_stop="false" /> + <panel + background_visible="true" + bg_alpha_color="0.4 0.4 0.4 1.0" + bottom="0" + follows="left|right|top" + height="1" + layout="bottomleft" + left="0" + name="wearable_type_separator_panel" + width="380"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..9d19b89a61 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> + +<panel + follows="left|right|top" + height="35" + layout="topleft" + left="0" + name="clothing_list_button_bar_panel" + top="0" + visible="true" + width="300"> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="Switch" + layout="topleft" + left="5" + name="switch_btn" + top="5" + width="45" /> + <button + follows="top|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="Shop >" + layout="topleft" + right="-5" + name="bodyparts_shop_btn" + top="5" + width="61" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index e412c491fd..7b11538ccc 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -1,28 +1,30 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - mouse_opaque="true" background_visible="true" bg_alpha_color="DkGray" bg_opaque_color="DkGray" + chrome="true" follows="left|bottom|right" height="33" layout="topleft" left="0" name="bottom_tray" top="28" - chrome="true" - border_visible="false" width="1000"> - <string name="SpeakBtnToolTip">Turns microphone on/off</string> - <string name="VoiceControlBtnToolTip">Shows/hides voice control panel</string> + <string + name="SpeakBtnToolTip" + value="Turns microphone on/off" /> + <string + name="VoiceControlBtnToolTip" + value="Shows/hides voice control panel" /> <layout_stack - mouse_opaque="false" border_size="0" clip="false" follows="all" height="28" layout="topleft" left="0" + mouse_opaque="false" name="toolbar_stack" orientation="horizontal" top="0" @@ -33,288 +35,234 @@ height="10" image_name="spacer24.tga" layout="topleft" - min_width="2" left="0" + min_width="2" top="0" width="2" /> <layout_panel - mouse_opaque="false" auto_resize="false" + filename="panel_nearby_chat_bar.xml" follows="left|right" height="28" layout="topleft" left="0" - min_height="23" - width="310" - top="4" max_width="320" + min_height="23" min_width="216" + mouse_opaque="false" name="chat_bar" + top="4" user_resize="false" - filename="panel_nearby_chat_bar.xml" /> + width="310" /> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - width="105" - top_delta="0" - min_width="54" + min_width="57" + mouse_opaque="false" name="speak_panel" - user_resize="false"> - <talk_button - follows="left|right" - height="23" - speak_button.tab_stop="true" - show_button.tab_stop="true" - layout="topleft" - left="0" - name="talk" - top="5" - width="105"> - <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales. - & pad_right is default value for long label which can be right aligned. See EXT-6318 --> - <speak_button - halign="center" - name="speak_btn" - label="Speak" - label_selected="Speak" - pad_right="22" - use_ellipses="true" - /> - <show_button> - <show_button.init_callback - function="Button.SetDockableFloaterToggle" - parameter="voice_controls" /> - </show_button> - </talk_button> + top_delta="0" + user_resize="false" + width="108"> + <talk_button + follows="left|right" + height="23" + layout="topleft" + left="0" + name="talk" + top="5" + width="105"> + <show_button + tab_stop="true"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="voice_controls" /> + </show_button> + <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales. + & pad_right is default value for long label which can be right aligned. See EXT-6318 --> + <speak_button + halign="center" + label="Speak" + label_selected="Speak" + name="speak_btn" + pad_right="22" + tab_stop="true" + use_ellipses="true" /> + </talk_button> </layout_panel> - <icon - auto_resize="false" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - name="after_speak_panel" - min_width="3" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - width="82" - top_delta="0" - min_width="62" + min_width="65" + mouse_opaque="false" name="gesture_panel" - user_resize="false"> - <gesture_combo_list - follows="left|right" - height="23" - label="Gesture" - layout="topleft" - name="Gesture" - left="0" - top="5" - width="82" - tool_tip="Shows/hides gestures"> - <gesture_combo_list.combo_button - pad_right="10" - use_ellipses="true" /> - <gesture_combo_list.combo_list - page_lines="17" /> - </gesture_combo_list> + top_delta="0" + user_resize="false" + width="85"> + <gesture_combo_list + follows="left|right" + height="23" + label="Gesture" + layout="topleft" + left="0" + name="Gesture" + tool_tip="Shows/hides gestures" + top="5" + width="82"> + <combo_button + pad_right="10" + use_ellipses="true" /> + <combo_list + page_lines="17" /> + </gesture_combo_list> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="3" - name="after_gesture_panel" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" + min_width="52" + mouse_opaque="false" name="movement_panel" user_resize="false" - width="80" - min_width="49"> + width="83"> <button - image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" follows="left|right" height="23" - use_ellipses="true" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="Move" layout="topleft" name="movement_btn" tool_tip="Shows/hides movement controls" top="5" + use_ellipses="true" width="80"> - <button.init_callback + <init_callback function="Button.SetDockableFloaterToggle" parameter="moveview" /> </button> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="3" - name="after_movement_panel" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="left|right" height="28" layout="topleft" min_height="28" - min_width="49" + min_width="52" + mouse_opaque="false" name="cam_panel" user_resize="false" - width="80"> + width="83"> <button - image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" follows="left|right" height="23" - use_ellipses="true" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="View" layout="topleft" left="0" + name="camera_btn" tool_tip="Shows/hides camera controls" top="5" - name="camera_btn" + use_ellipses="true" width="80"> - <button.init_callback + <init_callback function="Button.SetDockableFloaterToggle" parameter="camera" /> </button> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="3" - name="after_cam_panel" - top="0" - width="3"/> <layout_panel - mouse_opaque="false" auto_resize="false" follows="left|right" height="28" layout="topleft" min_width="40" + mouse_opaque="false" name="snapshot_panel" width="40"> <button - follows="left|right" + follows="left|right" height="23" - image_selected="PushButton_Selected_Press" + image_overlay="Snapshot_Off" image_pressed="PushButton_Press" image_pressed_selected="PushButton_Selected_Press" - left="0" - label="" + image_selected="PushButton_Selected_Press" + is_toggle="true" layout="topleft" + left="0" name="snapshots" - width="36" + tool_tip="Take snapshot" top="5" - is_toggle="true" - image_overlay="Snapshot_Off" - tool_tip="Take snapshot"> - <button.init_callback - function="Button.SetFloaterToggle" - parameter="snapshot" /> - </button> - </layout_panel> + width="36"> + <init_callback + function="Button.SetFloaterToggle" + parameter="snapshot" /> + </button> + </layout_panel> <layout_panel - mouse_opaque="false" follows="left|right" height="30" layout="topleft" - top="0" - name="chiclet_list_panel" - width="189" min_width="95" + mouse_opaque="false" + name="chiclet_list_panel" + top="0" user_resize="false" - auto_resize="true"> + width="189"> <!--*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" + chiclet_padding="4" follows="left|right" height="24" layout="topleft" left="1" min_width="95" + mouse_opaque="false" name="chiclet_list" top="7" - chiclet_padding="4" - scrolling_offset="40" width="189"> <button auto_resize="true" follows="right" height="29" + image_hover_selected="SegmentedBtn_Left_Over" + image_hover_unselected="SegmentedBtn_Left_Over" + image_overlay="Arrow_Small_Left" + image_pressed="SegmentedBtn_Left_Press" + image_pressed_selected="SegmentedBtn_Left_Press" image_selected="SegmentedBtn_Left_Off" image_unselected="SegmentedBtn_Left_Off" - image_hover_selected="SegmentedBtn_Left_Over" - image_hover_unselected="SegmentedBtn_Left_Over" - image_pressed="SegmentedBtn_Left_Press" - image_pressed_selected="SegmentedBtn_Left_Press" - image_overlay="Arrow_Small_Left" layout="topleft" name="chicklet_left_scroll_button" - scale_image="true" tab_stop="false" top="-4" - right_pad="2" visible="false" width="7" /> <button auto_resize="true" follows="right" height="29" + image_hover_selected="SegmentedBtn_Right_Over" + image_hover_unselected="SegmentedBtn_Right_Over" + image_overlay="Arrow_Small_Right" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Press" image_selected="SegmentedBtn_Right_Off" image_unselected="SegmentedBtn_Right_Off" - image_hover_selected="SegmentedBtn_Right_Over" - image_hover_unselected="SegmentedBtn_Right_Over" - image_pressed="SegmentedBtn_Right_Press" - image_pressed_selected="SegmentedBtn_Right_Press" - image_overlay="Arrow_Small_Right" layout="topleft" name="chicklet_right_scroll_button" - scale_image="true" tab_stop="false" top="-4" visible="false" @@ -332,24 +280,24 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_width="4" name="DUMMY" top="0" - width="4"/> + width="4" /> <layout_panel auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" - top="0" - name="im_well_panel" - width="37" min_width="37" - user_resize="false"> + name="im_well_panel" + top="0" + user_resize="false" + width="37"> <chiclet_im_well - max_displayed_count="99" follows="right" height="28" layout="topleft" left="0" + max_displayed_count="99" name="im_well" top="0" width="35"> @@ -375,8 +323,8 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well left="0" name="Unread IM messages" tool_tip="Conversations" - width="34" > - <button.init_callback + width="34"> + <init_callback function="Button.SetDockableFloaterToggle" parameter="im_well_window" /> </button> @@ -388,11 +336,11 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="28" layout="topleft" min_height="28" - top="0" - name="notification_well_panel" - width="37" min_width="37" - user_resize="false"> + name="notification_well_panel" + top="0" + user_resize="false" + width="37"> <chiclet_notification follows="right" height="23" @@ -402,27 +350,27 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well name="notification_well" top="5" width="35"> - <button + <button + auto_resize="true" bottom_pad="3" + follows="right" + halign="center" + height="23" + image_overlay="Notices_Unread" + image_overlay_alignment="center" image_pressed="WellButton_Lit" image_pressed_selected="WellButton_Lit_Selected" image_selected="PushButton_Press" - auto_resize="true" - halign="center" - height="23" - follows="right" - label_color="Black" - left="0" - name="Unread" - image_overlay="Notices_Unread" - image_overlay_alignment="center" - tool_tip="Notifications" - width="34" > - <button.init_callback - function="Button.SetDockableFloaterToggle" - parameter="notification_well_window" /> - </button> - </chiclet_notification> + label_color="Black" + left="0" + name="Unread" + tool_tip="Notifications" + width="34"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="notification_well_window" /> + </button> + </chiclet_notification> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..2359719c2a --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> + +<panel + follows="left|right|top" + height="35" + layout="topleft" + left="0" + name="clothing_list_button_bar_panel" + top="0" + visible="true" + width="500"> + <button + follows="top|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + is_toggle="true" + label="Add +" + layout="topleft" + left="5" + name="add_btn" + top="5" + width="45" /> + <button + follows="top|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="Shop >" + layout="topleft" + right="-5" + name="clothing_shop_btn" + top="5" + width="61" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml new file mode 100644 index 0000000000..7cc9c46c08 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="23" + layout="topleft" + left="0" + name="wearable_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <button + name="btn_delete" + layout="topleft" + follows="top|left" + image_unselected="Toast_CloseBtn" + image_selected="Toast_CloseBtn" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <icon + height="16" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left_pad="3" + name="item_icon" + top="2" + width="16" /> + <text + follows="left|right" + height="16" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="white" + top="4" + value="..." + width="359" /> + <button + name="btn_move_up" + layout="topleft" + follows="top|right" + image_unselected="Movement_Up_Off" + image_selected="Movement_Up_Off" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <button + name="btn_move_down" + layout="topleft" + follows="top|right" + image_unselected="Movement_Down_Off" + image_selected="Movement_Down_Off" + top="0" + left_pad="3" + height="20" + width="20" + tab_stop="false" /> + <icon + name="btn_lock" + layout="topleft" + follows="top|right" + image_name="Lock2" + top="0" + left_pad="3" + height="20" + width="20" /> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_unselected="Icon_Gear_Background" + image_selected="Icon_Gear_Background" + top="0" + left_pad="3" + height="20" + width="20" + tab_stop="false" /> + <panel + background_visible="true" + bg_alpha_color="0.4 0.4 0.4 1.0" + bottom="0" + follows="left|right|top" + height="1" + layout="bottomleft" + left="0" + name="wearable_type_separator_panel" + visible="false" + width="380"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml new file mode 100644 index 0000000000..86b9ea6e14 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + bg_alpha_color="DkGray" + border="false" + follows="all" + height="200" + left="0" + name="cof_wearables" + width="311"> + <accordion + follows="all" + height="200" + layout="topleft" + left="0" + single_expansion="true" + top="0" + name="cof_wearables_accordion" + background_visible="true" + bg_alpha_color="DkGray2" + width="311"> + <accordion_tab + layout="topleft" + name="tab_attachments" + title="Attachments"> + <flat_list_view + allow_select="true" + follows="all" + height="10" + layout="topleft" + left="0" + name="list_attachments" + top="0" + width="311" /> + </accordion_tab> + <accordion_tab + layout="topleft" + name="tab_clothing" + title="Clothing"> + + <!-- *NOTE there should be no any gaps between the button bar and the list - + accordiong-list adaptor won't employ them while calculating new height when the size of the list changes --> + <panel + background_visible="false" + class="accordion_list_adaptor" + follows="all" + height="45" + layout="topleft" + left="0" + name="button_bar_adaptor" + top="0" + width="311"> + <panel + bevel="none" + filename="panel_clothing_list_button_bar.xml" + height="35" + name="button_bar" + top="0" + width="311" /> + <flat_list_view + allow_select="true" + follows="all" + height="10" + layout="topleft" + left="0" + name="list_clothing" + top_pad="0" + width="311" /> + </panel> + </accordion_tab> + <accordion_tab + layout="topleft" + name="tab_body_parts" + title="Body Parts"> + + <!-- *NOTE there should be no any gaps between the button bar and the list - + accordiong-list adaptor won't employ them while calculating new height when the size of the list changes --> + <panel + background_visible="false" + class="accordion_list_adaptor" + follows="all" + height="45" + layout="topleft" + left="0" + name="button_bar_adaptor" + top="0" + width="311"> + <panel + bevel="none" + filename="panel_bodyparts_list_button_bar.xml" + height="35" + name="button_bar" + top="0" + width="311"/> + <flat_list_view + allow_select="true" + follows="all" + height="10" + layout="topleft" + left="0" + name="list_body_parts" + top_pad="0" + width="311" /> + </panel> + </accordion_tab> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..2f37b9d3c9 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="23" + layout="topleft" + left="0" + name="deletable_wearable_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <button + name="btn_delete" + layout="topleft" + follows="top|left" + image_unselected="Toast_CloseBtn" + image_selected="Toast_CloseBtn" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <icon + height="16" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left_pad="3" + name="item_icon" + top="2" + width="16" /> + <text + follows="left|right" + height="16" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="white" + top="4" + value="..." + width="359" /> + <panel + background_visible="true" + bg_alpha_color="0.4 0.4 0.4 1.0" + bottom="0" + follows="left|right|top" + height="1" + layout="bottomleft" + left="0" + name="wearable_type_separator_panel" + visible="true" + width="380"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..c5a60ced88 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="22" + layout="topleft" + left="0" + name="dummy_clothing_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <icon + height="16" + color="0.75 0.75 0.75 1" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left="20" + name="item_icon" + top="2" + width="16" /> + <text + follows="left|right" + height="16" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="LtGray_50" + top="4" + value="..." + width="359" /> + <button + name="btn_add" + layout="topleft" + follows="top|right" + label="+" + top="0" + left="0" + height="20" + width="20" + tab_stop="false" /> + <panel + background_visible="true" + bg_alpha_color="0.4 0.4 0.4 1.0" + bottom="0" + follows="left|right|top" + height="1" + layout="bottomleft" + left="0" + name="wearable_type_separator_panel" + width="380"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml index 1d0c0a02b0..cfcdc25f81 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml @@ -32,7 +32,10 @@ name="Lower Alpha" tool_tip="Click to choose a picture" top="10" - width="94" /> + width="94" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <check_box control_name="LowerAlphaTextureInvisible" follows="left" @@ -53,7 +56,10 @@ name="Upper Alpha" tool_tip="Click to choose a picture" top="10" - width="94" /> + width="94"> + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <check_box control_name="UpperAlphaTextureInvisible" follows="left" @@ -74,7 +80,10 @@ name="Head Alpha" tool_tip="Click to choose a picture" top="120" - width="94" /> + width="94" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <check_box control_name="HeadAlphaTextureInvisible" follows="left" @@ -95,7 +104,10 @@ name="Eye Alpha" tool_tip="Click to choose a picture" top="120" - width="94" /> + width="94" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <check_box control_name="Eye AlphaTextureInvisible" follows="left" @@ -116,7 +128,10 @@ name="Hair Alpha" tool_tip="Click to choose a picture" top="230" - width="94" /> + width="94" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <check_box control_name="HairAlphaTextureInvisible" follows="left" diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml index f11ef43c76..4149a0b06f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml @@ -32,8 +32,11 @@ name="Iris" tool_tip="Click to choose a picture" top="10" - width="64" /> - </panel> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> + </panel> <panel border="false" bg_alpha_color="DkGray2" 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 7d8eed5085..94fd2f9080 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,9 +46,12 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> - </panel> - <panel + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> + </panel> + <panel border="false" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml index cd81aa2c4f..9b60e83387 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml @@ -32,8 +32,11 @@ name="Texture" tool_tip="Click to choose a picture" top="10" - width="64" /> - </panel> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> + </panel> <panel border="false" bg_alpha_color="DkGray2" 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 ba03865937..248ae9fe04 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml @@ -32,7 +32,10 @@ name="Upper Fabric" tool_tip="Click to choose a picture" top="10" - width="74" /> + width="74" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -44,7 +47,10 @@ name="Lower Fabric" tool_tip="Click to choose a picture" top="10" - width="74" /> + width="74" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -55,7 +61,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="74" /> + width="74" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" 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 5b02d1f968..3ed1df2399 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index e1c574001a..76842e5279 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -8,54 +8,19 @@ name="edit_shape_panel" top_pad="10" width="333" > - <panel - border="false" - bg_alpha_color="DkGray2" - bg_opaque_color="DkGray2" - background_visible="true" - background_opaque="true" + <text follows="top|left|right" - height="50" - left="10" + font="SansSerifSmallBold" + halign="right" + height="12" layout="topleft" - name="avatar_sex_panel" + left="0" + name="avatar_height" + text_color="EmphasisColor" top="0" - width="313" > - <text - follows="top|left" - height="16" - layout="topleft" - left="10" - name="gender_text" - width="313"> - Gender: - </text> - <radio_group - follows="left|top|right" - left="10" - height="28" - layout="topleft" - name="sex_radio" - top_pad="3" - width="303" > - <radio_item - follows="all" - height="16" - label="Female" - layout="topleft" - left="10" - name="radio" - width="82" /> - <radio_item - follows="all" - height="16" - label="Male" - layout="topleft" - left_pad="10" - name="radio2" - width="82" /> - </radio_group> - </panel> + width="310"> + [HEIGHT] Meters tall + </text> <panel border="false" bg_alpha_color="DkGray2" @@ -63,17 +28,17 @@ background_visible="true" background_opaque="true" follows="all" - height="345" + height="388" label="Shirt" layout="topleft" left="10" name="accordion_panel" - top_pad="10" + top_pad="0" width="313"> <accordion layout="topleft" follows="all" - height ="345" + height ="388" left="0" name="wearable_accordion" top="0" 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 7da8de4c0b..e088aa05ac 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" 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 84fe26f7f6..e079047a86 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml index b5c8c95473..9158685c40 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml @@ -33,7 +33,10 @@ name="Head Tattoos" tool_tip="Click to choose a picture" top="10" - width="74" /> + width="74" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -46,7 +49,10 @@ name="Upper Tattoos" tool_tip="Click to choose a picture" top="10" - width="74" /> + width="74" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -59,8 +65,11 @@ name="Lower Tattoos" tool_tip="Click to choose a picture" top="10" - width="74" /> - </panel> + width="74" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> + </panel> <panel border="false" bg_alpha_color="DkGray2" 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 16f6950bd5..87f3270b31 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" 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 e4f916703b..5bd99969a2 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" 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 d43497c943..bbe5230341 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" 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 45c6ef4526..a79c1b9eaa 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml @@ -32,7 +32,10 @@ name="Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="64" > + <texture_picker.commit_callback + function="TexturePicker.Commit" /> + </texture_picker> <color_swatch can_apply_immediately="true" follows="left|top" @@ -43,7 +46,10 @@ name="Color/Tint" tool_tip="Click to open Color Picker" top="10" - width="64" /> + width="64" > + <color_swatch.commit_callback + function="ColorSwatch.Commit" /> + </color_swatch> </panel> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index dc2f085356..afcd4550ca 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -165,12 +165,59 @@ left="0" width="313"> <text follows="top|left|right" + font="SansSerifSmallBold" height="16" layout="topleft" left="10" name="description_text" + text_color="white" + top="10" value="Shape:" - width="303" /> + width="150" /> + <radio_group + follows="left|top|right" + left="210" + height="20" + layout="topleft" + name="sex_radio" + top="5" + width="110"> + <radio_item + follows="all" + height="16" + label="" + layout="topleft" + left="0" + name="sex_male" + tool_tip="Male" + width="40" /> + <radio_item + follows="all" + height="16" + label="" + layout="topleft" + left_pad="10" + name="sex_female" + tool_tip="Female" + width="40" /> + </radio_group> + <!-- graphical labels for the radio buttons above --> + <icon + height="16" + image_name="icons/Male.png" + left="230" + name="male_icon" + tool_tip="Male" + top="7" + width="16" /> + <icon + height="16" + image_name="icons/Female.png" + name="female_icon" + left="280" + tool_tip="Female" + top="7" + width="16" /> <text_editor follows="all" height="23" @@ -178,6 +225,7 @@ left="0" layout="topleft" max_length="300" name="description" + top_pad="3" width="290" /> </panel> <panel @@ -186,8 +234,10 @@ left="0" layout="topleft" left="0" name="edit_subpanel_container" - top_pad="10" + top_pad="2" width="333"> + <!-- the shape editing panel is taller than the others + because it also displays avatar height --> <panel filename="panel_edit_shape.xml" follows="all" @@ -201,141 +251,141 @@ left="0" <panel filename="panel_edit_skin.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_skin_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_hair.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_hair_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_eyes.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_eyes_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_shirt.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_shirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_pants.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_pants_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_shoes.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_shoes_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_socks.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_socks_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_jacket.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_jacket_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_skirt.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_skirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_gloves.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_gloves_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_undershirt.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_undershirt_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_underpants.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_underpants_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_alpha.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_alpha_panel" - top="0" + top="8" visible="false" width="333" /> <panel filename="panel_edit_tattoo.xml" follows="all" - height="400" + height="392" layout="topleft" left="0" name="edit_tattoo_panel" - top="0" + top="8" visible="false" width="333" /> </panel> 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 aa7d621e4c..c1dc2aaaf7 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 @@ -36,7 +36,7 @@ layout="topleft" name="speakers_list" opaque="false" - show_info_btn="false" + show_info_btn="true" show_profile_btn="false" show_speaking_indicator="false" width="145" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 9341d433e8..e79ae34627 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -28,6 +28,7 @@ Hover your mouse over the options for more help. width="304" layout="topleft"> <texture_picker + default_image_name="Generic_Group_Large" follows="left|top" height="110" label="" diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index 7996a89e72..76f7484c68 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -17,6 +17,10 @@ You don't have permission to view group owned land </panel.string> <panel.string + name="epmty_view_group_land_text"> + No entries + </panel.string> + <panel.string name="cant_view_group_accounting_text"> You don't have permission to view the group's accounting information. </panel.string> @@ -262,6 +266,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="200" @@ -286,6 +291,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="185" @@ -329,6 +335,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="185" 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 479629f6ea..19fe2ea874 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -210,9 +210,23 @@ Maximum 200 per group daily <button follows="left|top" layout="topleft" + left="20" + top_delta="50" + height="23" + width="100" + name="open_inventory" + label="Inventory" + tool_tip="Open Inventory"> + <button.init_callback + function="Button.SetFloaterToggle" + parameter="inventory"/> + </button> + <button + follows="left|top" + layout="topleft" left="140" name="remove_attachment" - top_delta="50" + top_delta="0" height="18" image_selected="TrashItem_Press" image_unselected="TrashItem_Off" @@ -230,7 +244,7 @@ Maximum 200 per group daily name="send_notice" width="100" /> <group_drop_target - height="95" + height="75" top="160" left="10" layout="topleft" 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 29c6a17c31..33a5e01e4c 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 @@ -3,14 +3,14 @@ border="false" height="300" name="panel_im_control_panel" - width="110"> + width="119"> <avatar_icon follows="left|top" height="105" left_delta="5" name="avatar_icon" top="-5" - width="105"/> + width="114"/> <layout_stack mouse_opaque="false" border_size="0" @@ -22,7 +22,7 @@ name="button_stack" orientation="vertical" top_pad="5" - width="105"> + width="114"> <layout_panel mouse_opaque="false" auto_resize="true" @@ -31,7 +31,7 @@ layout="topleft" left="2" min_height="0" - width="100" + width="109" top="0" name="spacer" user_resize="false" /> @@ -41,7 +41,7 @@ height="20" layout="topleft" min_height="20" - width="100" + width="109" name="view_profile_btn_panel" user_resize="false"> <button @@ -50,7 +50,7 @@ label="Profile" name="view_profile_btn" top="0" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -58,7 +58,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="add_friend_btn_panel" user_resize="false"> <button @@ -67,7 +67,7 @@ label="Add Friend" name="add_friend_btn" top="5" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -75,7 +75,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="teleport_btn_panel" user_resize="false"> <button @@ -85,7 +85,7 @@ label="Teleport" name="teleport_btn" tool_tip = "Offer to teleport this person" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -93,7 +93,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="share_btn_panel" user_resize="false"> <button @@ -102,7 +102,7 @@ height="23" label="Share" name="share_btn" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -110,7 +110,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="pay_btn_panel" user_resize="false"> <button @@ -119,7 +119,7 @@ height="23" label="Pay" name="pay_btn" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -127,7 +127,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="call_btn_panel" user_resize="false"> <button @@ -135,7 +135,7 @@ height="23" label="Call" name="call_btn" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -143,7 +143,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="end_call_btn_panel" user_resize="false" visible="false"> @@ -152,7 +152,7 @@ height="23" label="End Call" name="end_call_btn" - width="100" /> + width="109" /> </layout_panel> <layout_panel auto_resize="false" @@ -160,7 +160,7 @@ height="25" layout="topleft" min_height="25" - width="100" + width="109" name="voice_ctrls_btn_panel" user_resize="false" visible="false"> @@ -169,7 +169,7 @@ height="23" label="Voice Controls" name="voice_ctrls_btn" - width="100" /> + width="109" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_inventory_item.xml b/indra/newview/skins/default/xui/en/panel_inventory_item.xml new file mode 100644 index 0000000000..f1b7b92ece --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_inventory_item.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="top|right|left" + height="20" + layout="topleft" + left="0" + name="inventory_item" + top="0" + width="380"> + <icon + follows="top|right|left" + height="20" + image_name="ListItem_Over" + layout="topleft" + left="0" + name="hovered_icon" + top="0" + visible="false" + width="380" /> + <icon + height="20" + follows="top|right|left" + image_name="ListItem_Select" + layout="topleft" + left="0" + name="selected_icon" + top="0" + visible="false" + width="380" /> + <icon + height="16" + follows="top|left" + image_name="Inv_Object" + layout="topleft" + left="0" + name="item_icon" + top="0" + width="16" /> + <text + follows="left|right" + height="20" + layout="topleft" + left_pad="5" + allow_html="false" + use_ellipses="true" + name="item_name" + text_color="white" + top="4" + value="..." + width="359" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 01adc00e1a..a86762f53d 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -56,42 +56,23 @@ height="80"> follows="left|bottom" font="SansSerifSmall" height="16" -name="first_name_text" +name="username_text" top="20" left="20" width="150"> -First name: +Username: </text> <line_editor follows="left|bottom" height="22" -label="First" +label="Username" left_delta="0" max_length="31" -name="first_name_edit" +name="username_edit" select_on_focus="true" -tool_tip="[SECOND_LIFE] First Name" +tool_tip="[SECOND_LIFE] Username" top_pad="0" - width="135" /> - <text - follows="left|bottom" - font="SansSerifSmall" - height="16" - left_pad="8" - name="last_name_text" - top="20" - width="150"> - Last name: </text> -<line_editor -follows="left|bottom" -height="22" -label="Last" -max_length="31" -name="last_name_edit" -select_on_focus="true" -tool_tip="[SECOND_LIFE] Last Name" - top_pad="0" - width="135" /> +width="150" /> <text follows="left|bottom" font="SansSerifSmall" @@ -104,6 +85,7 @@ top="20" </text> <line_editor follows="left|bottom" +handle_edit_keys_directly="true" height="22" max_length="16" name="password_edit" @@ -167,6 +149,7 @@ allow_text_entry="true" font="SansSerifSmall" follows="left|right|bottom" height="23" + max_chars="256" layout="topleft" top_pad="2" name="server_combo" @@ -201,7 +184,7 @@ height="16" name="forgot_password_text" top_pad="12" right="-10" - width="210"> + width="180"> Forgot your name or password? </text> <text @@ -213,7 +196,7 @@ height="16" name="login_help" top_pad="2" right="-10" - width="190"> + width="180"> Need help logging in? </text> <!-- <text follows="right|bottom" 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 27d66945d9..d65b86f007 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -3,7 +3,7 @@ background_visible="true" default_tab_group="1" follows="all" - height="408" + height="423" label="Things" layout="topleft" min_height="350" @@ -48,7 +48,7 @@ left="10" max_length="300" name="inventory search editor" - top="3" + top="18" width="303" /> <tab_container bg_alpha_color="DkGray" @@ -84,7 +84,7 @@ sort_order_setting="InventorySortOrder" top="16" width="288" /> - <inventory_panel + <recent_inventory_panel bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" @@ -100,62 +100,94 @@ name="Recent Items" width="290" /> </tab_container> - - <panel - background_visible="true" + <layout_stack + animate="false" + background_visible="true" bevel_style="none" + border_size="0" follows="left|right|bottom" - height="27" + height="25" layout="topleft" - top_pad="-1" + orientation="horizontal" + top_pad="0" left="10" name="bottom_panel" - width="310"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="25" - image_hover_unselected="Toolbar_Left_Over" - image_overlay="OptionsMenu_Off" - image_selected="Toolbar_Left_Selected" - image_unselected="Toolbar_Left_Off" - layout="topleft" - left="0" - name="options_gear_btn" - top="1" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="add_btn" - tool_tip="Add new item" - width="31" /> - <icon - follows="bottom|left" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="209" - /> - <dnd_button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Right_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Right_Selected" - image_unselected="Toolbar_Right_Off" - left_pad="1" - layout="topleft" - name="trash_btn" - tool_tip="Remove selected item" - width="31"/> - </panel> + width="307"> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="options_gear_btn_panel" + width="32"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="options_gear_btn" + top="0" + width="31" /> + </layout_panel> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="add_btn_panel" + width="32"> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left="0" + name="add_btn" + tool_tip="Add new item" + top="0" + width="31" /> + </layout_panel> + <layout_panel + auto_resize="true" + height="25" + layout="topleft" + name="dummy_panel" + width="212"> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Middle_Off" + layout="topleft" + left="0" + top="0" + name="dummy_icon" + width="211" /> + </layout_panel> + <layout_panel + auto_resize="false" + height="25" + layout="topleft" + name="trash_btn_panel" + width="31"> + <dnd_button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Right_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Right_Selected" + image_unselected="Toolbar_Right_Off" + left="0" + layout="topleft" + name="trash_btn" + tool_tip="Remove selected item" + top="0" + width="31"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 5e41d65720..841a4f5713 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -401,14 +401,6 @@ name="edit_profile_btn" tool_tip="Edit your personal information" width="152" /> - <button - follows="bottom|right" - height="23" - label="Edit Appearance" - left_pad="3" - name="edit_appearance_btn" - tool_tip="Create/edit your appearance: physical data, clothes and etc." - width="153" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 1d99de1fa7..5dbd8bfe6a 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -16,10 +16,11 @@ label="Click here to chat." layout="topleft" left_delta="3" - text_pad_right="25" left="0" - max_length="512" + max_length="1024" name="chat_box" + text_pad_left="5" + text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="2" width="283" /> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index ff2aae645b..f5a78fc929 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -7,7 +7,7 @@ background_opaque="true" background_visible="true" layout="topleft" - width="270" + width="328" height="230" name="nearby_media" help_topic="nearby_media"> @@ -29,7 +29,7 @@ follows="left" tool_tip="Turn all nearby media off" left="8" - width="66" + width="95" height="22" label="Stop All"> <button.commit_callback @@ -40,7 +40,7 @@ follows="left" tool_tip="Turn all nearby media on" left_pad="4" - width="66" + width="95" height="22" label="Start All"> <button.commit_callback diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index bc37af0319..7961664516 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -15,6 +15,12 @@ <string name="No Outfit" value="No Outfit"/> + <string + name="unsaved_changes" + value="Unsaved Changes"/> + <string + name="now_editing" + value="Now Editing"/> <panel.string name="not_available"> @@ -30,6 +36,20 @@ <string name="Filter.Clothes/Body" value="Clothes/Body"/> <string name="Filter.Objects" value="Objects"/> + <!-- + TODO remove this button. Added it temporary for QA to be able to test new edit wearable + panel (see EXT-6564) + --> + <button + follows="left|top|right" + height="20" + label="edit" + left="0" + top="0" + layout="topleft" + name="edit_wearable_btn" + width="40" /> + <button follows="top|left" height="23" @@ -55,19 +75,21 @@ <!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" --> <panel + background_visible="true" + bg_alpha_color="DkGray2" bevel_style="none" follows="top|left|right" - height="45" + height="40" label="bottom_panel" layout="topleft" - left="5" + left="6" name="header_panel" top_pad="5" - width="300"> + width="311"> <icon follows="left|top" height="40" - image_name="t-shirt-image" + image_name="TabIcon_Appearance_Off" left="2" mouse_opaque="false" name="outfit_icon" @@ -78,35 +100,35 @@ <panel bevel_style="none" follows="top|right" - height="40" + height="38" label="bottom_panel" layout="topleft" - left_pad="10" + left_pad="5" name="outfit_name_and_status" top="2" - width="200"> + width="270"> <text follows="top|left|right" - font="SansSerif" + font="SansSerifSmallBold" height="13" layout="topleft" name="status" - text_color="Green" - top="0" - value="Editing..." + text_color="EmphasisColor" + top="2" + value="Now editing..." use_ellipses="true" - width="275" /> + width="270" /> <text follows="bottom|left|right" - font="SansSerifHugeBold" + font="SansSerifLargeBold" height="26" layout="topleft" name="curr_outfit_name" text_color="LtGray" - top_pad="0" + top_pad="2" value="[Current Outfit]" use_ellipses="true" - width="275" /> + width="270" /> </panel> </panel> @@ -116,60 +138,39 @@ animate="false" default_tab_group="2" follows="all" - height="470" - width="300" + height="495" + width="313" layout="topleft" orientation="vertical" name="im_panels" tab_group="1" - top_pad="10" + top_pad="5" left="5"> <layout_panel layout="topleft" - follows="left|top|right" height="220" label="IM Control Panel" min_height="100" name="outfit_wearables_panel" - width="300" + width="313" auto_resize="true" user_resize="true"> - <scroll_list - width="300" - column_padding="0" - draw_heading="false" - draw_stripes="false" + <!-- List containing items from the COF and Base outfit --> + <panel + background_visible="false" + class="cof_wearables" + filename="panel_cof_wearables.xml" follows="left|top|right|bottom" - layout="topleft" - name="look_items_list" - search_column="1" - sort_column="2" - left="0" height="193" - top="0"> - <scroll_list.columns - label="Look Item" - name="look_item" - width="285" /> - <scroll_list.columns - label="Outfit Item Sort" - width="0" - sort_column="look_item_sort" - name="look_item_sort" /> - </scroll_list> - <!-- TODO remove this button. Added it temporary for QA to be able to test new edit wearable panel (see EXT-6564)--> - <button - follows="left|top|right" - height="20" - label="edit" - left="0" - top="0" - layout="topleft" - name="edit_wearable_btn" - width="40" /> + layout="topleft" + left="1" + name="cof_wearables_list" + top="0" + width="311" /> - <panel + <!-- Button bar --> + <panel background_visible="true" bevel_style="none" follows="bottom|left|right" @@ -178,8 +179,8 @@ layout="topleft" left="0" name="edit_panel" - top_pad="0" - width="300"> + top="193" + width="313"> <button follows="bottom|left" height="25" @@ -192,43 +193,14 @@ name="gear_menu_btn" top="1" width="31" /> - <button - is_toggle="true" - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="add_btn" - top="1" - width="31" /> - <button - follows="bottom|left" + <icon + follows="bottom|left|right" height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" + image_name="Toolbar_Right_Off" layout="topleft" left_pad="1" - name="new_btn" - top="1" - width="31" /> - <button - follows="bottom|right" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - layout="topleft" - name="remove_from_outfit_btn" - right="-1" - top="1" - width="31" /> + name="dummy_right_icon" + width="281" /> </panel> </layout_panel> @@ -239,104 +211,124 @@ height="210" min_height="210" name="add_wearables_panel" - width="300" + width="313" tab_group="2" user_resize="true" visible="false"> - - <!-- *NOTE is not used, invisible and disabled --> - <filter_editor - background_image="TextField_Search_Off" - enabled="false" - follows="left|top|right" - font="SansSerif" - label="Filter" + <text + follows="top|left|right" + font="SansSerifBold" + height="13" layout="topleft" left="5" - width="290" + name="add_to_outfit_label" + text_color="LtGray" + top="3" + value="Add to Outfit:" + use_ellipses="true" + width="150" /> + <button + follows="top|left|right" height="20" - name="look_item_filter" - text_color="black" - text_pad_left="25" - visible="false"/> + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + is_toggle="true" + label="O" + layout="topleft" + left_pad="5" + name="filter_button" + top="3" + width="20" /> + <combo_box + follows="top|left|right" + height="20" + layout="topleft" + right="-5" + name="filter_wearables_combobox" + top="2" + width="110"/> <layout_stack animate="true" follows="all" - height="25" - width="300" + height="155" + width="311" layout="topleft" - orientation="horizontal" name="filter_panels" - top="0" + top_pad="5" left="0"> <layout_panel + auto_resize="true" layout="topleft" follows="left|top|right" - height="25" + height="30" label="IM Control Panel" - name="filter_button_panel" - width="150" - auto_resize="true" - user_resize="false"> - <text - follows="top|left|right" - font="SansSerifBold" - height="13" - layout="topleft" - left="5" - name="add_to_outfit_label" - text_color="LtGray" - top="3" - value="Add to Outfit:" - use_ellipses="true" - width="270" /> - <button - follows="top|right" - height="20" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - is_toggle="true" - label="O" - layout="topleft" - right="-1" - name="filter_button" - top="3" - width="20" /> + name="filter_panel" + width="311" + user_resize="false" + visible="false"> + <filter_editor + background_image="TextField_Search_Off" + enabled="true" + follows="left|top|right" + font="SansSerif" + label="Filter" + layout="topleft" + left="5" + width="290" + height="25" + name="look_item_filter" + text_color="black" + text_pad_left="25" + visible="true"/> </layout_panel> <layout_panel auto_resize="true" - height="25" + height="145" min_width="130" - name="filter_combobox_panel" - width="150" - user_resize="false" - visible="false"> - <combo_box - follows="top|left|right" - height="20" - layout="topleft" - right="-5" - name="filter_wearables_combobox" - top="0" - width="130"/> + name="inventory_panel" + width="311" + user_resize="true"> + <inventory_panel + allow_multi_select="false" + border="false" + follows="left|top|right|bottom" + height="130" + layout="topleft" + left="0" + mouse_opaque="false" + name="inventory_items" + top_pad="5" + width="311" + visible="false"/> + <panel + name="filtered_wearables_panel" + background_opaque="true" + background_visible="true" + layout="topleft" + follows="left|top|right|bottom" + border="false" + height="130" + left="0" + mouse_opaque="false" + width="311" + top_delta="0" + visible="true"> + <wearable_items_list + name="filtered_wearables_list" + allow_select="true" + layout="topleft" + follows="all" + width="311" + height="130" + left="0" + top="0"/> + </panel> </layout_panel> </layout_stack> - <inventory_panel - allow_multi_select="false" - border="false" - follows="left|top|right|bottom" - height="155" - layout="topleft" - left="0" - mouse_opaque="false" - name="inventory_items" - top_pad="5" - width="300"/> - <panel background_visible="true" bevel_style="none" @@ -367,6 +359,7 @@ image_overlay="" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" + is_toggle="true" label="F" layout="topleft" left_pad="1" @@ -380,6 +373,7 @@ image_overlay="" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" + is_toggle="true" label="L" layout="topleft" left_pad="1" @@ -407,25 +401,28 @@ follows="left|right|bottom" height="30" layout="topleft" - left="5" - top_pad="10" + left="4" + top_pad="2" name="save_revert_button_bar" width="300"> <button - follows="bottom|left|right" + follows="bottom|left" height="23" label="Save" left="0" layout="topleft" name="save_btn" - width="145" /> + top="0" + width="155" /> <button - follows="bottom|right" + follows="bottom|left" height="23" name="save_flyout_btn" label="" + layout="topleft" left_pad="-20" tab_stop="false" + top="0" image_selected="SegmentedBtn_Right_Selected_Press" image_unselected="SegmentedBtn_Right_Off" image_pressed="SegmentedBtn_Right_Press" @@ -435,10 +432,11 @@ <button follows="bottom|left|right" height="23" - left_pad="15" + left_pad="12" label="Revert" layout="topleft" name="revert_btn" - width="145" /> + top="0" + width="147" /> </panel> </panel> 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 66ed43efec..9e59651bd1 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -5,7 +5,7 @@ background_opaque="true" background_visible="true" follows="all" - height="570" + height="575" label="Things" layout="topleft" min_height="350" @@ -14,7 +14,7 @@ border="false"> <tab_container follows="all" - height="501" + height="509" layout="topleft" left="7" name="appearance_tabs" @@ -22,21 +22,18 @@ tab_height="30" tab_position="top" halign="center" + top="8" width="312"> - <inventory_panel + <panel + class="outfits_list" + filename="panel_outfits_list.xml" + height="490" + name="outfitslist_tab" background_visible="true" - background_opaque="true" - label="MY OUTFITS" - help_topic="my_outfits_tab" - allow_multi_select="true" follows="all" - border="false" - left="0" - top="0" - width="315" - mouse_opaque="true" - name="outfitslist_tab" - start_folder="My Outfits" /> + label="MY OUTFITS" + layout="topleft" + width="315" /> <inventory_panel follows="all" background_visible="true" @@ -54,8 +51,8 @@ </tab_container> <panel background_visible="true" - follows="bottom|left" - height="73" + follows="bottom|left|right" + height="57" layout="topleft" left="9" top_pad="-1" @@ -76,7 +73,7 @@ top="1" width="31" /> <icon - follows="bottom|left" + follows="bottom|left|right" height="25" image_name="Toolbar_Middle_Off" layout="topleft" @@ -86,7 +83,7 @@ /> <dnd_button - follows="bottom|left" + follows="bottom|right" height="25" image_hover_unselected="Toolbar_Right_Over" image_overlay="TrashItem_Off" @@ -108,7 +105,7 @@ left="0" width="153" /> <button - follows="bottom|right" + follows="bottom|left|right" height="23" label="Wear" layout="topleft" @@ -116,16 +113,6 @@ left_pad="3" tool_tip="Wear selected outfit" width="152" /> - <button - follows="bottom|left" - height="23" - label="Edit Outfit" - layout="topleft" - right="-140" - name="edit_current_outfit_btn" - top="26" - visible="false" - width="50" /> </panel> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml new file mode 100644 index 0000000000..5cf94c25d7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + bg_alpha_color="DkGray" + border="false" + follows="all" + height="400" + name="Outfits" + layout="topleft" + left="0" + top="0" + width="313"> + <accordion + background_visible="true" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + follows="all" + height="400" + layout="topleft" + left="3" + name="outfits_accordion" + top="0" + width="307"> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 8a4a28e188..b79ef1e287 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -12,30 +12,45 @@ top="0" width="333"> <string - name="no_people" + name="no_recent_people" value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> <string + name="no_filtered_recent_people" + value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." /> + <string name="no_one_near" value="No one nearby. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> <string + name="no_one_filtered_near" + value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." /> + <string name="no_friends_online" value="No friends online" /> <string name="no_friends" value="No friends" /> <string + name="no_friends_msg"> + Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. +Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. + </string> + <string + name="no_filtered_friends_msg"> + Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]. + </string> + <string name="people_filter_label" value="Filter People" /> <string name="groups_filter_label" value="Filter Groups" /> <!-- - *WORKAROUND: for group_list.no_groups_msg & group_list.no_filtered_groups_msg attributes. + *WORKAROUND: for group_list.no_items_msg & group_list.no_filtered_items_msg attributes. They are not defined as translatable in VLT. See EXT-5931 --> <string name="no_filtered_groups_msg" - value="Didn't find what you're looking for? Try [secondlife:///app/search/groups Search]." /> + value="Didn't find what you're looking for? Try [secondlife:///app/search/groups/[SEARCH_TERM] Search]." /> <string name="no_groups_msg" value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." /> @@ -259,14 +274,11 @@ <text follows="all" height="450" - left="10" - name="no_friends_msg" + left="13" + name="no_friends_help_text" top="10" width="293" - wrap="true"> - Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. -Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. - </text> + wrap="true" /> </panel> <panel background_opaque="true" @@ -287,6 +299,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M Values are set from appropriate strings at the top of file via LLPeoplePanel::postBuild() --> <group_list + allow_select="true" background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" @@ -451,7 +464,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="view_profile_btn" tool_tip="Show picture, groups, and other Residents information" top="0" - width="70" /> + width="67" /> <button follows="bottom|left" left_pad="3" @@ -460,7 +473,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="im_btn" tool_tip="Open instant message session" - width="43" /> + width="40" /> <button follows="bottom|left" left_pad="3" @@ -477,7 +490,8 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M label="Share" layout="topleft" name="share_btn" - width="62" /> + tool_tip="Share an inventory item" + width="65" /> <button follows="bottom|left" left_pad="3" 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 69e8e6fdcc..0129d97616 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -94,6 +94,16 @@ Automatic position for: name="appearance_camera_movement" tool_tip="Use automatic camera positioning while in edit mode" width="242" /> + <check_box + control_name="SidebarCameraMovement" + follows="left|top" + height="16" + initial_value="1" + label="Sidebar" + layout="topleft" + name="appearance_sidebar_positioning" + tool_tip="Use automatic camera positioning for sidebar" + width="242" /> <icon follows="left|top" height="18" 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 3ef16d2dec..ba967d3e2c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -330,7 +330,7 @@ <check_box enabled="false" height="16" - label="Enable plain text chat history" + label="Enable plain text IM and chat history" layout="topleft" left_delta="0" name="plain_text_chat_history" 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 500e65b916..2c6ceeef2e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -374,5 +374,5 @@ min_val="10" name="web_proxy_port" top_delta="0" - width="140" /> + width="145" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index a666608103..d7a601d7a3 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -389,14 +389,6 @@ name="edit_profile_btn" tool_tip="Edit your personal information" width="130" /> - <button - follows="bottom|right" - height="23" - label="Edit Appearance" - left_pad="10" - name="edit_appearance_btn" - tool_tip="Create/edit your appearance: physical data, clothes and etc." - width="130" /> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml index b48943c699..3effc9de89 100644 --- a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml +++ b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml @@ -6,7 +6,7 @@ name="panel_stand_stop_flying" mouse_opaque="false" visible="true" - width="115"> + width="113"> <button follows="left|bottom" height="19" @@ -16,7 +16,7 @@ tool_tip="Click here to stand up." top="2" visible="false" - width="115" /> + width="113" /> <button follows="left|bottom" height="19" @@ -26,5 +26,5 @@ tool_tip="Stop flying" top="2" visible="false" - width="115" /> + width="113" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_world_map.xml b/indra/newview/skins/default/xui/en/panel_world_map.xml index 9f08d3a817..16860a6117 100644 --- a/indra/newview/skins/default/xui/en/panel_world_map.xml +++ b/indra/newview/skins/default/xui/en/panel_world_map.xml @@ -45,6 +45,14 @@ name="world_map_northwest"> NW </panel.string> + <panel.string + name="world_map_person"> + 1 person + </panel.string> + <panel.string + name="world_map_people"> + [NUMBER] people + </panel.string> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 73650a19dc..6a3c148456 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -15,63 +15,93 @@ width="333"> <string name="No Outfit" value="No Outfit" /> + <string + name="Unsaved Changes" + value="Unsaved changes" /> + <string + name="Now Wearing" + value="Now wearing..." /> <panel - left="0" - top="0" - follows="all" + background_opaque="true" + background_visible="true" + bg_opaque_color="DkGray2" + left="10" + top="5" + follows="left|top|right" layout="topleft" - width="330" + width="303" height="33" name="panel_currentlook" > <button follows="left|top" - top="0" width="1" height="1" + left="205" top="7" width="20" height="20" + label="E" layout="topleft" - left="0" - name="editappearance_btn" /> + name="editappearance_btn" + visible="false" /> <button follows="left|top" - top="0" width="1" height="1" + left="235" top="7" width="20" height="20" + label="O" layout="topleft" - left="0" - name="openoutfit_btn" /> + name="openoutfit_btn" + visible="false" /> <icon follows="top|left" - height="24" + height="32" image_name="TabIcon_Appearance_Off" name="outfit_icon" mouse_opaque="false" visible="true" - left="9" + left="0" top="0" - width="24" /> + width="32" /> <text - font="SansSerifHugeBold" + font="SansSerifSmallBold" + text_color="EmphasisColor" + width="300" + height="10" + follows="top|left" + layout="topleft" + left="35" + top="3" + mouse_opaque="false" + name="currentlook_status" > + (Status) + </text> + <text + font="SansSerifLargeBold" height="20" - left_pad="5" - text_color="LtGray" - top="0" + left="35" + text_color="White" + top="15" use_ellipses="true" - width="305" + width="230" follows="top|left" - word_wrap="true" + word_wrap="false" mouse_opaque="false" name="currentlook_name"> MyOutfit With a really Long Name like MOOSE </text> - <text - font="SansSerifSmall" - text_color="White_50" - width="300" - height="1" - follows="top|left" + <button + follows="left|top" + height="20" + image_overlay="windows/Icon_Gear_Over.png" + label="" layout="topleft" - top_pad="5" - mouse_opaque="false" - name="currentlook_title" > - (unsaved) - </text> + left="265" + name="edit_outfit_btn" + top="7" + width="30" /> + <loading_indicator + follows="left|top" + height="24" + layout="topleft" + left="268" + name="wearables_loading_indicator" + top="6" + width="24" /> </panel> <filter_editor height="23" @@ -87,7 +117,7 @@ width="333"> class="panel_outfits_inventory" filename="panel_outfits_inventory.xml" name="panel_outfits_inventory" - height="505" + height="493" min_height="410" width="320" left="0" @@ -106,7 +136,7 @@ width="333"> <panel class="panel_outfit_edit" filename="panel_outfit_edit.xml" - height="550" + height="565" follows="all" layout="topleft" left="5" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index a480266b5a..6d80b17ac6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -46,6 +46,15 @@ <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string> <string name="LoginConnectingToRegion">Connecting to region...</string> <string name="LoginDownloadingClothing">Downloading clothing...</string> + <string name="InvalidCertificate">The server returned an invalid or corrupt certificate. Please contact the Grid administrator.</string> + <string name="CertInvalidHostname">An invalid hostname was used to access the server, please check your SLURL or Grid hostname.</string> + <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administr\ +ator.</string> + <string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string> + <string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string> + <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrat +or.</string> + <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string> <string name="LoginFailed">Login failed.</string> <string name="Quit">Quit</string> @@ -1802,6 +1811,20 @@ Clears (deletes) the media and all params from the given face. <string name="alpha">Alpha</string> <string name="tattoo">Tattoo</string> <string name="invalid">invalid</string> + + <!-- Not Worn Wearable Types --> + <string name="shirt_not_worn">Shirt not worn</string> + <string name="pants_not_worn">Pants not worn</string> + <string name="shoes_not_worn">Shoes not worn</string> + <string name="socks_not_worn">Socks not worn</string> + <string name="jacket_not_worn">Jacket not worn</string> + <string name="gloves_not_worn">Gloves not worn</string> + <string name="undershirt_not_worn">Undershirt not worn</string> + <string name="underpants_not_worn">Underpants not worn</string> + <string name="skirt_not_worn">Skirt not worn</string> + <string name="alpha_not_worn">Alpha not worn</string> + <string name="tattoo_not_worn">Tattoo not worn</string> + <string name="invalid_not_worn">invalid</string> <!-- Wearable List--> <string name="NewWearable">New [WEARABLE_ITEM]</string> @@ -1842,7 +1865,8 @@ Clears (deletes) the media and all params from the given face. <string name="LeaveMouselook">Press ESC to return to World View</string> <!-- inventory --> - <string name="InventoryNoMatchingItems">No matching items found in inventory. Try [secondlife:///app/search/groups "Search"].</string> + <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> + <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string> <!-- use value="" because they have preceding spaces --> @@ -2148,15 +2172,16 @@ Clears (deletes) the media and all params from the given face. <string name="BusyModeResponseDefault">The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string> <!-- Mute --> - <string name="MuteByName">(by name)</string> + <string name="MuteByName">(By name)</string> <string name="MuteAgent">(Resident)</string> - <string name="MuteObject">(object)</string> - <string name="MuteGroup">(group)</string> + <string name="MuteObject">(Object)</string> + <string name="MuteGroup">(Group)</string> + <string name="MuteExternal">(External)</string> <!-- Region/Estate Covenant --> <string name="RegionNoCovenant">There is no Covenant provided for this Estate.</string> <string name="RegionNoCovenantOtherOwner">There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not Linden Lab. Please contact the Estate Owner for sales details.</string> - <string name="covenant_last_modified">Last Modified:</string> + <string name="covenant_last_modified" value="Last Modified: " /> <!-- use value="" to keep the trailing space --> <string name="none_text" value=" (none) " /> <string name="never_text" value=" (never) " /> @@ -2897,6 +2922,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlBuildTooltip">Building/dropping objects not allowed</string> <string name="LocationCtrlScriptsTooltip">Scripts not allowed</string> <string name="LocationCtrlDamageTooltip">Health</string> + <string name="LocationCtrlAdultIconTooltip">Adult Region</string> + <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> + <string name="LocationCtrlGeneralIconTooltip">General Region</string> <!-- Strings used by the (currently Linux) auto-updater app --> <string name="UpdaterWindowTitle"> @@ -2930,6 +2958,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Failed to start viewer </string> + <!-- System Messages --> + <string name="ItemsComingInTooFastFrom">[APP_NAME]: Items coming in too fast from [FROM_NAME], automatic preview disabled for [TIME] seconds</string> + <string name="ItemsComingInTooFast">[APP_NAME]: Items coming in too fast, automatic preview disabled for [TIME] seconds</string> + <!-- IM system messages --> <string name="IM_logging_string">-- Instant message logging enabled --</string> <string name="IM_typing_start_string">[NAME] is typing...</string> @@ -2943,8 +2975,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <!-- voice calls --> <string name="answered_call">Your call has been answered</string> - <string name="started_call">Started a voice call</string> - <string name="joined_call">Joined the voice call</string> + <string name="you_started_call">You started a voice call</string> + <string name="you_joined_call">You joined the voice call</string> + <string name="name_started_call">[NAME] started a voice call</string> <string name="ringing-im"> Joining voice call... @@ -3108,5 +3141,9 @@ Abuse Report</string> <string name="AvatarBirthDateFormat">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string> <string name="DefaultMimeType">none/none</string> + <string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string> + + <!-- language specific white-space characters, delimiters, spacers, item separation symbols --> + <string name="sentences_separator" value=" "></string> </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml new file mode 100644 index 0000000000..6040d24128 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<loading_indicator + follows="left|top" + mouse_opaque="false" + name="loading_indicator" + rotations_per_sec="1.0" + tab_stop="false" +/> diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 1d61447e31..02ea661da3 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -6,6 +6,8 @@ <location_input font="SansSerifSmall" icon_maturity_general="Parcel_PG_Light" icon_maturity_adult="Parcel_R_Light" + icon_maturity_moderate="Parcel_M_Light" + maturity_help_topic="TODO" add_landmark_image_enabled="Favorite_Star_Active" add_landmark_image_disabled="Favorite_Star_Off" add_landmark_image_hover="Favorite_Star_Over" @@ -43,7 +45,7 @@ scale_image="false" top="19" left="-3" /> - <maturity_icon + <maturity_button name="maturity_icon" width="18" height="16" diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index cb1aa5eaa1..ebd0bdb3d7 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -43,19 +43,14 @@ Versión de Vivox: [VIVOX_VERSION] </panel> <panel label="Créditos" name="credits_panel"> <text_editor name="credits_editor"> - Te ofrecen Second Life Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les y muchos otros. + Te ofrecen Second Life Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain, y muchos otros. -Gracias a los siguientes Residentes por ayudarnos a estar seguros de que, hoy por hoy, esta es la mejor versión: (pendiente) +Gracias a estos Residentes por ayudarnos a estar seguros de que, con todo, esta es la mejor versión: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan, y muchos otros. - - - - -No es frecuente la mente que puede hacer que lo que hasta ahora no existÃa de pronto salte a la vista. Sà es frecuente -y engañoso- gritar 'A mà se me podÃa haber ocurrido eso', pero el hecho es que no se hizo, un hecho muy significativo y revelador. - -- Douglas Adams +"El trabajo sigue avanzando, la causa perdura, la esperanza aún vive, y los sueños no morirán jamás" - Edward Kennedy </text_editor> </panel> <panel label="Licencias" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index 6118a63872..f3a278945c 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -263,7 +263,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s <text left="204" name="selected_objects_text" width="48"> [COUNT] </text> - <text left="4" name="Autoreturn" width="412"> + <text name="Autoreturn"> Devolución automát. de objetos de otros (en min., 0 la desactiva): </text> <line_editor name="clean other time" right="-20"/> diff --git a/indra/newview/skins/default/xui/es/floater_animation_preview.xml b/indra/newview/skins/default/xui/es/floater_animation_preview.xml index a40d53a8a8..d57405f7e5 100644 --- a/indra/newview/skins/default/xui/es/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/es/floater_animation_preview.xml @@ -141,35 +141,35 @@ La duración máxima de una animación es de [MAX_LENGTH] segundos. Expresión </text> <combo_box name="emote_combo" tool_tip="Controla qué hace la cara durante la animación"> - <combo_box.item label="(ninguno)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Con miedo" name="Afraid"/> - <combo_box.item label="Enfado" name="Angry"/> - <combo_box.item label="Gran sonrisa" name="BigSmile"/> - <combo_box.item label="Aburrimiento" name="Bored"/> - <combo_box.item label="Llorar" name="Cry"/> - <combo_box.item label="Desdén" name="Disdain"/> - <combo_box.item label="Avergonzarse" name="Embarrassed"/> - <combo_box.item label="Fruncir el ceño" name="Frown"/> - <combo_box.item label="Beso" name="Kiss"/> - <combo_box.item label="ReÃr" name="Laugh"/> - <combo_box.item label="Sacar la lengua" name="Plllppt"/> - <combo_box.item label="Rechazo" name="Repulsed"/> - <combo_box.item label="Triste" name="Sad"/> - <combo_box.item label="Encogerse de hombros" name="Shrug"/> - <combo_box.item label="Sonrisa" name="Smile"/> - <combo_box.item label="Sorpresa" name="Surprise"/> - <combo_box.item label="Guiño" name="Wink"/> - <combo_box.item label="Preocupación" name="Worry"/> + <item label="(ninguno)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Con miedo" name="Afraid" value="Miedo"/> + <item label="Enfado" name="Angry" value="Enfado"/> + <item label="Gran sonrisa" name="BigSmile" value="Gran sonrisa"/> + <item label="Aburrimiento" name="Bored" value="Aburrimiento"/> + <item label="Llorar" name="Cry" value="Lloro"/> + <item label="Desdén" name="Disdain" value="Desdén"/> + <item label="Avergonzarse" name="Embarrassed" value="Vergüenza"/> + <item label="Fruncir el ceño" name="Frown" value="Fruncir el ceño"/> + <item label="Beso" name="Kiss" value="Beso"/> + <item label="ReÃr" name="Laugh" value="Risa"/> + <item label="Sacar la lengua" name="Plllppt" value="Sacar la lengua"/> + <item label="Rechazo" name="Repulsed" value="Rechazo"/> + <item label="Triste" name="Sad" value="Tristeza"/> + <item label="Encogerse de hombros" name="Shrug" value="Encogerse de hombros"/> + <item label="Sonrisa" name="Smile" value="Sonrisa"/> + <item label="Sorpresa" name="Surprise" value="Sorpresa"/> + <item label="Guiño" name="Wink" value="Guiño"/> + <item label="Preocupación" name="Worry" value="Preocupación"/> </combo_box> <text name="preview_label"> Vista previa mientras </text> <combo_box name="preview_base_anim" tool_tip="Compruebe cómo se comporta su animación a la vez que el avatar realiza acciones comunes."> - <combo_box.item label="De pie" name="Standing"/> - <combo_box.item label="Caminando" name="Walking"/> - <combo_box.item label="Sentado/a" name="Sitting"/> - <combo_box.item label="Volando" name="Flying"/> + <item label="De pie" name="Standing" value="De pie"/> + <item label="Caminando" name="Walking" value="Caminando"/> + <item label="Sentado/a" name="Sitting" value="Sentado"/> + <item label="Volando" name="Flying" value="Volando"/> </combo_box> <spinner label="Combinar (sec)" name="ease_in_time" tool_tip="Tiempo (en segundos) en el que se combinan las animaciones"/> <spinner label="Dejar de combinar (sec)" name="ease_out_time" tool_tip="Tiempo (en segundos) en el que dejan de combinarse las animaciones"/> diff --git a/indra/newview/skins/default/xui/es/floater_customize.xml b/indra/newview/skins/default/xui/es/floater_customize.xml index b7058d4314..77b670d5f0 100644 --- a/indra/newview/skins/default/xui/es/floater_customize.xml +++ b/indra/newview/skins/default/xui/es/floater_customize.xml @@ -81,7 +81,7 @@ <texture_picker label="Tatuaje: inferior" name="Lower Tattoos" tool_tip="Pulse para elegir una imagen" width="90"/> <button label="Crear una piel nueva" label_selected="Crear una piel nueva" name="Create New"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Pelo" name="Hair"> @@ -116,7 +116,7 @@ <texture_picker label="Textura" name="Texture" tool_tip="Pulse para elegir una imagen"/> <button label="Crear un pelo nuevo" label_selected="Crear un pelo nuevo" name="Create New"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Ojos" name="Eyes"> @@ -147,7 +147,7 @@ <texture_picker label="Iris" name="Iris" tool_tip="Pulse para elegir una imagen"/> <button label="Crear unos ojos nuevos" label_selected="Crear unos ojos nuevos" name="Create New"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <text label="Ropa" name="clothes_placeholder"> @@ -159,7 +159,7 @@ <button label="Quitarla" label_selected="Quitarla" name="Take Off"/> <button label="Crear una falda nueva" label_selected="Crear una falda nueva" name="Create New"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> <text name="title"> [DESC] @@ -192,7 +192,7 @@ <button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/> <button label="Crear unos pantalones nuevos" label_selected="Crear unos pantalones nuevos" name="Create New" width="185"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> <text name="title"> [DESC] @@ -249,7 +249,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Calcetines" name="Socks"> @@ -282,7 +282,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Chaqueta" name="Jacket"> @@ -316,7 +316,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarla" label_selected="Quitarla" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Guantes" name="Gloves"> @@ -349,7 +349,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarlos" label_selected="Quitarlos" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Camiseta" name="Undershirt"> @@ -382,7 +382,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarla" label_selected="Quitarla" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Ropa interior" name="Underpants"> @@ -415,7 +415,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarla" label_selected="Quitarla" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Falda" name="Skirt"> @@ -448,7 +448,7 @@ <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> <button label="Quitarla" label_selected="Quitarla" name="Take Off"/> <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> </panel> <panel label="Tatuaje" name="Tattoo"> diff --git a/indra/newview/skins/default/xui/es/floater_god_tools.xml b/indra/newview/skins/default/xui/es/floater_god_tools.xml index 73187f208b..218a5effe8 100644 --- a/indra/newview/skins/default/xui/es/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_god_tools.xml @@ -2,12 +2,11 @@ <floater name="godtools floater" title="HERRAMIENTAS DE DIOS"> <tab_container name="GodTools Tabs"> <panel label="Red" name="grid"> - <button label="Expulsar a todos los Residentes" label_selected="Expulsar a todos los Residentes" name="Kick all users"/> <button label="Vaciar los caches de visibilidad del mapa de la región" label_selected="Vaciar los caches de visibilidad del mapa de la región" name="Flush This Region's Map Visibility Caches"/> </panel> <panel label="Región" name="region"> - <text name="Sim Name:"> - Nombre del Sim: + <text name="Region Name:"> + Nombre de la región: </text> <check_box label="Preludio" name="check prelude" tool_tip="Defina esté para hacer un preludio de la región."/> <check_box label="Sol fijo" name="check fixed sun" tool_tip="Fijar la posición del sol (asà como en Región/Propiedad > Terreno."/> @@ -47,8 +46,8 @@ <button label="Guardado automático ahora" label_selected="Guardado automático ahora" name="Autosave now" tool_tip="Guardar estado con gzip en el directorio de guardado automático."/> </panel> <panel label="Objetos" name="objects"> - <text name="Sim Name:"> - Nombre del Sim: + <text name="Region Name:"> + Nombre de la región: </text> <text name="region name"> Galés diff --git a/indra/newview/skins/default/xui/es/floater_image_preview.xml b/indra/newview/skins/default/xui/es/floater_image_preview.xml index 0ad91265c9..84c5bfc824 100644 --- a/indra/newview/skins/default/xui/es/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/es/floater_image_preview.xml @@ -11,16 +11,16 @@ imagen como: </text> <combo_box label="Tipo de ropa" left="100" name="clothing_type_combo" width="186"> - <combo_box.item label="Imagen" name="Image"/> - <combo_box.item label="Pelo" name="Hair"/> - <combo_box.item label="Mujer: cabeza" name="FemaleHead"/> - <combo_box.item label="Mujer: parte superior del cuerpo" name="FemaleUpperBody"/> - <combo_box.item label="Mujer: parte inferior del cuerpo" name="FemaleLowerBody"/> - <combo_box.item label="Varón: cabeza" name="MaleHead"/> - <combo_box.item label="Varón: parte superior del cuerpo" name="MaleUpperBody"/> - <combo_box.item label="Varón: parte inferior del cuerpo" name="MaleLowerBody"/> - <combo_box.item label="Falda" name="Skirt"/> - <combo_box.item label="Prim sculpted" name="SculptedPrim"/> + <item label="Imagen" name="Image" value="Imagen"/> + <item label="Pelo" name="Hair" value="Pelo"/> + <item label="Mujer: cabeza" name="FemaleHead" value="Mujer: cabeza"/> + <item label="Mujer: parte superior del cuerpo" name="FemaleUpperBody" value="Mujer: parte superior del cuerpo"/> + <item label="Mujer: parte inferior del cuerpo" name="FemaleLowerBody" value="Mujer: parte inferior del cuerpo"/> + <item label="Varón: cabeza" name="MaleHead" value="Varón: cabeza"/> + <item label="Varón: parte superior del cuerpo" name="MaleUpperBody" value="Varón: parte superior del cuerpo"/> + <item label="Varón: parte inferior del cuerpo" name="MaleLowerBody" value="Varón: parte inferior del cuerpo"/> + <item label="Falda" name="Skirt" value="Falda"/> + <item label="Prim sculpted" name="SculptedPrim" value="Prim sculpted"/> </combo_box> <text name="bad_image_text"> Imposible leer la imagen. diff --git a/indra/newview/skins/default/xui/es/floater_outgoing_call.xml b/indra/newview/skins/default/xui/es/floater_outgoing_call.xml index e2a53693b5..5fd9dba9ac 100644 --- a/indra/newview/skins/default/xui/es/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/es/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Has sido desconectado de [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] ha colgado la llamada. [RECONNECT_NEARBY] + Tu llamada ha acabado. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Has finalizado la llamada. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/es/floater_snapshot.xml b/indra/newview/skins/default/xui/es/floater_snapshot.xml index febb51e5d6..151421c244 100644 --- a/indra/newview/skins/default/xui/es/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/es/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="VISTA PREVIA DE LA FOTO"> - <text name="type_label"> - Destino de la foto - </text> - <radio_group label="Tipo de la foto" name="snapshot_type_radio"> - <radio_item label="Correo-e" name="postcard"/> - <radio_item label="Mi inventario ([AMOUNT] L$)" name="texture"/> - <radio_item label="Guardar en mi ordenador" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Actualizar la foto" name="new_snapshot_btn"/> - <button label="Enviar" name="send_btn"/> - <button label="Guardar ([AMOUNT] L$)" name="upload_btn"/> - <flyout_button label="Guardar" name="save_btn" tool_tip="Guardar la imagen en un archivo"> - <flyout_button_item label="Guardar" name="save_item"/> - <flyout_button_item label="Guardar como..." name="saveas_item"/> - </flyout_button> - <button label="Cancelar" name="discard_btn"/> - <button label="Más" name="more_btn" tool_tip="Opciones avanzadas"/> - <button label="Menos" name="less_btn" tool_tip="Opciones avanzadas"/> - <text name="type_label2"> - Tamaño - </text> - <text name="format_label"> - Formato - </text> - <combo_box label="Resolución" name="postcard_size_combo"> - <combo_box.item label="Ventana actual" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Personalizar" name="Custom"/> - </combo_box> - <combo_box label="Resolución" name="texture_size_combo"> - <combo_box.item label="Ventana actual" name="CurrentWindow"/> - <combo_box.item label="Pequeño (128x128)" name="Small(128x128)"/> - <combo_box.item label="Medio (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Grande (512x512)" name="Large(512x512)"/> - <combo_box.item label="Personalizar" name="Custom"/> - </combo_box> - <combo_box label="Resolución" name="local_size_combo"> - <combo_box.item label="Ventana actual" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Personalizar" name="Custom"/> - </combo_box> - <combo_box label="Formato" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Ancho" label_width="41" name="snapshot_width" width="101"/> - <spinner label="Alto" label_width="30" left="121" name="snapshot_height" width="90"/> - <check_box label="Mantener las proporciones" name="keep_aspect_check"/> - <slider label="Calidad de la imagen" name="image_quality_slider"/> - <text name="layer_type_label"> - Captura: - </text> - <combo_box label="Capas de la imagen" name="layer_types"> - <combo_box.item label="Colores" name="Colors"/> - <combo_box.item label="Profundidad" name="Depth"/> - <combo_box.item label="Bandas negras" name="ObjectMattes"/> - </combo_box> - <check_box label="Interfaz" name="ui_check"/> - <check_box bottom_delta="-17" label="HUDs" name="hud_check"/> - <check_box bottom_delta="-17" label="Mantenerla abierta tras guardarla" name="keep_open_check"/> - <check_box bottom_delta="-17" label="Congelar la toma (pantalla completa)" name="freeze_frame_check"/> - <check_box bottom_delta="-29" label="Actualizar automáticamente" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Foto"> + <floater.string name="unknown"> desconocido - </string> + </floater.string> + <button label="Actualizar la foto" name="new_snapshot_btn"/> + <line_editor label="Descripción" name="description"/> + <button label="Compartir la foto" name="share"/> + <button label="Compartir en la web" name="share_to_web"/> + <button label="Guardar en mi inventario" name="save_to_inventory"/> + <button label="Guardar la foto" name="save"/> + <button label="Foto por correo-e" name="share_to_email"/> + <button label="Guardar en mi ordenador" name="save_to_computer"/> + <button label="Usar como imagen del perfil" name="set_profile_pic"/> + <button label="Atrás" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_tos.xml b/indra/newview/skins/default/xui/es/floater_tos.xml index 7dd91f29fa..f4a0897d73 100644 --- a/indra/newview/skins/default/xui/es/floater_tos.xml +++ b/indra/newview/skins/default/xui/es/floater_tos.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=" "> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Continuar" label_selected="Continuar" name="Continue"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> <check_box label="Acepto las Condiciones del servicio y la PolÃtica de privacidad" name="agree_chk"/> <text name="tos_heading"> Por favor, lee detenidamente las siguientes Condiciones del servicio y PolÃtica de privacidad. Debes aceptar el acuerdo para poder iniciar sesión en [SECOND_LIFE]. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <string name="real_url"> - http://secondlife.com/app/tos/ - </string> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml index 38a12002f5..c3a13980de 100644 --- a/indra/newview/skins/default/xui/es/floater_world_map.xml +++ b/indra/newview/skins/default/xui/es/floater_world_map.xml @@ -20,10 +20,10 @@ Venta de terreno </text> <text name="by_owner_label"> - por el propietario + por el dueño </text> <text name="auction_label"> - subasta de terreno + subasta </text> <button name="Go Home" tool_tip="Teleportar a mi Base"/> <text name="Home_label"> diff --git a/indra/newview/skins/default/xui/es/menu_attachment_other.xml b/indra/newview/skins/default/xui/es/menu_attachment_other.xml index 12acb572dc..00bdb74881 100644 --- a/indra/newview/skins/default/xui/es/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/es/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Denunciar" name="abuse"/> <menu_item_call label="Congelar" name="Freeze..."/> <menu_item_call label="Expulsar" name="Eject..."/> - <menu_item_call label="Depurar" name="Debug..."/> + <menu_item_call label="Depurar las texturas" name="Debug..."/> <menu_item_call label="Acercar el zoom" name="Zoom In"/> <menu_item_call label="Pagar" name="Pay..."/> <menu_item_call label="Perfil del objeto" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/es/menu_attachment_self.xml b/indra/newview/skins/default/xui/es/menu_attachment_self.xml index 8cbe4299a8..650ac78855 100644 --- a/indra/newview/skins/default/xui/es/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/es/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Mis amigos" name="Friends..."/> <menu_item_call label="Mis grupos" name="Groups..."/> <menu_item_call label="Mi perfil" name="Profile..."/> + <menu_item_call label="Depurar las texturas" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_avatar_other.xml b/indra/newview/skins/default/xui/es/menu_avatar_other.xml index 83801e872d..7df2d7c4e0 100644 --- a/indra/newview/skins/default/xui/es/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/es/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Denunciar" name="abuse"/> <menu_item_call label="Congelar" name="Freeze..."/> <menu_item_call label="Expulsar" name="Eject..."/> - <menu_item_call label="Depurar" name="Debug..."/> + <menu_item_call label="Depurar las texturas" name="Debug..."/> <menu_item_call label="Acercar el zoom" name="Zoom In"/> <menu_item_call label="Pagar" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_avatar_self.xml b/indra/newview/skins/default/xui/es/menu_avatar_self.xml index 67e56844b1..5b72498439 100644 --- a/indra/newview/skins/default/xui/es/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/es/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Mis amigos" name="Friends..."/> <menu_item_call label="Mis grupos" name="Groups..."/> <menu_item_call label="Mi perfil" name="Profile..."/> + <menu_item_call label="Depurar las texturas" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_edit.xml b/indra/newview/skins/default/xui/es/menu_edit.xml new file mode 100644 index 0000000000..96fc9d8881 --- /dev/null +++ b/indra/newview/skins/default/xui/es/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Editar" name="Edit"> + <menu_item_call label="Deshacer" name="Undo"/> + <menu_item_call label="Rehacer" name="Redo"/> + <menu_item_call label="Cortar" name="Cut"/> + <menu_item_call label="Copiar" name="Copy"/> + <menu_item_call label="Pegar" name="Paste"/> + <menu_item_call label="Borrar" name="Delete"/> + <menu_item_call label="Duplicar" name="Duplicate"/> + <menu_item_call label="Seleccionar todo" name="Select All"/> + <menu_item_call label="Deseleccionar" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml index 34f6b8ece7..236289f82a 100644 --- a/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Denunciar" name="report"/> <menu_item_call label="Congelar" name="freeze"/> <menu_item_call label="Expulsar" name="eject"/> - <menu_item_call label="Depurar" name="debug"/> + <menu_item_call label="Depurar las texturas" name="debug"/> <menu_item_call label="Encontrar en el mapa" name="find_on_map"/> <menu_item_call label="Acercar el zoom" name="zoom_in"/> <menu_item_call label="Pagar" name="pay"/> diff --git a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml index f21866e54f..af5c17d7cb 100644 --- a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Mi perfil" name="my_profile"/> <menu_item_call label="Mis amigos" name="my_friends"/> <menu_item_call label="Mis grupos" name="my_groups"/> + <menu_item_call label="Depurar las texturas" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/es/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/es/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..20d99afde1 --- /dev/null +++ b/indra/newview/skins/default/xui/es/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Cerrar" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index 602798b108..ca992fd525 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Compartir" name="Share"/> <menu_item_call label="Comprar" name="Task Buy"/> <menu_item_call label="Abrir" name="Task Open"/> <menu_item_call label="Ejecutar" name="Task Play"/> @@ -48,6 +49,8 @@ <menu_item_call label="Abrir" name="Sound Open"/> <menu_item_call label="Reemplazar el vestuario" name="Replace Outfit"/> <menu_item_call label="Añadir al vestuario" name="Add To Outfit"/> + <menu_item_call label="Quitar del vestuario actual" name="Remove From Outfit"/> + <menu_item_call label="Encontrar el original" name="Find Original"/> <menu_item_call label="Eliminar el Ãtem" name="Purge Item"/> <menu_item_call label="Restaurar el Ãtem" name="Restore Item"/> <menu_item_call label="Abrir" name="Open"/> @@ -57,6 +60,7 @@ <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Pegar" name="Paste"/> <menu_item_call label="Pegar como enlace" name="Paste As Link"/> + <menu_item_call label="Quitar el enlace" name="Remove Link"/> <menu_item_call label="Borrar" name="Delete"/> <menu_item_call label="Borrar carpeta del sistema" name="Delete System Folder"/> <menu_item_call label="Empezar multiconferencia" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/es/menu_login.xml b/indra/newview/skins/default/xui/es/menu_login.xml index 7ebe2e0c31..101cddc6aa 100644 --- a/indra/newview/skins/default/xui/es/menu_login.xml +++ b/indra/newview/skins/default/xui/es/menu_login.xml @@ -6,19 +6,10 @@ </menu> <menu label="Ayuda" name="Help"> <menu_item_call label="Ayuda de [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Mostrar el menú 'Debug'" name="Show Debug Menu"/> <menu label="Depurar" name="Debug"> - <menu label="Editar" name="Edit"> - <menu_item_call label="Deshacer" name="Undo"/> - <menu_item_call label="Rehacer" name="Redo"/> - <menu_item_call label="Cortar" name="Cut"/> - <menu_item_call label="Copiar" name="Copy"/> - <menu_item_call label="Pegar" name="Paste"/> - <menu_item_call label="Borrar" name="Delete"/> - <menu_item_call label="Duplicar" name="Duplicate"/> - <menu_item_call label="Seleccionar todo" name="Select All"/> - <menu_item_call label="Deseleccionar" name="Deselect"/> - </menu> <menu_item_call label="Mostrar las configuraciones del depurador" name="Debug Settings"/> <menu_item_call label="Configuraciones del Visor/Color" name="UI/Color Settings"/> <menu label="Pruebas de la interfaz" name="UI Tests"/> @@ -26,5 +17,7 @@ <menu_item_call label="Mostrar los 'TOS'" name="TOS"/> <menu_item_call label="Mostrar mensaje crÃtico" name="Critical"/> <menu_item_call label="Web Browser Test" name="Web Browser Test"/> + <menu_item_check label="Mostrar el selector de Grid" name="Show Grid Picker"/> + <menu_item_call label="Mostrar la consola de notificaciones" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/es/menu_participant_list.xml b/indra/newview/skins/default/xui/es/menu_participant_list.xml index ed69683de9..0985f308ae 100644 --- a/indra/newview/skins/default/xui/es/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/es/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Llamar" name="Call"/> <menu_item_call label="Compartir" name="Share"/> <menu_item_call label="Pagar" name="Pay"/> + <menu_item_check label="Ver los iconos de la gente" name="View Icons"/> <menu_item_check label="Ignorar la voz" name="Block/Unblock"/> <menu_item_check label="Ignorar el texto" name="MuteText"/> <context_menu label="Opciones del moderador >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/es/menu_save_outfit.xml b/indra/newview/skins/default/xui/es/menu_save_outfit.xml new file mode 100644 index 0000000000..f21dd32b80 --- /dev/null +++ b/indra/newview/skins/default/xui/es/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Guardar" name="save_outfit"/> + <menu_item_call label="Guardar como nuevo" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/es/menu_script_chiclet.xml b/indra/newview/skins/default/xui/es/menu_script_chiclet.xml new file mode 100644 index 0000000000..f517baf566 --- /dev/null +++ b/indra/newview/skins/default/xui/es/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Cerrar" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index bef803b45c..c9ae4def46 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -31,6 +31,7 @@ <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Crear un hito de este sitio" name="Create Landmark Here"/> <menu label="Perfil del lugar" name="Land"> + <menu_item_call label="Perfil del lugar" name="Place Profile"/> <menu_item_call label="Acerca del terreno" name="About Land"/> <menu_item_call label="Región/Estado" name="Region/Estate"/> </menu> @@ -66,17 +67,6 @@ <menu_item_call label="Herramienta Crear" name="Create"/> <menu_item_call label="Herramienta Terreno" name="Land"/> </menu> - <menu label="Editar" name="Edit"> - <menu_item_call label="Deshacer" name="Undo"/> - <menu_item_call label="Rehacer" name="Redo"/> - <menu_item_call label="Cortar" name="Cut"/> - <menu_item_call label="Copiar" name="Copy"/> - <menu_item_call label="Pegar" name="Paste"/> - <menu_item_call label="Eliminar" name="Delete"/> - <menu_item_call label="Duplicar" name="Duplicate"/> - <menu_item_call label="Seleccionar todo" name="Select All"/> - <menu_item_call label="Deseleccionar" name="Deselect"/> - </menu> <menu_item_call label="Enlazar" name="Link"/> <menu_item_call label="Desenlazar" name="Unlink"/> <menu_item_check label="Editar las partes enlazadas" name="Edit Linked Parts"/> @@ -121,8 +111,10 @@ <menu_item_call label="Ayuda de [SECOND_LIFE]" name="Second Life Help"/> <menu_item_call label="Denunciar una infracción" name="Report Abuse"/> <menu_item_call label="Informar de un fallo" name="Report Bug"/> + <menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzado" name="Advanced"> + <menu_item_check label="Mostrar el menú Avanzado" name="Show Advanced Menu"/> <menu_item_call label="Parar mis animaciones" name="Stop Animating My Avatar"/> <menu_item_call label="Recargar las texturas" name="Rebake Texture"/> <menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/> @@ -144,7 +136,6 @@ <menu_item_check label="Realzar las transparencias" name="Highlight Transparent"/> <menu_item_check label="Mostrar los HUD anexados" name="Show HUD Attachments"/> <menu_item_check label="Mostrar el Punto de Mira en la vista subjetiva" name="ShowCrosshairs"/> - <menu_item_check label="Mostrar información complementaria del terreno" name="Land Tips"/> </menu> <menu label="Objetos representados" name="Rendering Types"> <menu_item_check label="Simple" name="Simple"/> @@ -200,7 +191,7 @@ <menu_item_call label="Pantalla completa" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Mostrar las configuraciones del depurador" name="Debug Settings"/> - <menu_item_check label="Mostrar el menú 'Develop'" name="Debug Mode"/> + <menu_item_check label="Mostrar el menú 'Develop'" name="Debug Mode"/> </menu> <menu label="Develop" name="Develop"> <menu label="Consoles" name="Consoles"> diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 082841af31..49f30ae807 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -349,7 +349,7 @@ No se reembolsan las cuotas pagadas. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - ¿Borrar el destacado [PICK]? + ¿Borrar el destacado <nolink>[PICK]</nolink>? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="PromptGoToEventsPage"> @@ -929,6 +929,16 @@ no tienes el permiso de comprar terreno para el grupo que tienes activado actual <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification label="Guardar el vestuario" name="SaveOutfitAs"> + Guardar como un nuevo vestuario lo que estoy llevando: + <form name="form"> + <input name="message"> + [DESC] (nuevo) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Cancelar"/> + </form> + </notification> <notification name="RemoveFromFriends"> ¿Quieres quitar a [FIRST_NAME] [LAST_NAME] de tu lista de amigos? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> @@ -1421,6 +1431,10 @@ Se ocultará el chat y los mensajes instantáneos (éstos recibirán tu Respuest ¿Teleportarte a [CLASSIFIED]? <usetemplate ignoretext="Confirmar el teleporte a una localización de los Clasificados" name="okcancelignore" notext="Cancelar" yestext="Teleportar"/> </notification> + <notification name="TeleportToHistoryEntry"> + ¿Teleportarse a [HISTORY_ENTRY]? + <usetemplate ignoretext="Confirmar que quiero teleportarme a una localización del historial" name="okcancelignore" notext="Cancelar" yestext="Teleportar"/> + </notification> <notification label="Mensaje a todo el estado" name="MessageEstate"> Escribe un anuncio breve que se enviará a todo el que esté en tu estado. <form name="form"> @@ -1512,6 +1526,9 @@ Puedes pulsar 'Cambiar las Preferencias' para incrementar las preferen <ignore name="ignore" text="Mis preferencias sobre nivel de calificación me impiden entrar a esta región"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Tu preferencia actual de calificación es [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> No puedes reclamar este terreno por su nivel de calificación. Puede deberse a que no hay información validada de tu edad. @@ -1926,6 +1943,9 @@ PublÃcala en una página web para que otros puedan acceder fácilmente a esta p <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Cancelado </notification> @@ -1954,6 +1974,11 @@ PublÃcala en una página web para que otros puedan acceder fácilmente a esta p Subiendo fotos del mundo y del sitio web... (tardará unos 5 minutos). </notification> + <notification name="UploadConfirmation"> + La subida cuesta [AMOUNT] L$. +¿Quieres continuar? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Subir"/> + </notification> <notification name="UploadPayment"> Has pagado [AMOUNT] LS por la subida. </notification> @@ -2295,9 +2320,9 @@ Por favor, vuelve a intentarlo en unos momentos. </form> </notification> <notification name="TeleportOffered"> - [NAME] te ofrece teleportarte a su localización: + [NAME_SLURL] te ha ofrecido teleportarte a su posición: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teleportar"/> <button name="Cancel" text="Cancelar"/> @@ -2315,11 +2340,11 @@ Por favor, vuelve a intentarlo en unos momentos. </form> </notification> <notification name="OfferFriendship"> - [NAME] te está ofreciendo amistad. + [NAME_SLURL] te está ofreciendo su amistad. [MESSAGE] -(Por defecto, podrás ver si están conectados los demás). +(Por defecto, podrás ver si el otro está conectado) <form name="form"> <button name="Accept" text="Aceptar"/> <button name="Decline" text="Rehusar"/> @@ -2382,6 +2407,9 @@ Del objeto: [OBJECTNAME]; propiedad de: [NAME]? <notification name="FailedToFindWearable"> Búsqueda fallida de [TYPE] de nombre [DESC] en la base de datos. </notification> + <notification name="ShareToWebFailed"> + Fallo al subir la imagen a la web. + </notification> <notification name="InvalidWearable"> El Ãtem que quieres vestirte tiene una caracterÃstica que tu visor no puede leer. Por favor, actualiza tu versión de [APP_NAME] para ponerte este Ãtem. </notification> @@ -2577,6 +2605,12 @@ Por tu seguridad, serán bloqueadas durante unos segundos. El botón elegido no se puede mostrar correctamente. Se mostrará cuando haya suficiente espacio. </notification> + <notification name="ShareNotification"> + Arrastrar Ãtems desde el inventario hasta una persona en el perfil del residente. + </notification> + <notification name="AvatarRezNotification"> + Avatar de '[NAME]' obtenido en [TIME] segs. + </notification> <global name="UnsupportedCPU"> - La velocidad de tu CPU no cumple los requerimientos mÃnimos. </global> diff --git a/indra/newview/skins/default/xui/es/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/es/outfit_accordion_tab.xml new file mode 100644 index 0000000000..bac885e5d8 --- /dev/null +++ b/indra/newview/skins/default/xui/es/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/es/panel_edit_eyes.xml b/indra/newview/skins/default/xui/es/panel_edit_eyes.xml index e33848554d..29a416f698 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iris" name="Iris" tool_tip="Pulsa para elegir una imagen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Ojos"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Ojos"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_gloves.xml b/indra/newview/skins/default/xui/es/panel_edit_gloves.xml index 397322466c..684a35a830 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Guantes"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Guantes"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_hair.xml b/indra/newview/skins/default/xui/es/panel_edit_hair.xml index 49cc8ce98c..25af1ea8cb 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Textura" name="Texture" tool_tip="Pulsa para elegir una imagen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Color"/> - <accordion_tab name="hair_style_tab" title="Estilo"/> - <accordion_tab name="hair_eyebrows_tab" title="Cejas"/> - <accordion_tab name="hair_facial_tab" title="Facial"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Color"/> + <accordion_tab name="hair_style_tab" title="Estilo"/> + <accordion_tab name="hair_eyebrows_tab" title="Cejas"/> + <accordion_tab name="hair_facial_tab" title="Facial"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_jacket.xml b/indra/newview/skins/default/xui/es/panel_edit_jacket.xml index abee993aec..347107d746 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Tejido inferior" name="Lower Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Chaqueta"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Chaqueta"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_pants.xml b/indra/newview/skins/default/xui/es/panel_edit_pants.xml index 80eb5f0de0..e765702343 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Pantalones"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Pantalones"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_shape.xml b/indra/newview/skins/default/xui/es/panel_edit_shape.xml index 8a9ac0e9ec..1a13f928a2 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Varón" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Cuerpo"/> - <accordion_tab name="shape_head_tab" title="Cabeza"/> - <accordion_tab name="shape_eyes_tab" title="Ojos"/> - <accordion_tab name="shape_ears_tab" title="Orejas"/> - <accordion_tab name="shape_nose_tab" title="Nariz"/> - <accordion_tab name="shape_mouth_tab" title="Boca"/> - <accordion_tab name="shape_chin_tab" title="Barbilla"/> - <accordion_tab name="shape_torso_tab" title="Torso"/> - <accordion_tab name="shape_legs_tab" title="Piernas"/> - </accordion> + <panel label="Camisa" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Cuerpo"/> + <accordion_tab name="shape_head_tab" title="Cabeza"/> + <accordion_tab name="shape_eyes_tab" title="Ojos"/> + <accordion_tab name="shape_ears_tab" title="Orejas"/> + <accordion_tab name="shape_nose_tab" title="Nariz"/> + <accordion_tab name="shape_mouth_tab" title="Boca"/> + <accordion_tab name="shape_chin_tab" title="Barbilla"/> + <accordion_tab name="shape_torso_tab" title="Torso"/> + <accordion_tab name="shape_legs_tab" title="Piernas"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_shirt.xml b/indra/newview/skins/default/xui/es/panel_edit_shirt.xml index 6d65660409..f763e1b18d 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Camisa"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Camisa"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_shoes.xml b/indra/newview/skins/default/xui/es/panel_edit_shoes.xml index e613b1809d..70f2027398 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Zapatos"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Zapatos"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_skin.xml b/indra/newview/skins/default/xui/es/panel_edit_skin.xml index 2d9e556a4a..501ecfb4de 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Tatuajes superiores" name="Upper Tattoos" tool_tip="Pulsa para elegir una imagen"/> <texture_picker label="Tatuajes inferiores" name="Lower Tattoos" tool_tip="Pulsa para elegir una imagen"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Color de la piel"/> - <accordion_tab name="skin_face_tab" title="Detalles faciales"/> - <accordion_tab name="skin_makeup_tab" title="Maquillaje"/> - <accordion_tab name="skin_body_tab" title="Detalles del cuerpo"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Color de la piel"/> + <accordion_tab name="skin_face_tab" title="Detalles faciales"/> + <accordion_tab name="skin_makeup_tab" title="Maquillaje"/> + <accordion_tab name="skin_body_tab" title="Detalles del cuerpo"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_skirt.xml b/indra/newview/skins/default/xui/es/panel_edit_skirt.xml index c8e25d38a9..2c7196642c 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Falda"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Falda"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_socks.xml b/indra/newview/skins/default/xui/es/panel_edit_socks.xml index d65f119da7..28423eaf61 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Calcetines"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Calcetines"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_underpants.xml b/indra/newview/skins/default/xui/es/panel_edit_underpants.xml index ea446c1625..6c82bcfedf 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Ropa interior"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Ropa interior"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml index 92e42657a4..412bdceddf 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/> <color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Camiseta"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Camiseta"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml index 6d48b77d3c..97ab566f4d 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Camisa" name="wearable_type_panel"> <text name="description_text" value="AnatomÃa:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Opciones"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Guardar como" name="save_as_button"/> <button label="Revertir" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/es/panel_group_general.xml b/indra/newview/skins/default/xui/es/panel_group_general.xml index 66d0c5be93..c4f17ab6dc 100644 --- a/indra/newview/skins/default/xui/es/panel_group_general.xml +++ b/indra/newview/skins/default/xui/es/panel_group_general.xml @@ -47,8 +47,11 @@ Deja el cursor sobre las opciones para ver más ayuda. <check_box label="Cuota de entrada" name="check_enrollment_fee" tool_tip="Configura si hay que pagar una cuota para entrar al grupo"/> <spinner label="L$" left_delta="130" name="spin_enrollment_fee" tool_tip="Si la opción Cuota de entrada está marcada, los nuevos miembros han de pagar esta cuota para entrar al grupo." width="60"/> <combo_box bottom_delta="-38" name="group_mature_check" tool_tip="Establece si la información de su grupo es 'mature'." width="150"> - <combo_box.item label="Contenido 'PG'" name="pg"/> + <combo_item name="select_mature"> + - Elige la Calificación - + </combo_item> <combo_box.item label="Contenido 'Mature'" name="mature"/> + <combo_box.item label="Contenido 'PG'" name="pg"/> </combo_box> <check_box initial_value="true" label="Mostrar en la búsqueda" name="show_in_group_list" tool_tip="Permite que la gente vea este grupo en los resultados de la búsqueda"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_inventory_item.xml b/indra/newview/skins/default/xui/es/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/es/panel_media_settings_permissions.xml index 3e625f56fe..ec9edbfa15 100644 --- a/indra/newview/skins/default/xui/es/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/es/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Propietario + </text> <check_box initial_value="false" label="Permitir la navegación e interactividad" name="perms_owner_interact"/> <check_box initial_value="false" label="Mostrar la barra de control" name="perms_owner_control"/> + <text name="group_label"> + Grupo: + </text> <check_box initial_value="false" label="Permitir la navegación e interactividad" name="perms_group_interact"/> <check_box initial_value="false" label="Mostrar la barra de control" name="perms_group_control"/> + <text name="anyone_label"> + Cualquiera + </text> <check_box initial_value="false" label="Permitir la navegación e interactividad" name="perms_anyone_interact"/> <check_box initial_value="false" label="Mostrar la barra de control" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_nearby_media.xml b/indra/newview/skins/default/xui/es/panel_nearby_media.xml index 9bd90572d7..d1a14c877f 100644 --- a/indra/newview/skins/default/xui/es/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/es/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld Ãtems media) + </string> <string name="empty_item_text"> <vacÃo> </string> @@ -16,15 +19,10 @@ <button label="Parar todo" name="all_nearby_media_disable_btn" tool_tip="Apagar todos los media cercanos"/> <button label="Iniciar todo" name="all_nearby_media_enable_btn" tool_tip="Encender todos los media cercanos"/> <button name="open_prefs_btn" tool_tip="Abrir las preferencias de los media"/> - <button label="Más >>" label_selected="Menos <<" name="more_less_btn" tool_tip="Controles avanzados"/> + <button label="Más >>" label_selected="Menos <<" name="more_btn" tool_tip="Controles avanzados"/> + <button label="Más >>" label_selected="Menos <<" name="less_btn" tool_tip="Controles avanzados"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Media cercanos - </text> - <text name="show"> - Mostrar: - </text> <combo_box name="show_combo"> <combo_box.item label="Todo" name="All"/> <combo_box.item label="En esta parcela" name="WithinParcel"/> @@ -38,22 +36,22 @@ <scroll_list.columns label="Nombre" name="media_name"/> <scroll_list.columns label="Depurar" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Parar los media seleccionados"/> </layout_panel> <layout_panel name="play"> - <button name="play_btn" tool_tip="Ejecutar los media seleccionados"/> + <button name="play_btn" tool_tip="Ejecutar los media"/> </layout_panel> <layout_panel name="pause"> - <button name="pause_btn" tool_tip="Pausar los media seleccionados"/> + <button name="pause_btn" tool_tip="Pausa los media seleccionados"/> </layout_panel> <layout_panel name="volume_slider_ctrl"> <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Volumen de los media seleccionados"/> </layout_panel> <layout_panel name="mute"> - <button name="mute_btn" tool_tip="Silenciar el audio de los media seleccionados"/> + <button name="mute_btn" tool_tip="Silencia los media seleccionados"/> </layout_panel> <layout_panel name="zoom"> <button name="zoom_btn" tool_tip="Zoom en los media seleccionados"/> diff --git a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml new file mode 100644 index 0000000000..484f51569b --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Editar el vestuario" name="outfit_edit"> + <string name="No Outfit" value="No hay vestuario"/> + <panel.string name="not_available"> + (No disp.) + </panel.string> + <panel.string name="unknown"> + (desconocido) + </panel.string> + <string name="Filter.All" value="Todos"/> + <string name="Filter.Clothes/Body" value="Ropas/Cuerpo"/> + <string name="Filter.Objects" value="Objetos"/> + <button label="editar" name="edit_wearable_btn"/> + <text name="title" value="Editar el vestuario"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Editando..."/> + <text name="curr_outfit_name" value="[Vestuario actual]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="Panel de control de los MI" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Vestuario" name="look_item"/> + <scroll_list.columns label="Orden de los Ãtems del vestuario" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filtrar" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="Panel de control de los MI" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Añadir al vestuario:"/> + <button label="o" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="C" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Guardar" name="save_btn"/> + <button label="Revertir" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/es/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/es/panel_outfits_inventory.xml index 2f60df7743..4b23094103 100644 --- a/indra/newview/skins/default/xui/es/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/es/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Cosas" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MIS VESTUARIOS" name="outfitslist_tab"/> + <panel label="MIS VESTUARIOS" name="outfitslist_tab"/> <inventory_panel label="PUESTO" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Quitar el Ãtem seleccionado"/> <button label="Guardar el vestuario" name="make_outfit_btn" tool_tip="Guardar la apariencia como un vestuario"/> <button label="Ponerme" name="wear_btn" tool_tip="Ponerme el vestuario seleccionado"/> - <button label="M" name="look_edit_btn"/> + <button label="Editar el vestuario" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml index 376aea5278..ad14d8ac9d 100644 --- a/indra/newview/skins/default/xui/es/panel_people.xml +++ b/indra/newview/skins/default/xui/es/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Gente" name="people_panel"> - <string name="no_people" value="No hay nadie"/> - <string name="no_one_near" value="No hay nadie cerca"/> + <string name="no_recent_people" value="No hay nadie reciente. ¿Buscas gente con la que pasar el rato? Prueba la [secondlife:///app/search/people Búsqueda] o el [secondlife:///app/worldmap Mapa del mundo]."/> + <string name="no_filtered_recent_people" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]."/> + <string name="no_one_near" value="No hay nadie cerca. ¿Buscas gente con la que pasar el rato? Prueba la [secondlife:///app/search/people Búsqueda] o el [secondlife:///app/worldmap Mapa del mundo]."/> + <string name="no_one_filtered_near" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]."/> <string name="no_friends_online" value="No hay amigos conectados"/> <string name="no_friends" value="No hay amigos"/> + <string name="no_friends_msg"> + Busca amigos usando la [secondlife:///app/search/people Búsqueda] o pulsa con el botón derecho del ratón en un Residente para añadirle como amigo. +¿Buscas gente con la que pasar el rato? Prueba el [secondlife:///app/worldmap Mapa del mundo]. + </string> + <string name="no_filtered_friends_msg"> + ¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/people Búsqueda]. + </string> <string name="people_filter_label" value="Filtrar a la gente"/> <string name="groups_filter_label" value="Filtrar a los grupos"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Intenta encontrar el grupo con una búsqueda]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Intenta encontrar grupos a los que unirte.]"/> + <string name="no_filtered_groups_msg" value="¿No encontraste lo que buscabas? Prueba la [secondlife:///app/search/groups Búsqueda]."/> + <string name="no_groups_msg" value="¿Buscas grupos en que participar? Prueba la [secondlife:///app/search/groups Búsqueda]."/> <filter_editor label="Filtrar" name="filter_input"/> <tab_container name="tabs"> <panel label="CERCANA" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Ofrecer amistad a un Residente"/> <button name="del_btn" tool_tip="Quitar a la persona seleccionada de tu lista de amigos"/> </panel> - <text name="no_friends_msg"> - Para añadir amigos, prueba a hacer una [secondlife:///app/search/people búsqueda general] o pulsa en un usuario para añadirle como amigo. -Si estás buscando gente para pasar el rato, [secondlife:///app/worldmap usa el mapa]. - </text> </panel> <panel label="MIS GRUPOS" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/es/panel_places.xml b/indra/newview/skins/default/xui/es/panel_places.xml index 4818bff069..1970284466 100644 --- a/indra/newview/skins/default/xui/es/panel_places.xml +++ b/indra/newview/skins/default/xui/es/panel_places.xml @@ -11,5 +11,6 @@ <button label="Guardar" name="save_btn"/> <button label="Cancelar" name="cancel_btn"/> <button label="Cerrar" name="close_btn"/> + <button label="Perfil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml index a7c13b05b6..e0ce03d09a 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="Chat en bocadillos" name="bubble_text_chat"/> <slider label="Opacidad" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Elegir el color de los bocadillos del chat"/> + <text name="UI Size:"> + Tamaño de la UI + </text> <check_box label="Mostrar los errores de los scripts en:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Botón de Apretar para Hablar" name="modifier_combo"/> <button label="Elegir la tecla" name="set_voice_hotkey_button"/> <button label="Botón de en medio del ratón" name="set_voice_middlemouse_button" tool_tip="Reconfigurarlo al botón medio del ratón"/> + <button label="Otros dispositivos" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_region_general.xml b/indra/newview/skins/default/xui/es/panel_region_general.xml index 67800b2c6f..fe7f51c74e 100644 --- a/indra/newview/skins/default/xui/es/panel_region_general.xml +++ b/indra/newview/skins/default/xui/es/panel_region_general.xml @@ -30,10 +30,10 @@ <text label="Calificación" name="access_text"> Calificación: </text> - <icons_combo_box label="'Mature'" name="access_combo"> - <icons_combo_box.item label="'Adult'" name="Adult" value="42"/> + <icons_combo_box label="Moderado" name="access_combo"> + <icons_combo_box.item label="Adulto" name="Adult" value="42"/> <icons_combo_box.item label="Moderado" name="Mature" value="21"/> - <icons_combo_box.item label="'PG'" name="PG" value="13"/> + <icons_combo_box.item label="General" name="PG" value="13"/> </icons_combo_box> <button label="Aplicar" name="apply_btn"/> <button label="Teleportar a su Base a un Residente..." name="kick_btn"/> diff --git a/indra/newview/skins/default/xui/es/panel_world_map.xml b/indra/newview/skins/default/xui/es/panel_world_map.xml index 77cec6b60b..b1dea02210 100644 --- a/indra/newview/skins/default/xui/es/panel_world_map.xml +++ b/indra/newview/skins/default/xui/es/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NO </panel.string> + <panel.string name="world_map_person"> + 1 persona + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] personas + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml index 776b253adc..ff4d201d01 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Perfil" name="info_btn"/> + <button label="Compartir" name="share_btn"/> <button label="Ponerme" name="wear_btn"/> <button label="Play" name="play_btn"/> <button label="Teleporte" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 4cee677420..27700b2efe 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -249,6 +249,9 @@ <string name="BUTTON_CLOSE_WIN"> Cerrar (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Cerrar + </string> <string name="BUTTON_RESTORE"> Maximizar </string> @@ -288,6 +291,9 @@ <string name="GroupNameNone"> (ninguno) </string> + <string name="AvalineCaller"> + Avaline: [ORDER] + </string> <string name="AssetErrorNone"> No hay ningún error </string> @@ -883,7 +889,7 @@ Pulsa ESC para salir de la vista subjetiva </string> <string name="InventoryNoMatchingItems"> - No se han encontrado tales Ãtems en el inventario. Intenta con [secondlife:///app/search/groups "Buscar"]. + ¿No encontraste lo que buscabas? Prueba en la [secondlife:///app/search/all Búsqueda]. </string> <string name="FavoritesNoMatchingItems"> Arrastra aquà un hito para tenerlo en tus favoritos. @@ -1542,9 +1548,7 @@ <string name="RegionNoCovenantOtherOwner"> No se ha aportado un contrato para este estado. El terreno de este estado lo vende el propietario del estado, no Linden Lab. Por favor, contacta con ese propietario para informarte sobre la venta. </string> - <string name="covenant_last_modified"> - Última modificación: - </string> + <string name="covenant_last_modified" value="Última modificación:"/> <string name="none_text" value="(no hay)"/> <string name="never_text" value=" (nunca)"/> <string name="GroupOwned"> @@ -3221,6 +3225,15 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="LocationCtrlComboBtnTooltip"> Historial de mis localizaciones </string> + <string name="LocationCtrlAdultIconTooltip"> + Región Adulta + </string> + <string name="LocationCtrlModerateIconTooltip"> + Región Moderada + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Región General + </string> <string name="UpdaterWindowTitle"> Actualizar [APP_NAME] </string> @@ -3251,6 +3264,12 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Fallo al iniciar el visor </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Los Ãtems se reciben muy rápido de [FROM_NAME]; desactivada la vista previa automática durante [TIME] sgs. + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Los Ãtems se reciben muy rápido; desactivada la vista previa automática durante [TIME] sgs. + </string> <string name="IM_logging_string"> -- Activado el registro de los mensajes instantáneos -- </string> @@ -3278,6 +3297,9 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="IM_moderator_label"> (Moderador) </string> + <string name="answered_call"> + Han respondido a tu llamada + </string> <string name="started_call"> Llamada de voz iniciada </string> @@ -3359,12 +3381,18 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] ha dicho algo nuevo </string> + <string name="session_initialization_timed_out_error"> + Se ha agotado el tiempo del inicio de sesión + </string> <string name="paid_you_ldollars"> [NAME] te ha pagado [AMOUNT] L$ </string> <string name="you_paid_ldollars"> Has pagado [AMOUNT] L$ a [NAME] por [REASON]. </string> + <string name="you_paid_ldollars_no_info"> + Has pagado[AMOUNT] L$ + </string> <string name="you_paid_ldollars_no_reason"> Has pagado [AMOUNT] L$ a [NAME]. </string> @@ -3475,4 +3503,13 @@ Denuncia de infracción <string name="Contents"> Contenidos </string> + <string name="AvatarBirthDateFormat"> + [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + ninguno/ninguno + </string> + <string name="texture_load_dimensions_error"> + No se puede subir imágenes mayores de [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml index 21d0b6c10c..681fd203f0 100644 --- a/indra/newview/skins/default/xui/fr/floater_about.xml +++ b/indra/newview/skins/default/xui/fr/floater_about.xml @@ -43,13 +43,14 @@ Version Vivox : [VIVOX_VERSION] </panel> <panel label="Remerciements" name="credits_panel"> <text_editor name="credits_editor"> - Second Life existe grâce aux efforts de Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl et de nombreuses autres personnes. + Second Life existe grâce aux efforts de Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain et bien d'autres. - Tous nos remerciements aux résidents suivants pour avoir testé cette version (la meilleure qui soit jusqu'à présent) : able whitman, Adeon Writer, adonaira aabye, Aeron Kohime, Agathos Frascati, Aimee Trescothick, Aleric Inglewood, Alissa Sabre, Aminom Marvin, Angela Talamasca, Aralara Rajal, Armin Weatherwax, Ashrilyn Hayashida, Athanasius Skytower, Aura Dirval, Barney Boomslang, Biancaluce Robbiani, Biker Offcourse, Borg Capalini, Bulli Schumann, catherine pfeffer, Chalice Yao, Corre Porta, Court Goodman, Cummere Mayo, Dale Innis, Darien Caldwell, Darjeeling Schoonhoven, Daten Thielt, dimentox travanti, Dirk Talamasca, Drew Dwi, Duckless Vandyke, Elanthius Flagstaff, Electro Burnstein, emiley tomsen, Escort DeFarge, Eva Rau, Ezian Ecksol, Fire Centaur, Fluf Fredriksson, Francisco Koolhoven, Frontera Thor, Frungi Stastny, Gally Young, gearsawe stonecutter, Gigs Taggart, Gordon Wendt, Gudmund Shepherd, Gypsy Paz, Harleen Gretzky, Henri Beauchamp, Inma Rau, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Jessicka Graves, Joeseph Albanese, Joshua Philgarlic, Khyota Wulluf, kirstenlee Cinquetti, Latif Khalifa, Lex Neva, Lilibeth Andree, Lisa Lowe, Lunita Savira, Loosey Demonia, lum pfohl, Marcos Fonzarelli, MartinRJ Fayray, Marusame Arai, Matthew Dowd, Maya Remblai, McCabe Maxsted, Meghan Dench, Melchoir Tokhes, Menos Short, Michelle2 Zenovka, Mimika Oh, Minerva Memel, Mm Alder, Ochi Wolfe, Omei Turnbull, Pesho Replacement, Phantom Ninetails, phoenixflames kukulcan, Polo Gufler, prez pessoa, princess niven, Prokofy Neva, Qie Niangao, Rem Beattie, RodneyLee Jessop, Saijanai Kuhn, Seg Baphomet, Sergen Davies, Shirley Marquez, SignpostMarv Martin, Sindy Tsure, Sira Arbizu, Skips Jigsaw, Sougent Harrop, Spritely Pixel, Squirrel Wood, StarSong Bright, Subversive Writer, Sugarcult Dagger, Sylumm Grigorovich, Tammy Nowotny, Tanooki Darkes, Tayra Dagostino, Theoretical Chemistry, Thickbrick Sleaford, valerie rosewood, Vex Streeter, Vixen Heron, Whoops Babii, Winter Ventura, Xiki Luik, Yann Dufaux, Yina Yao, Yukinoroh Kamachi, Zolute Infinity, Zwagoth Klaar +Tous nos remerciements aux résidents suivants pour avoir testé cette version (la meilleure qui soit jusqu'à présent) : Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan et bien d'autres. -Pour réussir dans les affaires, soyez audacieux, créatif et différent. - Henry Marchant + +« Le travail continue, la cause demeure, l'espoir vit encore et le rêve ne mourra jamais » - Edward Kennedy </text_editor> </panel> <panel label="Licences" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index 5d630cdf48..2e52a90373 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -267,7 +267,7 @@ ou divisé. <text left_delta="214" name="selected_objects_text" width="48"> [COUNT] </text> - <text left="4" name="Autoreturn" width="440"> + <text name="Autoreturn"> Renvoi automatique des objets d'autres résidents (minutes, 0 pour désactiver) : </text> <line_editor name="clean other time" right="-6" width="36"/> diff --git a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml index e0cb0ef524..aa42fe6150 100644 --- a/indra/newview/skins/default/xui/fr/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/fr/floater_animation_preview.xml @@ -142,36 +142,36 @@ main Expression </text> <combo_box label="" name="emote_combo" tool_tip="Contrôle ce que fait le visage pendant l'animation"> - <combo_box.item label="(aucun)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Effrayé" name="Afraid"/> - <combo_box.item label="En colère" name="Angry"/> - <combo_box.item label="Grand sourire" name="BigSmile"/> - <combo_box.item label="Ennui" name="Bored"/> - <combo_box.item label="Pleurer" name="Cry"/> - <combo_box.item label="Mépris" name="Disdain"/> - <combo_box.item label="Gêne" name="Embarrassed"/> - <combo_box.item label="Froncer les sourcils" name="Frown"/> - <combo_box.item label="Embrasser" name="Kiss"/> - <combo_box.item label="Rire" name="Laugh"/> - <combo_box.item label="Plllppt" name="Plllppt"/> - <combo_box.item label="Dégoût" name="Repulsed"/> - <combo_box.item label="Triste" name="Sad"/> - <combo_box.item label="Hausser les épaules" name="Shrug"/> - <combo_box.item label="Sourire" name="Smile"/> - <combo_box.item label="Surprise" name="Surprise"/> - <combo_box.item label="Clin d'Å“il" name="Wink"/> - <combo_box.item label="Soucis" name="Worry"/> + <item label="(aucun)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Effrayé" name="Afraid" value="Effrayé"/> + <item label="En colère" name="Angry" value="En colère"/> + <item label="Grand sourire" name="BigSmile" value="Grand sourire"/> + <item label="Ennui" name="Bored" value="Ennui"/> + <item label="Pleurer" name="Cry" value="Pleurer"/> + <item label="Mépris" name="Disdain" value="Mépris"/> + <item label="Gêne" name="Embarrassed" value="Gêne"/> + <item label="Froncer les sourcils" name="Frown" value="Froncer les sourcils"/> + <item label="Embrasser" name="Kiss" value="Embrasser"/> + <item label="Rire" name="Laugh" value="Rire"/> + <item label="Plllppt" name="Plllppt" value="Tirer la langue"/> + <item label="Dégoût" name="Repulsed" value="Dégoût"/> + <item label="Triste" name="Sad" value="Triste"/> + <item label="Hausser les épaules" name="Shrug" value="Hausser les épaules"/> + <item label="Sourire" name="Smile" value="Sourire"/> + <item label="Surprise" name="Surprise" value="Surprise"/> + <item label="Clin d'Å“il" name="Wink" value="Clin d'Å“il"/> + <item label="Soucis" name="Worry" value="Inquiétude"/> </combo_box> <text name="preview_label"> Prévisualiser pendant </text> <combo_box label="" name="preview_base_anim" tool_tip="Utilisez cette option pour tester votre animation pendant que votre avatar fait des choses banales."> - <combo_box.item label="Debout" name="Standing"/> - <combo_box.item label="Marche" name="Walking"/> - <combo_box.item label="Assis" name="Sitting"/> - <combo_box.item label="Vol" name="Flying"/> + <item label="Debout" name="Standing" value="Debout"/> + <item label="Marche" name="Walking" value="Marche"/> + <item label="Assis" name="Sitting" value="Assis"/> + <item label="Vol" name="Flying" value="Vol"/> </combo_box> <spinner label="Transition début (s)" name="ease_in_time" tool_tip="Durée (en secondes) de l'entrée en fondu de l'animation"/> <spinner label="Transition fin (s)" name="ease_out_time" tool_tip="Durée (en secondes) de la sortie en fondu de l'animation"/> diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml index 7ead543c78..c54e3e9ce0 100644 --- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml @@ -25,7 +25,7 @@ <text left="8" name="Current color:"> Couleur actuelle : </text> - <text left="8" name="(Drag below to save.)" width="220"> - Enreg. : faire glisser dessous + <text name="(Drag below to save.)"> + Enr. : faire glisser dessous </text> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_customize.xml b/indra/newview/skins/default/xui/fr/floater_customize.xml index d5ee070dcd..ff407b25c1 100644 --- a/indra/newview/skins/default/xui/fr/floater_customize.xml +++ b/indra/newview/skins/default/xui/fr/floater_customize.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="APPARENCE" width="548"> - <tab_container name="customize tab container" tab_min_width="150" width="546"> +<floater name="floater customize" title="APPARENCE"> + <tab_container name="customize tab container" tab_min_width="150"> <text label="Parties du corps" name="body_parts_placeholder"> Parties du corps </text> <panel label="Silhouette" left="154" name="Shape" width="389"> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> <button label="Corps" label_selected="Corps" name="Body"/> <button label="Tête" label_selected="Tête" name="Head"/> <button label="Yeux" label_selected="Yeux" name="Eyes"/> @@ -44,8 +44,8 @@ Silhouette : </text> <button label="Créer une silhouette" label_selected="Créer une silhouette" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> </panel> <panel label="Peau" name="Skin"> <button label="Couleur" label_selected="Couleur" name="Skin Color" width="84"/> @@ -80,9 +80,9 @@ <texture_picker label="Tatouages haut" name="Upper Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/> <texture_picker label="Tatouages bas" name="Lower Tattoos" tool_tip="Cliquez pour sélectionner une image" width="78"/> <button label="Créer une peau" label_selected="Créer une peau" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Cheveux" name="Hair"> <button label="Couleur" label_selected="Couleur" name="Color"/> @@ -115,9 +115,9 @@ </text> <texture_picker label="Texture" name="Texture" tool_tip="Cliquez pour sélectionner une image"/> <button label="Créer des cheveux" label_selected="Créer des cheveux" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Yeux" name="Eyes"> <text name="title"> @@ -146,9 +146,9 @@ </text> <texture_picker label="Iris" name="Iris" tool_tip="Cliquez pour sélectionner une image"/> <button label="Créer des yeux" label_selected="Créer des yeux" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <text label="Habits" name="clothes_placeholder"> Habits @@ -158,9 +158,9 @@ <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> <button label="Créer une chemise" label_selected="Créer une chemise" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> <text name="title"> [DESC] </text> @@ -191,9 +191,9 @@ <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> <button label="Créer un pantalon" label_selected="Créer un pantalon" name="Create New"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> <text name="title"> [DESC] </text> @@ -248,9 +248,9 @@ <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Chaussettes" name="Socks"> <text name="title"> @@ -281,9 +281,9 @@ <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Veste" name="Jacket"> <text name="title"> @@ -315,9 +315,9 @@ <texture_picker label="Tissu (dessous)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image" width="81"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="81"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Gants" name="Gloves"> <text name="title"> @@ -348,9 +348,9 @@ <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Débardeur" name="Undershirt"> <text name="title"> @@ -375,15 +375,15 @@ <text name="no modify instructions"> Vous n'avez pas la permission de modifier cet objet. </text> - <text bottom="-470" name="Item Action Label" right="92"> + <text name="Item Action Label"> Débardeur : </text> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Caleçon" name="Underpants"> <text name="title"> @@ -408,15 +408,15 @@ <text name="no modify instructions"> Vous n'avez pas la permission de modifier cet objet. </text> - <text bottom="-470" name="Item Action Label" right="92"> + <text name="Item Action Label"> Caleçon : </text> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Jupe" name="Skirt"> <text name="title"> @@ -447,9 +447,9 @@ <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image" width="74"/> <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="74"/> <button label="Enlever" label_selected="Enlever" left="12" name="Take Off" width="82"/> - <button label="Enregistrer" label_selected="Enregistrer" left="100" name="Save" width="82"/> - <button label="Enregistrer sous..." label_selected="Enregistrer sous..." left="188" name="Save As" width="111"/> - <button label="Rétablir" label_selected="Rétablir" left="305" name="Revert" width="82"/> + <button label="Enregistrer" label_selected="Enregistrer" name="Save"/> + <button label="Enregistrer sous..." label_selected="Enregistrer sous..." name="Save As"/> + <button label="Rétablir" label_selected="Rétablir" name="Revert"/> </panel> <panel label="Tatouage" name="Tattoo"> <text name="title"> @@ -523,7 +523,7 @@ </panel> </tab_container> <scroll_container left="251" name="panel_container"/> - <button label="Infos sur les scripts" label_selected="Infos sur les scripts" name="script_info" tool_tip="Afficher les scripts attachés à votre avatar"/> + <button label="Infos scripts" label_selected="Infos scripts" name="script_info" tool_tip="Afficher les scripts attachés à votre avatar"/> <button label="Créer tenue" label_selected="Créer une tenue..." name="make_outfit_btn"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> <button label="OK" label_selected="OK" name="Ok"/> diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml index ec3b246c76..87c8847cbd 100644 --- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Day Cycle Floater" title="EDITEUR DU CYCLE DU JOUR"> <tab_container name="Day Cycle Tabs"> <panel label="Cycle du jour" name="Day Cycle"> - <button label="?" name="WLDayCycleHelp" /> + <button label="?" name="WLDayCycleHelp"/> <text name="WL12am"> Min. </text> @@ -70,28 +70,25 @@ <text name="WLCurKeyTimeText2"> Préréglages clés : </text> - <combo_box label="Préréglage" name="WLKeyPresets" /> + <combo_box label="Préréglage" name="WLKeyPresets"/> <text name="DayCycleText"> Snap : </text> - <combo_box label="5 min" name="WLSnapOptions" /> + <combo_box label="5 min" name="WLSnapOptions"/> <text name="DayCycleText2"> Durée du cycle : </text> <spinner label="Heure" name="WLLengthOfDayHour"/> - <spinner label="Min" name="WLLengthOfDayMin" /> + <spinner label="Min" name="WLLengthOfDayMin"/> <spinner label="S" name="WLLengthOfDaySec"/> <text name="DayCycleText3"> - Prévisualiser : + Aperçu : </text> <button label="Lire" label_selected="Lire" name="WLAnimSky"/> - <button label="Stop !" label_selected="Stop" name="WLStopAnimSky" /> - <button label="Utiliser heure domaine" label_selected="Aller heure domaine" - name="WLUseLindenTime" /> - <button label="Enregistrer jour test" label_selected="Enregistrer jour test" - name="WLSaveDayCycle" /> - <button label="Charger jour test" label_selected="Charger jour test" - name="WLLoadDayCycle" /> + <button label="Stop !" label_selected="Stop" name="WLStopAnimSky"/> + <button label="Utiliser heure domaine" label_selected="Aller heure domaine" name="WLUseLindenTime"/> + <button label="Enregistrer jour test" label_selected="Enregistrer jour test" name="WLSaveDayCycle"/> + <button label="Charger jour test" label_selected="Charger jour test" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_god_tools.xml b/indra/newview/skins/default/xui/fr/floater_god_tools.xml index e20da40bcf..e4c53d866c 100644 --- a/indra/newview/skins/default/xui/fr/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_god_tools.xml @@ -2,12 +2,11 @@ <floater name="godtools floater" title="OUTILS DIVINS"> <tab_container name="GodTools Tabs"> <panel label="Grille" name="grid"> - <button label="Éjecter tous les résidents" label_selected="Éjecter tous les résidents" name="Kick all users" width="175"/> <button label="Vider le cache cartographique de la région" label_selected="Vider le cache cartographique de la région" name="Flush This Region's Map Visibility Caches" width="285"/> </panel> <panel label="Région" name="region"> - <text name="Sim Name:" width="70"> - Nom du sim : + <text name="Region Name:"> + Nom de la région : </text> <line_editor left="85" name="region name" width="198"/> <check_box label="Initiation" name="check prelude" tool_tip="Définir cette région comme zone d'initiation."/> @@ -55,8 +54,8 @@ <panel.string name="no_target"> (aucune cible) </panel.string> - <text name="Sim Name:" width="70"> - Nom du sim : + <text name="Region Name:"> + Nom de la région : </text> <text left_delta="75" name="region name"> Welsh diff --git a/indra/newview/skins/default/xui/fr/floater_image_preview.xml b/indra/newview/skins/default/xui/fr/floater_image_preview.xml index a28e0bd7d5..3d405f358d 100644 --- a/indra/newview/skins/default/xui/fr/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/fr/floater_image_preview.xml @@ -10,16 +10,16 @@ Prévisualiser comme : </text> <combo_box label="Habits" left="126" name="clothing_type_combo"> - <combo_box.item label="Image" name="Image"/> - <combo_box.item label="Cheveux" name="Hair"/> - <combo_box.item label="Tête de femme" name="FemaleHead"/> - <combo_box.item label="Corps de femme (haut)" name="FemaleUpperBody"/> - <combo_box.item label="Corps de femme (bas)" name="FemaleLowerBody"/> - <combo_box.item label="Tête d'homme" name="MaleHead"/> - <combo_box.item label="Corps d'homme (haut)" name="MaleUpperBody"/> - <combo_box.item label="Corps d'homme (bas)" name="MaleLowerBody"/> - <combo_box.item label="Jupe" name="Skirt"/> - <combo_box.item label="Sculptie" name="SculptedPrim"/> + <item label="Image" name="Image" value="Image"/> + <item label="Cheveux" name="Hair" value="Cheveux"/> + <item label="Tête de femme" name="FemaleHead" value="Tête de femme"/> + <item label="Corps de femme (haut)" name="FemaleUpperBody" value="Corps de femme (haut)"/> + <item label="Corps de femme (bas)" name="FemaleLowerBody" value="Corps de femme (bas)"/> + <item label="Tête d'homme" name="MaleHead" value="Tête d'homme"/> + <item label="Corps d'homme (haut)" name="MaleUpperBody" value="Corps d'homme (haut)"/> + <item label="Corps d'homme (bas)" name="MaleLowerBody" value="Corps d'homme (bas)"/> + <item label="Jupe" name="Skirt" value="Jupe"/> + <item label="Sculptie" name="SculptedPrim" value="Sculptie"/> </combo_box> <text name="bad_image_text"> Impossible de lire l'image. diff --git a/indra/newview/skins/default/xui/fr/floater_outgoing_call.xml b/indra/newview/skins/default/xui/fr/floater_outgoing_call.xml index 2420c2b04b..089d710f17 100644 --- a/indra/newview/skins/default/xui/fr/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/fr/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Vous avez été déconnecté(e) de [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] a mis fin à l'appel. [RECONNECT_NEARBY] + Votre appel a pris fin. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Vous avez mis fin à l'appel. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/fr/floater_snapshot.xml b/indra/newview/skins/default/xui/fr/floater_snapshot.xml index ccb862acac..381a513bda 100644 --- a/indra/newview/skins/default/xui/fr/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/fr/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="APERÇU DE LA PHOTO" width="247"> - <text name="type_label"> - Destination de la photo - </text> - <radio_group label="Type de photo" name="snapshot_type_radio" width="228"> - <radio_item label="E-mail" name="postcard"/> - <radio_item label="Mon inventaire ([AMOUNT] L$)" name="texture"/> - <radio_item label="Enregistrer sur mon ordinateur" name="local"/> - </radio_group> - <button label="Plus" name="more_btn" tool_tip="Options avancées"/> - <button label="Moins" name="less_btn" tool_tip="Options avancées"/> - <text name="type_label2"> - Taille - </text> - <text name="format_label"> - Format - </text> - <combo_box label="Résolution" name="postcard_size_combo"> - <combo_box.item label="640 x 480" name="640x480"/> - <combo_box.item label="800 x 600" name="800x600"/> - <combo_box.item label="1024 x 768" name="1024x768"/> - <combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/> - <combo_box.item label="Personnaliser" name="Custom"/> - </combo_box> - <combo_box label="Résolution" name="texture_size_combo"> - <combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/> - <combo_box.item label="Petite (128 x 128)" name="Small(128x128)"/> - <combo_box.item label="Moyenne (256 x 256)" name="Medium(256x256)"/> - <combo_box.item label="Grande (512 x 512)" name="Large(512x512)"/> - <combo_box.item label="Personnaliser" name="Custom"/> - </combo_box> - <combo_box label="Résolution" name="local_size_combo"> - <combo_box.item label="Fenêtre actuelle" name="CurrentWindow"/> - <combo_box.item label="320 x 240" name="320x240"/> - <combo_box.item label="640 x 480" name="640x480"/> - <combo_box.item label="800 x 600" name="800x600"/> - <combo_box.item label="1024 x 768" name="1024x768"/> - <combo_box.item label="1280 x 1024" name="1280x1024"/> - <combo_box.item label="1600 x 1200" name="1600x1200"/> - <combo_box.item label="Personnaliser" name="Custom"/> - </combo_box> - <combo_box label="Format" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Largeur" label_width="44" name="snapshot_width" width="101"/> - <spinner label="Hauteur" label_width="46" left="121" name="snapshot_height" width="101"/> - <slider label="Qualité de l'image" name="image_quality_slider"/> - <text name="layer_type_label"> - Capturer : - </text> - <combo_box label="Couches de l'image" name="layer_types"> - <combo_box.item label="Couleurs" name="Colors"/> - <combo_box.item label="Profondeur" name="Depth"/> - <combo_box.item label="Matte des objets" name="ObjectMattes"/> - </combo_box> - <text name="file_size_label"> - [SIZE] Ko - </text> - <check_box label="Interface" name="ui_check"/> - <check_box label="HUD" name="hud_check"/> - <check_box label="Garder ouvert après enregistrement" name="keep_open_check"/> - <check_box label="Conserver les proportions" name="keep_aspect_check"/> - <check_box label="Figer l'image (plein écran)" name="freeze_frame_check"/> - <button label="Rafraîchir" name="new_snapshot_btn"/> - <check_box label="Rafraîchissement automatique" name="auto_snapshot_check"/> - <button label="Enregistrer ([AMOUNT] L$)" name="upload_btn" width="118"/> - <button label="Envoyer" name="send_btn" width="118"/> - <flyout_button label="Enregistrer" name="save_btn" tool_tip="Enregistrer l'image dans un fichier" width="118"> - <flyout_button.item label="Enregistrer" name="save_item"/> - <flyout_button.item label="Enregistrer sous..." name="saveas_item"/> - </flyout_button> - <button label="Annuler" left="133" name="discard_btn" width="72"/> - <string name="unknown"> +<floater name="Snapshot" title="Photo" width="247"> + <floater.string name="unknown"> inconnu - </string> + </floater.string> + <button label="Rafraîchir" name="new_snapshot_btn"/> + <line_editor label="Description" name="description"/> + <button label="Partager" name="share"/> + <button label="Partage Web" name="share_to_web"/> + <button label="Dans mon inventaire" name="save_to_inventory"/> + <button label="Enregistrer" name="save"/> + <button label="Envoi par e-mail" name="share_to_email"/> + <button label="Sur mon ordinateur" name="save_to_computer"/> + <button label="Image de profil" name="set_profile_pic"/> + <button label="Précédent" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_tos.xml b/indra/newview/skins/default/xui/fr/floater_tos.xml index cdfd26f402..8a2a1e1d25 100644 --- a/indra/newview/skins/default/xui/fr/floater_tos.xml +++ b/indra/newview/skins/default/xui/fr/floater_tos.xml @@ -1,22 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=" "> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Continuer" label_selected="Continuer" name="Continue"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> - <radio_group name="tos_agreement"> - <radio_item label="Je n'accepte pas les Conditions Générales d'Utilisation" name="radio_disagree"/> - <radio_item label="J'accepte les Conditions Générales d'Utilisation" name="radio_agree"/> - </radio_group> - <text name="tos_title"> - Acceptation des Conditions Générales d'Utilisation - </text> <check_box label="J'accepte les Conditions d'utilisation et le Règlement sur le respect de la vie privée" name="agree_chk"/> <text name="tos_heading"> Veuillez lire attentivement les Conditions d'utilisation et le Règlement sur le respect de la vie privée suivants. Vous devez les accepter pour pouvoir vous connecter à [SECOND_LIFE]. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <text name="real_url"> - http://secondlife.com/app/tos/ - </text> </floater> diff --git a/indra/newview/skins/default/xui/fr/menu_attachment_other.xml b/indra/newview/skins/default/xui/fr/menu_attachment_other.xml index 8d51c1b4e3..f48513eb2b 100644 --- a/indra/newview/skins/default/xui/fr/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/fr/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Signaler" name="abuse"/> <menu_item_call label="Figer" name="Freeze..."/> <menu_item_call label="Expulser" name="Eject..."/> - <menu_item_call label="Débogage" name="Debug..."/> + <menu_item_call label="Déboguer les textures" name="Debug..."/> <menu_item_call label="Zoomer en avant" name="Zoom In"/> <menu_item_call label="Payer" name="Pay..."/> <menu_item_call label="Profil de l'objet" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/fr/menu_attachment_self.xml b/indra/newview/skins/default/xui/fr/menu_attachment_self.xml index 999a1c156c..8bc3182198 100644 --- a/indra/newview/skins/default/xui/fr/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/fr/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Mes amis" name="Friends..."/> <menu_item_call label="Mes groupes" name="Groups..."/> <menu_item_call label="Mon profil" name="Profile..."/> + <menu_item_call label="Déboguer les textures" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_avatar_other.xml b/indra/newview/skins/default/xui/fr/menu_avatar_other.xml index b42271e969..08d1a20361 100644 --- a/indra/newview/skins/default/xui/fr/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/fr/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Signaler" name="abuse"/> <menu_item_call label="Figer" name="Freeze..."/> <menu_item_call label="Expulser" name="Eject..."/> - <menu_item_call label="Débogage" name="Debug..."/> + <menu_item_call label="Déboguer les textures" name="Debug..."/> <menu_item_call label="Zoomer en avant" name="Zoom In"/> <menu_item_call label="Payer" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml index c8643708da..17899b491b 100644 --- a/indra/newview/skins/default/xui/fr/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/fr/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Mes amis" name="Friends..."/> <menu_item_call label="Mes groupes" name="Groups..."/> <menu_item_call label="Mon profil" name="Profile..."/> + <menu_item_call label="Déboguer les textures" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_edit.xml b/indra/newview/skins/default/xui/fr/menu_edit.xml new file mode 100644 index 0000000000..56669f31e1 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Modifier" name="Edit"> + <menu_item_call label="Annuler" name="Undo"/> + <menu_item_call label="Refaire" name="Redo"/> + <menu_item_call label="Couper" name="Cut"/> + <menu_item_call label="Copier" name="Copy"/> + <menu_item_call label="Coller" name="Paste"/> + <menu_item_call label="Supprimer" name="Delete"/> + <menu_item_call label="Dupliquer" name="Duplicate"/> + <menu_item_call label="Tout sélectionner" name="Select All"/> + <menu_item_call label="Désélectionner" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/fr/menu_group_plus.xml b/indra/newview/skins/default/xui/fr/menu_group_plus.xml index f5882261b0..0db5afedc7 100644 --- a/indra/newview/skins/default/xui/fr/menu_group_plus.xml +++ b/indra/newview/skins/default/xui/fr/menu_group_plus.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="menu_group_plus"> - <menu_item_call label="Rejoignez des groupes..." name="item_join"/> + <menu_item_call label="Rejoindre des groupes..." name="item_join"/> <menu_item_call label="Nouveau groupe..." name="item_new"/> </menu> diff --git a/indra/newview/skins/default/xui/fr/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/fr/menu_inspect_avatar_gear.xml index 0da9a1806d..8bda133a0b 100644 --- a/indra/newview/skins/default/xui/fr/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Signaler" name="report"/> <menu_item_call label="Figer" name="freeze"/> <menu_item_call label="Expulser" name="eject"/> - <menu_item_call label="Débogage" name="debug"/> + <menu_item_call label="Déboguer les textures" name="debug"/> <menu_item_call label="Situer sur la carte" name="find_on_map"/> <menu_item_call label="Zoomer en avant" name="zoom_in"/> <menu_item_call label="Payer" name="pay"/> diff --git a/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml index d28d36bca7..b7dafca5ce 100644 --- a/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Mon profil" name="my_profile"/> <menu_item_call label="Mes amis" name="my_friends"/> <menu_item_call label="Mes groupes" name="my_groups"/> + <menu_item_call label="Déboguer les textures" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/fr/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/fr/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..a9b2883cca --- /dev/null +++ b/indra/newview/skins/default/xui/fr/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Fermer" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index 2f6f25dc6b..a7334db46d 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Partager" name="Share"/> <menu_item_call label="Acheter" name="Task Buy"/> <menu_item_call label="Ouvrir" name="Task Open"/> <menu_item_call label="Jouer" name="Task Play"/> @@ -49,9 +50,9 @@ <menu_item_call label="Remplacer la tenue actuelle" name="Replace Outfit"/> <menu_item_call label="Ajouter à la tenue actuelle" name="Add To Outfit"/> <menu_item_call label="Enlever de la tenue actuelle" name="Remove From Outfit"/> + <menu_item_call label="Trouver l'original" name="Find Original"/> <menu_item_call label="Purger l'objet" name="Purge Item"/> <menu_item_call label="Restaurer l'objet" name="Restore Item"/> - <menu_item_call label="Trouver l'original" name="Find Original"/> <menu_item_call label="Ouvrir" name="Open"/> <menu_item_call label="Propriétés" name="Properties"/> <menu_item_call label="Renommer" name="Rename"/> diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml index 91bccfd699..4cfdfd2614 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml @@ -7,7 +7,7 @@ <menu_item_call label="Réinitialiser les filtres" name="reset_filters"/> <menu_item_call label="Fermer tous les dossiers" name="close_folders"/> <menu_item_call label="Vider la corbeille" name="empty_trash"/> - <menu_item_call label="Vider les Objets trouvés" name="empty_lostnfound"/> + <menu_item_call label="Vider les objets trouvés" name="empty_lostnfound"/> <menu_item_call label="Enregistrer la texture sous" name="Save Texture As"/> <menu_item_call label="Trouver l'original" name="Find Original"/> <menu_item_call label="Trouver tous les liens" name="Find All Links"/> diff --git a/indra/newview/skins/default/xui/fr/menu_login.xml b/indra/newview/skins/default/xui/fr/menu_login.xml index fc42b02908..b712c008cd 100644 --- a/indra/newview/skins/default/xui/fr/menu_login.xml +++ b/indra/newview/skins/default/xui/fr/menu_login.xml @@ -8,18 +8,8 @@ <menu_item_call label="Aide de [SECOND_LIFE]" name="Second Life Help"/> <menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Afficher le menu de débogage" name="Show Debug Menu"/> <menu label="Débogage" name="Debug"> - <menu label="Éditer" name="Edit"> - <menu_item_call label="Annuler" name="Undo"/> - <menu_item_call label="Refaire" name="Redo"/> - <menu_item_call label="Couper" name="Cut"/> - <menu_item_call label="Copier" name="Copy"/> - <menu_item_call label="Coller" name="Paste"/> - <menu_item_call label="Supprimer" name="Delete"/> - <menu_item_call label="Dupliquer" name="Duplicate"/> - <menu_item_call label="Tout sélectionner" name="Select All"/> - <menu_item_call label="Désélectionner" name="Deselect"/> - </menu> <menu_item_call label="Afficher les paramètres de débogage" name="Debug Settings"/> <menu_item_call label="Paramètres de couleurs/interface" name="UI/Color Settings"/> <menu_item_call label="Outil d'aperçu XUI" name="UI Preview Tool"/> @@ -28,5 +18,7 @@ <menu_item_call label="Afficher les conditions d'utilisation" name="TOS"/> <menu_item_call label="Afficher le message critique" name="Critical"/> <menu_item_call label="Test du navigateur Web" name="Web Browser Test"/> + <menu_item_check label="Afficher le sélecteur de grille" name="Show Grid Picker"/> + <menu_item_call label="Afficher la console des notifications" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/fr/menu_participant_list.xml b/indra/newview/skins/default/xui/fr/menu_participant_list.xml index c8f5b5f1ad..4434a8e53d 100644 --- a/indra/newview/skins/default/xui/fr/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/fr/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Appeler" name="Call"/> <menu_item_call label="Partager" name="Share"/> <menu_item_call label="Payer" name="Pay"/> + <menu_item_check label="Afficher les icônes des résidents" name="View Icons"/> <menu_item_check label="Bloquer le chat vocal" name="Block/Unblock"/> <menu_item_check label="Ignorer le texte" name="MuteText"/> <context_menu label="Options du modérateur >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/fr/menu_save_outfit.xml b/indra/newview/skins/default/xui/fr/menu_save_outfit.xml new file mode 100644 index 0000000000..fbec933382 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Enregistrer" name="save_outfit"/> + <menu_item_call label="Enregistrer comme nouvelle" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/fr/menu_script_chiclet.xml b/indra/newview/skins/default/xui/fr/menu_script_chiclet.xml new file mode 100644 index 0000000000..46efa30bd6 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Fermer" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index b8a3b65101..64270cbe73 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -31,6 +31,7 @@ <menu_item_call label="Photo" name="Take Snapshot"/> <menu_item_call label="Créer un repère pour ce lieu" name="Create Landmark Here"/> <menu label="Profil du lieu" name="Land"> + <menu_item_call label="Profil du lieu" name="Place Profile"/> <menu_item_call label="À propos du terrain" name="About Land"/> <menu_item_call label="Région/Domaine" name="Region/Estate"/> </menu> @@ -66,17 +67,6 @@ <menu_item_call label="Outil de création" name="Create"/> <menu_item_call label="Outil Terrain" name="Land"/> </menu> - <menu label="Édition" name="Edit"> - <menu_item_call label="Annuler" name="Undo"/> - <menu_item_call label="Refaire" name="Redo"/> - <menu_item_call label="Couper" name="Cut"/> - <menu_item_call label="Copier" name="Copy"/> - <menu_item_call label="Coller" name="Paste"/> - <menu_item_call label="Supprimer" name="Delete"/> - <menu_item_call label="Dupliquer" name="Duplicate"/> - <menu_item_call label="Tout sélectionner" name="Select All"/> - <menu_item_call label="Désélectionner" name="Deselect"/> - </menu> <menu_item_call label="Lien" name="Link"/> <menu_item_call label="Annuler le lien" name="Unlink"/> <menu_item_check label="Modifier les parties liées" name="Edit Linked Parts"/> @@ -124,6 +114,7 @@ <menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avancé" name="Advanced"> + <menu_item_check label="Afficher le menu Avancé" name="Show Advanced Menu"/> <menu_item_call label="Arrêter mon animation" name="Stop Animating My Avatar"/> <menu_item_call label="Refixer les textures" name="Rebake Texture"/> <menu_item_call label="Taille de l'interface par défaut" name="Set UI Size to Default"/> @@ -145,7 +136,6 @@ <menu_item_check label="Mettre la transparence en surbrillance" name="Highlight Transparent"/> <menu_item_check label="Afficher les éléments HUD" name="Show HUD Attachments"/> <menu_item_check label="Afficher le réticule de la vue subjective" name="ShowCrosshairs"/> - <menu_item_check label="Afficher les info-bulles de terrain" name="Land Tips"/> </menu> <menu label="Types de rendu" name="Rendering Types"> <menu_item_check label="Simple" name="Simple"/> diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 38c6b57f5c..d38afe13d2 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -351,7 +351,7 @@ Voulez-vous vraiment continuer ? <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - Supprimer le favori [PICK] ? + Supprimer la sélection <nolink>[PICK]</nolink> ? <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> </notification> <notification name="PromptGoToEventsPage"> @@ -925,6 +925,16 @@ Proposer à [NAME] de devenir votre ami(e) ? <button name="Cancel" text="Annuler"/> </form> </notification> + <notification label="Enregistrer la tenue" name="SaveOutfitAs"> + Enregistrer ce que je porte comme nouvelle tenue : + <form name="form"> + <input name="message"> + [DESC] (nouv.) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annuler"/> + </form> + </notification> <notification name="RemoveFromFriends"> Voulez-vous supprimer [FIRST_NAME] [LAST_NAME] de votre liste d'amis ? <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> @@ -1407,6 +1417,10 @@ Les chats et les messages instantanés ne s'afficheront pas. Les messages i Vous téléporter vers [CLASSIFIED] ? <usetemplate ignoretext="Confirmer que je veux me téléporter à un endroit dans les Petites annonces" name="okcancelignore" notext="Annuler" yestext="Téléporter"/> </notification> + <notification name="TeleportToHistoryEntry"> + Vous téléporter vers [HISTORY_ENTRY] ? + <usetemplate ignoretext="Confirmer que je veux me téléporter à un endroit de l'historique" name="okcancelignore" notext="Annuler" yestext="Téléporter"/> + </notification> <notification label="Envoyer un message à tout le monde dans votre domaine" name="MessageEstate"> Saisissez un message court qui sera envoyé à tous les résidents se trouvant actuellement sur votre domaine. <form name="form"> @@ -1498,6 +1512,9 @@ En cliquant sur Modifier les préférences, vous pourrez changer votre catégori <ignore name="ignore" text="La catégorie de contenu que j'ai choisie m'empêche de pénétrer dans une région"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Votre préférence de catégorie de contenu est désormais [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Votre catégorie d'accès ne vous permet pas de réclamer cette région. Cela vient peut-être du fait qu'il manquait des informations pour valider votre âge. @@ -1913,6 +1930,9 @@ Liez-la à partir d'une page web pour permettre aux autres résidents d&apo <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Annulé </notification> @@ -1941,6 +1961,11 @@ Liez-la à partir d'une page web pour permettre aux autres résidents d&apo Importation de photos SL et Web en cours... (prend environ 5 minutes.) </notification> + <notification name="UploadConfirmation"> + Le chargement coûte [AMOUNT] L$. +Continuer ? + <usetemplate name="okcancelbuttons" notext="Annuler" yestext="Charger"/> + </notification> <notification name="UploadPayment"> Le chargement a coûté [AMOUNT] L$. </notification> @@ -2286,9 +2311,9 @@ Veuillez réessayer dans quelques minutes. </form> </notification> <notification name="TeleportOffered"> - [NAME] vous propose d'être téléporté jusqu'à son emplacement : + [NAME_SLURL] propose de vous téléporter à son emplacement : -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Téléporter"/> <button name="Cancel" text="Annuler"/> @@ -2306,11 +2331,11 @@ Veuillez réessayer dans quelques minutes. </form> </notification> <notification name="OfferFriendship"> - [NAME] vous demande de devenir son ami(e). + [NAME_SLURL] vous demande de devenir son ami(e). [MESSAGE] -(Par défaut, vous pourrez voir lorsque vous êtes tous deux connectés.) +(Par défaut, chacun pourra voir si l'autre est connecté.) <form name="form"> <button name="Accept" text="Accepter"/> <button name="Decline" text="Refuser"/> @@ -2373,6 +2398,9 @@ Venant de l'objet : [OBJECTNAME], appartenant à : [NAME]? <notification name="FailedToFindWearable"> La recherche du [TYPE] nommé(e) [DESC] dans la base de données a échoué. </notification> + <notification name="ShareToWebFailed"> + Échec de chargement de l'image sur le Web. + </notification> <notification name="InvalidWearable"> L'objet que vous essayez de porter utilise une fonctionnalité que le client ne peut lire. Pour porter cet objet, veuillez télécharger une mise à jour de [APP_NAME]. </notification> @@ -2414,14 +2442,6 @@ Accepter cette requête ? <button name="Ignore" text="Ignorer"/> </form> </notification> - <notification name="ScriptToast"> - Le/La [TITLE] de [FIRST] [LAST] demande la participation du résident. - <form name="form"> - <button name="Open" text="Ouvrir la boîte de dialogue"/> - <button name="Ignore" text="Ignorer"/> - <button name="Block" text="Ignorer"/> - </form> - </notification> <notification name="BuyLindenDollarSuccess"> Nous vous remercions de votre paiement. @@ -2577,6 +2597,12 @@ Elles vont être bloquées pendant quelques secondes pour votre sécurité. Le bouton sélectionné ne peut pas être affiché actuellement. Le bouton sera affiché quand il y aura suffisamment de place. </notification> + <notification name="ShareNotification"> + Faire glisser des articles de l'inventaire sur une personne dans le sélecteur de résident + </notification> + <notification name="AvatarRezNotification"> + Avatar [NAME] rezzé en [TIME] secondes. + </notification> <global name="UnsupportedCPU"> - Votre processeur ne remplit pas les conditions minimum requises. </global> diff --git a/indra/newview/skins/default/xui/fr/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/fr/outfit_accordion_tab.xml new file mode 100644 index 0000000000..bac885e5d8 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_eyes.xml b/indra/newview/skins/default/xui/fr/panel_edit_eyes.xml index 7de6ca8b3f..549864e237 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iris" name="Iris" tool_tip="Cliquez pour sélectionner une image"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Yeux"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Yeux"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml b/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml index b1a437497d..7f02222bef 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml @@ -2,9 +2,11 @@ <panel name="edit_gloves_panel"> <panel name="avatar_gloves_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Gants"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Gants"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_hair.xml b/indra/newview/skins/default/xui/fr/panel_edit_hair.xml index 9293c23e19..575cbabc88 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Texture" name="Texture" tool_tip="Cliquez pour sélectionner une image"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Couleur"/> - <accordion_tab name="hair_style_tab" title="Coupe"/> - <accordion_tab name="hair_eyebrows_tab" title="Sourcils"/> - <accordion_tab name="hair_facial_tab" title="Pilosité du visage"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Couleur"/> + <accordion_tab name="hair_style_tab" title="Style"/> + <accordion_tab name="hair_eyebrows_tab" title="Sourcils"/> + <accordion_tab name="hair_facial_tab" title="Pilosité"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml b/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml index b757f60b18..0a87471db8 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml @@ -3,9 +3,11 @@ <panel name="avatar_jacket_color_panel"> <texture_picker label="Tissu (haut)" name="Upper Fabric" tool_tip="Cliquez pour sélectionner une image"/> <texture_picker label="Tissu (bas)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Veste"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Veste"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_pants.xml b/indra/newview/skins/default/xui/fr/panel_edit_pants.xml index 0cebe1e76a..b9f81278e2 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_pants.xml @@ -2,9 +2,11 @@ <panel name="edit_pants_panel"> <panel name="avatar_pants_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Pantalon"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Pantalon"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shape.xml b/indra/newview/skins/default/xui/fr/panel_edit_shape.xml index 450b23608a..98f48887a9 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Homme" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Corps"/> - <accordion_tab name="shape_head_tab" title="Tête"/> - <accordion_tab name="shape_eyes_tab" title="Yeux"/> - <accordion_tab name="shape_ears_tab" title="Oreilles"/> - <accordion_tab name="shape_nose_tab" title="Nez"/> - <accordion_tab name="shape_mouth_tab" title="Bouche"/> - <accordion_tab name="shape_chin_tab" title="Menton"/> - <accordion_tab name="shape_torso_tab" title="Torse"/> - <accordion_tab name="shape_legs_tab" title="Jambes"/> - </accordion> + <panel label="Chemise" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Corps"/> + <accordion_tab name="shape_head_tab" title="Tête"/> + <accordion_tab name="shape_eyes_tab" title="Yeux"/> + <accordion_tab name="shape_ears_tab" title="Oreilles"/> + <accordion_tab name="shape_nose_tab" title="Nez"/> + <accordion_tab name="shape_mouth_tab" title="Bouche"/> + <accordion_tab name="shape_chin_tab" title="Menton"/> + <accordion_tab name="shape_torso_tab" title="Torse"/> + <accordion_tab name="shape_legs_tab" title="Jambes"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml index d6035415d8..e4e66db2ed 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml @@ -2,9 +2,11 @@ <panel name="edit_shirt_panel"> <panel name="avatar_shirt_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Chemise"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Chemise"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml b/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml index ef6d72629c..6fca0fe121 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml @@ -2,9 +2,11 @@ <panel name="edit_shoes_panel"> <panel name="avatar_shoes_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Chaussures"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Chaussures"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_skin.xml b/indra/newview/skins/default/xui/fr/panel_edit_skin.xml index dac005f6b6..9640adcdf8 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_skin.xml @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_skin_panel"> <panel name="avatar_skin_color_panel"> - <texture_picker label="Tatouage tête" name="Head Tattoos" width="76" tool_tip="Cliquez pour sélectionner une image"/> - <texture_picker label="Tatouage haut" name="Upper Tattoos" width="80" tool_tip="Cliquez pour sélectionner une image"/> + <texture_picker label="Tatouage tête" name="Head Tattoos" tool_tip="Cliquez pour sélectionner une image" width="76"/> + <texture_picker label="Tatouage haut" name="Upper Tattoos" tool_tip="Cliquez pour sélectionner une image" width="80"/> <texture_picker label="Tatouage bas" name="Lower Tattoos" tool_tip="Cliquez pour sélectionner une image"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Couleur de peau"/> - <accordion_tab name="skin_face_tab" title="Détails du visage"/> - <accordion_tab name="skin_makeup_tab" title="Maquillage"/> - <accordion_tab name="skin_body_tab" title="Détails du corps"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Couleur"/> + <accordion_tab name="skin_face_tab" title="Détails visage"/> + <accordion_tab name="skin_makeup_tab" title="Maquillage"/> + <accordion_tab name="skin_body_tab" title="Détails corps"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml index 1250c7819d..65fed2fbf4 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml @@ -2,9 +2,11 @@ <panel name="edit_skirt_panel"> <panel name="avatar_skirt_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Jupe"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Jupe"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_socks.xml b/indra/newview/skins/default/xui/fr/panel_edit_socks.xml index bcd69b7dc5..b9e9a07b8c 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_socks.xml @@ -2,9 +2,11 @@ <panel name="edit_socks_panel"> <panel name="avatar_socks_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Chaussettes"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Chaussettes"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml b/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml index dd2670bd75..7eddbd93f6 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml @@ -2,9 +2,11 @@ <panel name="edit_underpants_panel"> <panel name="avatar_underpants_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Caleçon"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Caleçon"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml index 93a08f1189..e6bac22c23 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml @@ -2,9 +2,11 @@ <panel name="edit_undershirt_panel"> <panel name="avatar_undershirt_color_panel"> <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/> - <color_swatch label="Coul./Teinte" name="Color/Tint" width="80" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs"/> + <color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/> + </panel> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Débardeur"/> + </accordion> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Débardeur"/> - </accordion> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml index 1efc9b00a4..3e581f387c 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_wearable.xml @@ -94,8 +94,13 @@ <panel label="Chemise" name="wearable_type_panel"> <text name="description_text" value="Silhouette :"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Options"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Enregistrer sous" name="save_as_button"/> - <button label="Rétablir" width="130" name="revert_button"/> + <button label="Rétablir" name="revert_button" width="130"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_group_general.xml b/indra/newview/skins/default/xui/fr/panel_group_general.xml index cf71a28451..20cb5bd974 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_general.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_general.xml @@ -47,8 +47,11 @@ Faites glisser le pointeur de la souris sur les options pour en savoir plus. <check_box label="Inscription payante" name="check_enrollment_fee" tool_tip="Indique s'il faut payer des frais d'inscription pour rejoindre ce groupe"/> <spinner label="L$" name="spin_enrollment_fee" tool_tip="Les nouveaux membres doivent payer ces frais pour rejoindre le groupe quand l'option Frais d'inscription est cochée."/> <combo_box name="group_mature_check" tool_tip="Définit si votre groupe contient des informations de type Modéré" width="195"> - <combo_box.item label="Contenu Général" name="pg"/> + <combo_item name="select_mature"> + - Catégorie d'accès - + </combo_item> <combo_box.item label="Contenu Modéré" name="mature"/> + <combo_box.item label="Contenu Général" name="pg"/> </combo_box> <check_box initial_value="true" label="Afficher dans la recherche" name="show_in_group_list" tool_tip="Permettre aux autres résidents de voir ce groupe dans les résultats de recherche"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_inventory_item.xml b/indra/newview/skins/default/xui/fr/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml index 1a4450cccc..6cd9db2a5e 100644 --- a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml @@ -23,7 +23,7 @@ <menu_item_call label="Réinitialiser les filtres" name="Reset Current"/> <menu_item_call label="Fermer tous les dossiers" name="Close All Folders"/> <menu_item_call label="Vider la corbeille" name="Empty Trash"/> - <menu_item_call label="Vider les Objets trouvés" name="Empty Lost And Found"/> + <menu_item_call label="Vider les objets trouvés" name="Empty Lost And Found"/> </menu> <menu label="Créer" name="Create"> <menu_item_call label="Nouveau dossier" name="New Folder"/> diff --git a/indra/newview/skins/default/xui/fr/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/fr/panel_media_settings_permissions.xml index f456ee1c83..8f1b436ba1 100644 --- a/indra/newview/skins/default/xui/fr/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/fr/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Propriétaire + </text> <check_box initial_value="false" label="Activer la navigation et l'interactivité" name="perms_owner_interact"/> <check_box initial_value="false" label="Afficher la barre de contrôles" name="perms_owner_control"/> + <text name="group_label"> + Groupe : + </text> <check_box initial_value="false" label="Activer la navigation et l'interactivité" name="perms_group_interact"/> <check_box initial_value="false" label="Afficher la barre de contrôles" name="perms_group_control"/> + <text name="anyone_label"> + Tout le monde + </text> <check_box initial_value="false" label="Activer la navigation et l'interactivité" name="perms_anyone_interact"/> <check_box initial_value="false" label="Afficher la barre de contrôles" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml index ef5a42555e..36388b0bc1 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld articles de média) + </string> <string name="empty_item_text"> <vide> </string> @@ -16,15 +19,10 @@ <button label="Arrêter" name="all_nearby_media_disable_btn" tool_tip="Désactiver tous les médias près de vous"/> <button label="Lire" name="all_nearby_media_enable_btn" tool_tip="Activer tous les médias près de vous"/> <button name="open_prefs_btn" tool_tip="Ouvrir les préférences de média"/> - <button label="Plus >>" label_selected="Moins <<" name="more_less_btn" tool_tip="Options avancées"/> + <button label="Plus >>" label_selected="Moins <<" name="more_btn" tool_tip="Options avancées"/> + <button label="Plus >>" label_selected="Moins <<" name="less_btn" tool_tip="Options avancées"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Médias proches - </text> - <text name="show"> - Voir : - </text> <combo_box name="show_combo"> <combo_box.item label="Tout" name="All"/> <combo_box.item label="Sur cette parcelle" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Nom" name="media_name"/> <scroll_list.columns label="Débogage" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Arrêter le média sélectionné"/> @@ -47,7 +45,7 @@ <button name="play_btn" tool_tip="Lire le média sélectionné"/> </layout_panel> <layout_panel name="pause"> - <button name="pause_btn" tool_tip="Suspendre la lecture du média sélectionné"/> + <button name="pause_btn" tool_tip="Pause du média sélectionné"/> </layout_panel> <layout_panel name="volume_slider_ctrl"> <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Volume audio du média sélectionné"/> diff --git a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml new file mode 100644 index 0000000000..31e1906f01 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Modification de la tenue" name="outfit_edit"> + <string name="No Outfit" value="Pas de tenue"/> + <panel.string name="not_available"> + (s/o) + </panel.string> + <panel.string name="unknown"> + (inconnu) + </panel.string> + <string name="Filter.All" value="Tout"/> + <string name="Filter.Clothes/Body" value="Habits/Corps"/> + <string name="Filter.Objects" value="Objets"/> + <button label="modifier" name="edit_wearable_btn"/> + <text name="title" value="Modifier la tenue"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Modification..."/> + <text name="curr_outfit_name" value="[Current Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="Panneau de contrôle IM" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Article de la tenue" name="look_item"/> + <scroll_list.columns label="Tri des articles de la tenue" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filtre" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="Panneau de contrôle IM" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Ajouter à la tenue :"/> + <button label="F" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="D" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Enregistrer" name="save_btn"/> + <button label="Rétablir" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/fr/panel_outfits_inventory.xml index 9b9d830aaf..f4fa3a2838 100644 --- a/indra/newview/skins/default/xui/fr/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/fr/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Choses" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MES TENUES" name="outfitslist_tab"/> + <panel label="MES TENUES" name="outfitslist_tab"/> <inventory_panel label="PORTÉ" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Supprimer l'objet sélectionné"/> <button label="Enregistrer la tenue" name="make_outfit_btn" tool_tip="Enregistrer l'apparence comme tenue"/> <button label="Porter" name="wear_btn" tool_tip="Porter la tenue sélectionnée"/> - <button label="M" name="look_edit_btn"/> + <button label="Modifier tenue" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_people.xml b/indra/newview/skins/default/xui/fr/panel_people.xml index 8d17d9ffdf..e1ba2990cc 100644 --- a/indra/newview/skins/default/xui/fr/panel_people.xml +++ b/indra/newview/skins/default/xui/fr/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Résidents" name="people_panel"> - <string name="no_people" value="Personne"/> - <string name="no_one_near" value="Personne près de vous"/> + <string name="no_recent_people" value="Personne de récent. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/> + <string name="no_filtered_recent_people" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]."/> + <string name="no_one_near" value="Personne près de vous. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/> + <string name="no_one_filtered_near" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]."/> <string name="no_friends_online" value="Pas d'amis connectés"/> <string name="no_friends" value="Pas d'amis"/> + <string name="no_friends_msg"> + Pour rechercher des amis, utilisez [secondlife:///app/search/people Rechercher] ou cliquez-droit sur le résident à ajouter comme ami. +Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife:///app/worldmap Carte du monde]. + </string> + <string name="no_filtered_friends_msg"> + Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/people Rechercher]. + </string> <string name="people_filter_label" value="Filtrer les personnes"/> <string name="groups_filter_label" value="Filtrer les groupes"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Trouver le groupe via la recherche ?]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Rechercher des groupes à rejoindre.]"/> + <string name="no_filtered_groups_msg" value="Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/groups Rechercher]."/> + <string name="no_groups_msg" value="Vous souhaitez trouver des groupes à rejoindre ? Utilisez [secondlife:///app/search/groups Rechercher]."/> <filter_editor label="Filtre" name="filter_input"/> <tab_container name="tabs"> <panel label="PRÈS DE VOUS" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Proposer à un résident de devenir votre ami"/> <button name="del_btn" tool_tip="Supprimer le résident sélectionné de votre liste d'amis"/> </panel> - <text name="no_friends_msg"> - Pour ajouter des amis, utilisez la [secondlife:///app/search/people recherche] ou cliquez-droit sur le résident à ajouter comme ami. -Si vous souhaitez rencontrer d'autres résidents, cliquez sur [secondlife:///app/worldmap la carte]. - </text> </panel> <panel label="MES GROUPES" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/fr/panel_places.xml b/indra/newview/skins/default/xui/fr/panel_places.xml index 92b0a6c1db..9990c4612d 100644 --- a/indra/newview/skins/default/xui/fr/panel_places.xml +++ b/indra/newview/skins/default/xui/fr/panel_places.xml @@ -11,5 +11,6 @@ <button label="Enregistrer" name="save_btn"/> <button label="Annuler" name="cancel_btn"/> <button label="Fermer" name="close_btn"/> + <button label="Profil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml index f8ecfbedac..97f5d1ad91 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="Bulles de chat" name="bubble_text_chat"/> <slider label="Opacité" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Choisir la couleur des bulles de chat"/> + <text name="UI Size:"> + Taille de l'interface + </text> <check_box label="Afficher les erreurs de script dans :" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat près de moi" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Touche de contrôle de la fonction Appuyer pour parler" name="modifier_combo"/> <button label="Définir la touche" name="set_voice_hotkey_button"/> <button label="Bouton central de la souris" name="set_voice_middlemouse_button" tool_tip="Réinitialiser sur le bouton central de la souris"/> + <button label="Autres accessoires" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_world_map.xml b/indra/newview/skins/default/xui/fr/panel_world_map.xml index e6e95c2605..972aae1fab 100644 --- a/indra/newview/skins/default/xui/fr/panel_world_map.xml +++ b/indra/newview/skins/default/xui/fr/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NO </panel.string> + <panel.string name="world_map_person"> + 1 personne + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] personnes + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml index eba399f6a3..f92f142c64 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Profil" name="info_btn"/> + <button label="Partager" name="share_btn"/> <button label="Porter" name="wear_btn"/> <button label="Jouer" name="play_btn"/> <button label="Téléporter" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0ea11bb80f..8bbb5f6be5 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -32,7 +32,7 @@ Initialisation du cache des textures... </string> <string name="StartupInitializingVFS"> - Initialisation VFS… + Initialisation VFS... </string> <string name="ProgressRestoring"> Restauration... @@ -261,6 +261,9 @@ <string name="BUTTON_CLOSE_WIN"> Fermer (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Fermer + </string> <string name="BUTTON_RESTORE"> Restaurer </string> @@ -303,6 +306,9 @@ <string name="GroupNameNone"> (aucun) </string> + <string name="AvalineCaller"> + Appelant Avaline [ORDER] + </string> <string name="AssetErrorNone"> Aucune erreur </string> @@ -904,7 +910,7 @@ Appuyez sur ESC pour quitter la vue subjective </string> <string name="InventoryNoMatchingItems"> - Objet inexistant dans l'inventaire. Voir [secondlife:///app/search/groups "Rechercher"]. + Vous n'avez pas trouvé ce que vous cherchiez ? Utilisez [secondlife:///app/search/all Rechercher]. </string> <string name="FavoritesNoMatchingItems"> Faites glisser un repère ici pour l'ajouter à vos Favoris. @@ -1575,9 +1581,7 @@ <string name="RegionNoCovenantOtherOwner"> Il n'y a aucun règlement pour ce domaine. Le terrain sur ce domaine est vendu par le propriétaire, non par Linden Lab. Pour en savoir plus, veuillez contacter le propriétaire. </string> - <string name="covenant_last_modified"> - Dernière modification : - </string> + <string name="covenant_last_modified" value="Dernière modification :"/> <string name="none_text" value=" (aucun)"/> <string name="never_text" value=" (jamais)"/> <string name="GroupOwned"> @@ -2085,7 +2089,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Large </string> <string name="Brow Size"> - Taille + Taille du front </string> <string name="Bug Eyes"> Yeux globuleux @@ -2235,7 +2239,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Extrémités </string> <string name="Egg Head"> - Forme de la tête + Proéminence </string> <string name="Eye Bags"> Cernes @@ -2361,7 +2365,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Gants avec doigts </string> <string name="Glove Length"> - Longueur des gants + Longueur </string> <string name="Hair"> Cheveux @@ -2475,7 +2479,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Angle mâchoire </string> <string name="Jaw Jut"> - Saillie de la mâchoire + Saillie mâchoire </string> <string name="Jaw Shape"> Mâchoire @@ -2559,7 +2563,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Fente labiale </string> <string name="Lip Cleft Depth"> - Fente labiale + Prof. fente labiale </string> <string name="Lip Fullness"> Volume des lèvres @@ -2643,7 +2647,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Abaisser </string> <string name="Lower Bridge"> - Arête plus basse + Arête inférieure </string> <string name="Lower Cheeks"> Joue inférieure @@ -2817,19 +2821,19 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Épaisseur du nez </string> <string name="Nose Tip Angle"> - Bout du nez + Angle bout du nez </string> <string name="Nose Tip Shape"> - Bout du nez + Forme bout du nez </string> <string name="Nose Width"> Largeur du nez </string> <string name="Nostril Division"> - Division des narines + Division narines </string> <string name="Nostril Width"> - Largeur des narines + Largeur narines </string> <string name="Opaque"> Opaque @@ -2919,10 +2923,10 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Plus rose </string> <string name="Platform Height"> - Plateforme (hauteur) + Platef. (hauteur) </string> <string name="Platform Width"> - Plateforme (largeur) + Platef. (largeur) </string> <string name="Pointy"> Pointue @@ -2946,7 +2950,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Plus </string> <string name="Puffy Eyelids"> - Cernes + Paup. gonflées </string> <string name="Rainbow Color"> Couleur arc en ciel @@ -3012,7 +3016,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Vers la gauche </string> <string name="Shift Mouth"> - Déplacer la bouche + Déplacement </string> <string name="Shift Right"> Vers la droite @@ -3210,7 +3214,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Forme de l'orteil </string> <string name="Toe Thickness"> - Épaisseur de l'orteil + Épaisseur orteil </string> <string name="Torso Length"> Longueur du torse @@ -3237,7 +3241,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Arête supérieure </string> <string name="Upper Cheeks"> - Pommette + Joue supérieure </string> <string name="Upper Chin Cleft"> Menton supérieur @@ -3311,6 +3315,15 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="LocationCtrlDamageTooltip"> Santé </string> + <string name="LocationCtrlAdultIconTooltip"> + Région de type Adulte + </string> + <string name="LocationCtrlModerateIconTooltip"> + Région de type Modéré + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Région de type Général + </string> <string name="UpdaterWindowTitle"> [APP_NAME] - Mise à jour </string> @@ -3341,6 +3354,12 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Impossible de lancer le client </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME] : transfert trop rapide des articles de [FROM_NAME] ; aperçu automatique désactivé pendant [TIME] secondes + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME] : transfert trop rapide des articles ; aperçu automatique désactivé pendant [TIME] secondes + </string> <string name="IM_logging_string"> -- Archivage des IM activé -- </string> @@ -3368,6 +3387,9 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="IM_moderator_label"> (Modérateur) </string> + <string name="answered_call"> + Votre appel a fait l'objet d'une réponse + </string> <string name="started_call"> A appelé quelqu'un </string> @@ -3461,12 +3483,18 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] ont dit quelque chose de nouveau </string> + <string name="session_initialization_timed_out_error"> + Expiration du délai d'initialisation de la session + </string> <string name="paid_you_ldollars"> [NAME] vous a payé [AMOUNT] L$ </string> <string name="you_paid_ldollars"> Vous avez payé à [AMOUNT] L$ [REASON]. </string> + <string name="you_paid_ldollars_no_info"> + Vous avez payé [AMOUNT] L$. + </string> <string name="you_paid_ldollars_no_reason"> Vous avez payé à [NAME] [AMOUNT] L$. </string> @@ -3577,4 +3605,13 @@ de l'infraction signalée <string name="Contents"> Contenus </string> + <string name="AvatarBirthDateFormat"> + [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + aucun/aucun + </string> + <string name="texture_load_dimensions_error"> + Impossible de charger des images de taille supérieure à [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml index 495c24f5e9..55e699612c 100644 --- a/indra/newview/skins/default/xui/it/floater_about.xml +++ b/indra/newview/skins/default/xui/it/floater_about.xml @@ -43,19 +43,14 @@ Versione Vivox: [VIVOX_VERSION] </panel> <panel label="Ringraziamenti" name="credits_panel"> <text_editor name="credits_editor"> - Second Life ti è offerto da Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les and many others. + Second Life ti è offerto da Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain e molti altri ancora. -Si ringraziano i seguenti residenti per aver contribuito a rendere questa versione la migliore possibile: (in corso) +Si ringraziano i seguenti residenti per aver contribuito a rendere questa versione la migliore possibile: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan e molti altri ancora. - - - - -Senza dubbio è una mente rara quella che può rendere brillantemente ovvio il finora mai esistito. Dichiarare "Avrei potuto pensare a tutto questo" è molto comune e fuorviante, per il motivo che non l'hanno fatto, e anche questo fatto è assai significativo e rivelativo. - -- Douglas Adams +"Il lavoro continua, la causa sussiste, la speranza vive ancora e i sogni non svaniranno mai" - Edward Kennedy </text_editor> </panel> <panel label="Licenze" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index bc23c2e8ff..4c3398de87 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -79,7 +79,7 @@ Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezz Categoria di accesso: </text> <text left="119" name="ContentRatingText"> - Adult + Adulti </text> <text name="Owner:"> Proprietario: @@ -139,10 +139,10 @@ Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezz <button label="Acquista il terreno..." label_selected="Acquista il terreno..." left="130" name="Buy Land..." width="125"/> <button label="Informazioni script" name="Scripts..."/> <button label="Acquista per il gruppo" name="Buy For Group..."/> - <button label="Compra pass..." label_selected="Compra pass..." left="130" name="Buy Pass..." tool_tip="Un pass ti da un accesso temporaneo in questo territorio." width="125"/> + <button label="Compra Pass..." label_selected="Compra Pass..." left="130" name="Buy Pass..." tool_tip="Un pass ti da un accesso temporaneo in questo territorio." width="125"/> <button label="Abbandona la terra" name="Abandon Land..."/> <button label="Reclama la terra" name="Reclaim Land..."/> - <button label="Vendita Linden" name="Linden Sale..." tool_tip="La terra deve essere posseduta, con contenuto impostato, e non già messa in asta."/> + <button label="Vendita Linden" name="Linden Sale..." tool_tip="La terra deve essere di proprietà , con contenuto impostato, e non già messa all'asta."/> </panel> <panel label="REGOLAMENTO" name="land_covenant_panel"> <panel.string name="can_resell"> @@ -193,7 +193,7 @@ o suddivisa. Categoria di accesso: </text> <text left="125" name="region_maturity_text"> - Adult + Adulti </text> <text name="resellable_lbl"> Rivendita: @@ -266,7 +266,7 @@ o suddivisa. <text left="214" name="selected_objects_text" width="48"> [COUNT] </text> - <text left="4" name="Autoreturn" width="412"> + <text name="Autoreturn"> Restituzione automatica degli oggetti di altri residenti (minuti, 0 per disattivarla): </text> <line_editor name="clean other time" right="-20"/> @@ -294,16 +294,16 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. Questa opzione è disabilitata perchè tu non puoi modificare le opzioni di questo terreno. </panel.string> <panel.string name="mature_check_mature"> - Contenuto Mature + Contenuto Moderato </panel.string> <panel.string name="mature_check_adult"> - Contenuto Adult + Contenuto Adulti </panel.string> <panel.string name="mature_check_mature_tooltip"> - Il contenuto o le informazioni del tuo terreno sono considerate Mature. + Il contenuto o le informazioni del tuo terreno sono considerate di tipo Moderato. </panel.string> <panel.string name="mature_check_adult_tooltip"> - Il contenuto o le informazioni del tuo terreno sono considerate Adult. + Il contenuto o le informazioni del tuo terreno sono considerate di tipo per Adulti. </panel.string> <panel.string name="landing_point_none"> (nessuno) @@ -343,10 +343,10 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <combo_box left="282" name="land category with adult" width="140"> <combo_box.item label="Tutte le categorie" name="item0"/> <combo_box.item label="Luogo dei Linden" name="item1"/> - <combo_box.item label="Adult" name="item2"/> - <combo_box.item label="Arte & Cultura" name="item3"/> + <combo_box.item label="Adulti" name="item2"/> + <combo_box.item label="Arte e cultura" name="item3"/> <combo_box.item label="Affari" name="item4"/> - <combo_box.item label="Educazione" name="item5"/> + <combo_box.item label="Istruzione" name="item5"/> <combo_box.item label="Gioco" name="item6"/> <combo_box.item label="Divertimento" name="item7"/> <combo_box.item label="Accoglienza nuovi residenti" name="item8"/> @@ -369,7 +369,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <combo_box.item label="Shopping" name="item11"/> <combo_box.item label="Altro" name="item12"/> </combo_box> - <check_box label="Contenuto Mature" name="MatureCheck" tool_tip=" "/> + <check_box label="Contenuti di tipo Moderato" name="MatureCheck" tool_tip=" "/> <text name="Snapshot:"> Fotografia: </text> diff --git a/indra/newview/skins/default/xui/it/floater_animation_preview.xml b/indra/newview/skins/default/xui/it/floater_animation_preview.xml index c3ee23898c..77341cad63 100644 --- a/indra/newview/skins/default/xui/it/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_animation_preview.xml @@ -141,35 +141,35 @@ La lunghezza massima è [MAX_LENGTH] secondi. Espressione </text> <combo_box left_delta="100" name="emote_combo" tool_tip="Definisce ciò che fa il viso durante l'animazione" width="184"> - <combo_box.item label="(Nessuno)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Spavento" name="Afraid"/> - <combo_box.item label="Arrabbiato" name="Angry"/> - <combo_box.item label="Grande sorriso" name="BigSmile"/> - <combo_box.item label="Annoiato" name="Bored"/> - <combo_box.item label="Pianto" name="Cry"/> - <combo_box.item label="Disdegno" name="Disdain"/> - <combo_box.item label="Imbarazzato" name="Embarrassed"/> - <combo_box.item label="Accigliato" name="Frown"/> - <combo_box.item label="Bacio" name="Kiss"/> - <combo_box.item label="Risata" name="Laugh"/> - <combo_box.item label="Plllppt" name="Plllppt"/> - <combo_box.item label="Repulsione" name="Repulsed"/> - <combo_box.item label="Triste" name="Sad"/> - <combo_box.item label="Scrollata di spalle" name="Shrug"/> - <combo_box.item label="Sorriso" name="Smile"/> - <combo_box.item label="Stupore" name="Surprise"/> - <combo_box.item label="Occhiolino" name="Wink"/> - <combo_box.item label="Preoccupato" name="Worry"/> + <item label="(Nessuno)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Spavento" name="Afraid" value="Spavento"/> + <item label="Arrabbiato" name="Angry" value="Arrabbiato"/> + <item label="Grande sorriso" name="BigSmile" value="Grande sorriso"/> + <item label="Annoiato" name="Bored" value="Annoiato"/> + <item label="Pianto" name="Cry" value="Pianto"/> + <item label="Disdegno" name="Disdain" value="Disdegno"/> + <item label="Imbarazzato" name="Embarrassed" value="Imbarazzato"/> + <item label="Accigliato" name="Frown" value="Accigliato"/> + <item label="Bacio" name="Kiss" value="Bacio"/> + <item label="Risata" name="Laugh" value="Risata"/> + <item label="Plllppt" name="Plllppt" value="Linguaccia"/> + <item label="Repulsione" name="Repulsed" value="Repulsione"/> + <item label="Triste" name="Sad" value="Triste"/> + <item label="Scrollata di spalle" name="Shrug" value="Scrollata di spalle"/> + <item label="Sorriso" name="Smile" value="Sorriso"/> + <item label="Stupore" name="Surprise" value="Stupore"/> + <item label="Occhiolino" name="Wink" value="Occhiolino"/> + <item label="Preoccupato" name="Worry" value="Preoccupato"/> </combo_box> <text name="preview_label" width="250"> Vedi anteprima mentre </text> <combo_box left_delta="154" name="preview_base_anim" tool_tip="Da usarsi per controllare il comportamento dell'animazione mentre l'avatar svolge azioni abituali." width="130"> - <combo_box.item label="In piedi" name="Standing"/> - <combo_box.item label="Camminando" name="Walking"/> - <combo_box.item label="Seduto" name="Sitting"/> - <combo_box.item label="Volo" name="Flying"/> + <item label="In piedi" name="Standing" value="In piedi"/> + <item label="Camminando" name="Walking" value="Cammina"/> + <item label="Seduto" name="Sitting" value="Seduto"/> + <item label="Volo" name="Flying" value="Volo"/> </combo_box> <spinner label="Avvio lento (sec)" label_width="125" name="ease_in_time" tool_tip="Durata (in secondi) della fusione in entrata delle animazioni" width="192"/> <spinner bottom_delta="-20" label="Arresto lento (sec)" label_width="125" left="10" name="ease_out_time" tool_tip="Durata (in secondi) della fusione in uscita delle animazioni" width="192"/> diff --git a/indra/newview/skins/default/xui/it/floater_customize.xml b/indra/newview/skins/default/xui/it/floater_customize.xml index 75ddf43f65..63c26b4d73 100644 --- a/indra/newview/skins/default/xui/it/floater_customize.xml +++ b/indra/newview/skins/default/xui/it/floater_customize.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="ASPETTO" width="551"> - <tab_container name="customize tab container" tab_min_width="120" width="549"> +<floater name="floater customize" title="ASPETTO"> + <tab_container name="customize tab container" tab_min_width="120"> <text label="Parti del corpo" name="body_parts_placeholder"> Parti del corpo </text> - <panel label="Forma del corpo" left="124" name="Shape" width="389"> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <panel label="Forma del corpo" left="124" name="Shape"> + <button label="Crea una nuova forma del corpo" label_selected="Crea una nuova forma del corpo" name="Create New" width="190"/> <button label="Corpo" label_selected="Corpo" name="Body"/> <button label="Testa" label_selected="Testa" name="Head"/> <button label="Occhi" label_selected="Occhi" name="Eyes"/> @@ -40,12 +40,12 @@ <text name="no modify instructions"> Non hai il permesso di modificare questo indumento. </text> - <text name="Item Action Label" right="89"> + <text name="Item Action Label"> Forma del corpo: </text> - <button label="Crea una nuova forma del corpo" label_selected="Crea una nuova forma del corpo" name="Create New" width="190"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> - <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> + <button label="Salva" label_selected="Salva" name="Save"/> + <button label="Salva come..." label_selected="Salva come..." name="Save As"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert"/> </panel> <panel label="Pelle" name="Skin"> <button label="Colore della pelle" label_selected="Colore della pelle" name="Skin Color" width="115"/> @@ -80,9 +80,9 @@ <texture_picker label="Tatuaggi: superiori" name="Upper Tattoos" tool_tip="Clicca per scegliere un'immagine" width="96"/> <texture_picker label="Tatuaggi: inferiori" name="Lower Tattoos" tool_tip="Clicca per scegliere un'immagine" width="96"/> <button label="Crea una nuova pelle" label_selected="Crea una nuova pelle" name="Create New"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> - <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button label="Salva" label_selected="Salva" name="Save"/> + <button label="Salva come..." label_selected="Salva come..." name="Save As"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert"/> </panel> <panel label="Capelli" name="Hair"> <button label="Capelli" label_selected="Colore" name="Color"/> @@ -115,9 +115,9 @@ </text> <texture_picker label="Texture" name="Texture" tool_tip="Clicca per scegliere un'immagine"/> <button label="Crea nuovi capelli" label_selected="Crea nuovi capelli" name="Create New"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Occhi" name="Eyes"> <text name="title"> @@ -146,9 +146,9 @@ </text> <texture_picker label="Iride" name="Iris" tool_tip="Clicca per scegliere un'immagine"/> <button label="Crea nuovi occhi" label_selected="Crea nuovi occhi" name="Create New"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <text label="Vestiti" name="clothes_placeholder"> Abiti @@ -158,9 +158,9 @@ <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button label="Togli" label_selected="Togli" name="Take Off"/> <button label="Crea una nuova camicia" label_selected="Crea una nuova camicia" name="Create New"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> <text name="title"> [DESC] </text> @@ -191,9 +191,9 @@ <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button label="Togli" label_selected="Togli" name="Take Off"/> <button label="Crea nuovi pantaloni" label_selected="Crea nuovi pantaloni" name="Create New"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> <text name="title"> [DESC] </text> @@ -248,9 +248,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button label="Togli" label_selected="Togli" name="Take Off"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Calze" name="Socks"> <text name="title"> @@ -281,9 +281,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button label="Togli" label_selected="Togli" name="Take Off"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Giacca" name="Jacket"> <text name="title"> @@ -315,9 +315,9 @@ <texture_picker label="Tessuto: inferiore" name="Lower Fabric" tool_tip="Clicca per scegliere un'immagine" width="96"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button label="Togli" label_selected="Togli" name="Take Off"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Guanti" name="Gloves"> <text name="title"> @@ -348,9 +348,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Canottiera" name="Undershirt"> <text name="title"> @@ -381,9 +381,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Mutande" name="Underpants"> <text name="title"> @@ -414,9 +414,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Gonna" name="Skirt"> <text name="title"> @@ -447,9 +447,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere un'immagine"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> <button font="SansSerifSmall" label="Rimuovi l'indumento" label_selected="Rimuovi l'indumento" name="Take Off" width="115"/> - <button label="Salva" label_selected="Salva" left="95" name="Save" width="72"/> + <button label="Salva" label_selected="Salva" name="Save"/> <button label="Salva come..." label_selected="Salva come..." left="171" name="Save As"/> - <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" left="267" name="Revert" width="120"/> + <button font="SansSerifSmall" label="Annulla le modifiche" label_selected="Annulla le modifiche" name="Revert" width="120"/> </panel> <panel label="Tatuaggio" name="Tattoo"> <text name="title"> @@ -522,7 +522,7 @@ <button label="Ripristina" label_selected="Ripristina" name="Revert"/> </panel> </tab_container> - <scroll_container left="254" name="panel_container"/> + <scroll_container name="panel_container"/> <button label="Informazioni script" label_selected="Informazioni script" name="script_info" tool_tip="Mostra gli script collegati al tuo avatar"/> <button label="Crea vestiario" label_selected="Crea vestiario" name="make_outfit_btn"/> <button label="Annulla" label_selected="Annulla" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/it/floater_god_tools.xml b/indra/newview/skins/default/xui/it/floater_god_tools.xml index 23d44780ac..32c79936cf 100644 --- a/indra/newview/skins/default/xui/it/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_god_tools.xml @@ -1,11 +1,17 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="godtools floater" title="GOD TOOLS"> <tab_container name="GodTools Tabs"> - <panel label="Grid" name="grid"> - <button label="Espelli tutti i residenti" label_selected="Espelli tutti i residenti" name="Kick all users"/> - </panel> + <panel label="Grid" name="grid"/> <panel label="Region" name="region"> + <text name="Region Name:"> + Nome regione: + </text> <check_box label="Reset Home On Teleport" name="check reset home" tool_tip="Quando un residente esce con un teleport, reimposta la sua posizione di base sul luogo di destinazione."/> </panel> + <panel label="Objects" name="objects"> + <text name="Region Name:"> + Nome regione: + </text> + </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_image_preview.xml b/indra/newview/skins/default/xui/it/floater_image_preview.xml index 6169c0222d..ee7be7b155 100644 --- a/indra/newview/skins/default/xui/it/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_image_preview.xml @@ -11,16 +11,16 @@ immagine come: </text> <combo_box label="Tipo d'abito" left="120" name="clothing_type_combo" width="166"> - <combo_box.item label="Immagine" name="Image"/> - <combo_box.item label="Capigliature" name="Hair"/> - <combo_box.item label="Testa femminile" name="FemaleHead"/> - <combo_box.item label="Parte superiore del corpo femminile" name="FemaleUpperBody"/> - <combo_box.item label="Parte inferiore del corpo femminile" name="FemaleLowerBody"/> - <combo_box.item label="Testa maschile" name="MaleHead"/> - <combo_box.item label="Parte superiore del corpo maschile" name="MaleUpperBody"/> - <combo_box.item label="Parte inferiore del corpo maschile" name="MaleLowerBody"/> - <combo_box.item label="Gonna" name="Skirt"/> - <combo_box.item label="Prim Sculpted" name="SculptedPrim"/> + <item label="Immagine" name="Image" value="Immagine"/> + <item label="Capigliature" name="Hair" value="Capigliature"/> + <item label="Testa femminile" name="FemaleHead" value="Testa femminile"/> + <item label="Parte superiore del corpo femminile" name="FemaleUpperBody" value="Parte superiore del corpo femminile"/> + <item label="Parte inferiore del corpo femminile" name="FemaleLowerBody" value="Parte inferiore del corpo femminile"/> + <item label="Testa maschile" name="MaleHead" value="Testa maschile"/> + <item label="Parte superiore del corpo maschile" name="MaleUpperBody" value="Parte superiore del corpo maschile"/> + <item label="Parte inferiore del corpo maschile" name="MaleLowerBody" value="Parte inferiore del corpo maschile"/> + <item label="Gonna" name="Skirt" value="Gonna"/> + <item label="Prim Sculpted" name="SculptedPrim" value="Prim Sculpted"/> </combo_box> <text name="bad_image_text"> Non è stato possibile leggere l'immagine. diff --git a/indra/newview/skins/default/xui/it/floater_outgoing_call.xml b/indra/newview/skins/default/xui/it/floater_outgoing_call.xml index 268d46e07e..cdb180bacd 100644 --- a/indra/newview/skins/default/xui/it/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/it/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Sei stato scollegato da [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] ha chiuso la chiamata. [RECONNECT_NEARBY] + La chiamata è terminata. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Hai chiuso la chiamata. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/it/floater_report_abuse.xml b/indra/newview/skins/default/xui/it/floater_report_abuse.xml index 4827cc739d..eeba54b0ca 100644 --- a/indra/newview/skins/default/xui/it/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/it/floater_report_abuse.xml @@ -67,8 +67,8 @@ <combo_box.item label="Molestie > Abusi verbali" name="Harassment__Verbal_abuse"/> <combo_box.item label="Indecenza > Condotta o contenuti largamente offensivi" name="Indecency__Broadly_offensive_content_or_conduct"/> <combo_box.item label="Indecenza > Nome di un avatar inappropriato" name="Indecency__Inappropriate_avatar_name"/> - <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione PG" name="Indecency__Mature_content_in_PG_region"/> - <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione Mature" name="Indecency__Inappropriate_content_in_Mature_region"/> + <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione con accesso Generale" name="Indecency__Mature_content_in_PG_region"/> + <combo_box.item label="Indecenza > Contenuto o condotta inappropriata in una regione con accesso Moderato" name="Indecency__Inappropriate_content_in_Mature_region"/> <combo_box.item label="Violazione della proprietà intellettuale > Rimozione contenuti" name="Intellectual_property_infringement_Content_Removal"/> <combo_box.item label="Violazione della proprietà intellettuale > CopyBot o sblocco di permessi" name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"/> <combo_box.item label="Intolleranza" name="Intolerance"/> diff --git a/indra/newview/skins/default/xui/it/floater_snapshot.xml b/indra/newview/skins/default/xui/it/floater_snapshot.xml index 03aaed46be..2f5c86985c 100644 --- a/indra/newview/skins/default/xui/it/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/it/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="ANTEPRIMA FOTOGRAFIA" width="247"> - <text name="type_label"> - Destinazione della fotografia - </text> - <radio_group label="Tipo di fotografia" name="snapshot_type_radio" width="228"> - <radio_item label="E-mail" name="postcard"/> - <radio_item label="Il mio inventario (L$[AMOUNT])" name="texture"/> - <radio_item label="Salva sul mio computer" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Aggiorna la fotografia" name="new_snapshot_btn"/> - <button label="Invia" name="send_btn"/> - <button label="Salva ([AMOUNT] L$)" name="upload_btn"/> - <flyout_button label="Salva" name="save_btn" tool_tip="Salva l'immagine come file"> - <flyout_button_item label="Salva" name="save_item"/> - <flyout_button_item label="Salva con nome..." name="saveas_item"/> - </flyout_button> - <button label="Annulla" name="discard_btn"/> - <button label="Altro" name="more_btn" tool_tip="Opzioni Avanzate"/> - <button label="Meno" name="less_btn" tool_tip="Opzioni Avanzate"/> - <text name="type_label2"> - Grandezza - </text> - <text name="format_label"> - Formato - </text> - <combo_box label="Risoluzione" name="postcard_size_combo"> - <combo_box.item label="Finestra corrente" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Personalizzata" name="Custom"/> - </combo_box> - <combo_box label="Risoluzione" name="texture_size_combo"> - <combo_box.item label="Finestra corrente" name="CurrentWindow"/> - <combo_box.item label="Piccola (128x128)" name="Small(128x128)"/> - <combo_box.item label="Media (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Larga (512x512)" name="Large(512x512)"/> - <combo_box.item label="Personalizzata" name="Custom"/> - </combo_box> - <combo_box label="Risoluzione" name="local_size_combo"> - <combo_box.item label="Finestra corrente" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Personalizzata" name="Custom"/> - </combo_box> - <combo_box label="Formato" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Larghezza" label_width="58" name="snapshot_width" width="116"/> - <spinner label="Altezza" label_width="41" left="130" name="snapshot_height" width="101"/> - <check_box label="Mantieni le proporzioni" name="keep_aspect_check"/> - <slider label="Qualità dell'immagine" name="image_quality_slider"/> - <text name="layer_type_label" width="55"> - Fotografa: - </text> - <combo_box label="Layer dell'immagine" left="68" name="layer_types" width="165"> - <combo_box.item label="Colori" name="Colors"/> - <combo_box.item label="Profondità " name="Depth"/> - <combo_box.item label="Colori primari degli oggetti" name="ObjectMattes"/> - </combo_box> - <check_box label="Interfaccia" name="ui_check"/> - <check_box bottom_delta="-17" label="HUD" name="hud_check"/> - <check_box bottom_delta="-17" label="Mantieni aperto dopo aver salvato" name="keep_open_check"/> - <check_box bottom_delta="-17" label="Congela il frame (pieno schermo)" name="freeze_frame_check"/> - <check_box bottom_delta="-29" label="Auto-Aggiorna" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Istantanea" width="247"> + <floater.string name="unknown"> sconosciuto - </string> + </floater.string> + <button label="Aggiorna la fotografia" name="new_snapshot_btn"/> + <line_editor label="Descrizione" name="description"/> + <button label="Condividi foto" name="share"/> + <button label="Condividi su Web" name="share_to_web"/> + <button label="Salva nell'inventario" name="save_to_inventory"/> + <button label="Salva foto" name="save"/> + <button label="Invia foto via e-mail" name="share_to_email"/> + <button label="Salva sul mio computer" name="save_to_computer"/> + <button label="Imposta come foto del profilo" name="set_profile_pic"/> + <button label="Indietro" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 6ad8d68df2..cd16246f0f 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="toolbox floater" short_title="STRUMENTI PER COSTRUZIONE" title="" width="288"> +<floater name="toolbox floater" short_title="STRUMENTI PER COSTRUZIONE"> <floater.string name="status_rotate"> Sposta le fasce colorate per ruotare l'oggetto </floater.string> @@ -39,12 +39,12 @@ <floater.string name="grid_attachment_text"> Accessorio </floater.string> - <button label="" label_selected="" name="button focus" tool_tip="Focus"/> - <button label="" label_selected="" name="button move" tool_tip="Muoviti"/> + <button label="" label_selected="" name="button focus" tool_tip="Ingrandisci"/> + <button label="" label_selected="" name="button move" tool_tip="Sposta"/> <button label="" label_selected="" name="button edit" tool_tip="Modifica"/> <button label="" label_selected="" name="button create" tool_tip="Crea"/> - <button label="" label_selected="" name="button land" tool_tip="Terra"/> - <text name="text status" width="280"> + <button label="" label_selected="" name="button land" tool_tip="Terreno"/> + <text name="text status"> Trascina per muovere, trascina+maiuscolo per copiare </text> <radio_group name="focus_radio_group"> @@ -70,7 +70,7 @@ <check_box label="Ridimens. simmetricamente" name="checkbox uniform"/> <check_box initial_value="true" label="Ridimensiona le texture" name="checkbox stretch textures"/> <check_box initial_value="true" label="Posiziona nella griglia" name="checkbox snap to grid"/> - <combo_box left_delta="48" name="combobox grid mode" tool_tip="Scegli il tipo di righello per posizionare l'oggetto"> + <combo_box name="combobox grid mode" tool_tip="Scegli il tipo di righello per posizionare l'oggetto"> <combo_box.item label="Rete del mondo" name="World"/> <combo_box.item label="Rete locale" name="Local"/> <combo_box.item label="Griglia di riferimento" name="Reference"/> @@ -110,18 +110,18 @@ <text name="Dozer Size:"> Grandezza </text> - <slider_bar initial_value="2.0" left="184" name="slider brush size" width="74"/> + <slider_bar initial_value="2.0" name="slider brush size"/> <text name="Strength:"> Potenza </text> - <button label="Applica" label_selected="Applica" left="146" name="button apply to selection" tool_tip="Modifica il terreno selezionato"/> - <text left="134" name="obj_count"> + <button label="Applica" label_selected="Applica" name="button apply to selection" tool_tip="Modifica il terreno selezionato"/> + <text name="obj_count"> Oggetti: [COUNT] </text> - <text left="134" name="prim_count"> + <text name="prim_count"> Prim: [COUNT] </text> - <tab_container name="Object Info Tabs" tab_max_width="150" tab_min_width="30" width="288"> + <tab_container name="Object Info Tabs"> <panel label="Generale" name="General"> <panel.string name="text deed continued"> Cessione @@ -182,12 +182,12 @@ </text> <button label="Imposta..." label_selected="Imposta..." name="button set group" tool_tip="Scegli un gruppo con cui condividere i diritti relativi all'oggetto"/> <name_box initial_value="Caricamento in corso..." name="Group Name Proxy"/> - <button label="Cessione" label_selected="Cessione" left_delta="152" name="button deed" tool_tip="Con una cessione si trasferisce il bene con i diritti al proprietario successivo Gli oggetti in proprietà condivisa di gruppo possono essere ceduti soltanto da un funzionario del gruppo." width="98"/> + <button label="Cessione" label_selected="Cessione" name="button deed" tool_tip="Con una cessione si trasferisce il bene con i diritti al proprietario successivo Gli oggetti in proprietà condivisa di gruppo possono essere ceduti soltanto da un funzionario del gruppo."/> <check_box label="Condividi" name="checkbox share with group" tool_tip="Consenti a tutti i membri del gruppo selezionato di condividere i tuoi diritti di modifica di questo oggetto. Per attivare le restrizioni per ruolo devi prima effettuare la cessione."/> - <text name="label click action" width="220"> + <text name="label click action"> Fai clic per: </text> - <combo_box name="clickaction" width="192"> + <combo_box name="clickaction"> <combo_box.item label="Tocca (predefinito)" name="Touch/grab(default)"/> <combo_box.item label="Siediti sull'oggetto" name="Sitonobject"/> <combo_box.item label="Compra l'oggetto" name="Buyobject"/> @@ -216,8 +216,8 @@ Proprietario successivo: </text> <check_box label="Modificare" name="checkbox next owner can modify"/> - <check_box label="Copiare" left_delta="80" name="checkbox next owner can copy"/> - <check_box label="Trasferisci" left_delta="67" name="checkbox next owner can transfer" tool_tip="Il prossimo proprietario può regalare o rivendere questo oggetto"/> + <check_box label="Copiare" name="checkbox next owner can copy"/> + <check_box label="Trasferisci" name="checkbox next owner can transfer" tool_tip="Il prossimo proprietario può regalare o rivendere questo oggetto"/> <text name="B:"> B: </text> @@ -318,7 +318,7 @@ </text> <spinner label="X" name="Shear X"/> <spinner label="Y" name="Shear Y"/> - <text name="advanced_cut" width="149"> + <text name="advanced_cut"> Riduci un bordo (inizio/fine) </text> <text name="advanced_dimple"> @@ -355,29 +355,29 @@ </combo_box> </panel> <panel label="Caratteristiche" name="Features"> - <text name="select_single" width="280"> + <text name="select_single"> Seleziona solo un prim per modificarne le caratteristiche. </text> <text name="edit_object"> Modifica le caratteristiche dell'oggetto: </text> <check_box label="Flessibilità " name="Flexible1D Checkbox Ctrl" tool_tip="Consenti all'oggetto di flettersi lungo l'asse Z (solo lato client)"/> - <spinner label="Morbidezza" label_width="72" name="FlexNumSections" width="135"/> - <spinner label="Gravità " label_width="72" name="FlexGravity" width="135"/> - <spinner label="Elasticità " label_width="72" name="FlexFriction" width="135"/> - <spinner label="Sventolio" label_width="72" name="FlexWind" width="135"/> - <spinner label="Tensione" label_width="72" name="FlexTension" width="135"/> - <spinner label="Forza X" label_width="72" name="FlexForceX" width="135"/> - <spinner label="Forza Y" label_width="72" name="FlexForceY" width="135"/> - <spinner label="Forza Z" label_width="72" name="FlexForceZ" width="135"/> + <spinner label="Morbidezza" name="FlexNumSections"/> + <spinner label="Gravità " name="FlexGravity"/> + <spinner label="Elasticità " name="FlexFriction"/> + <spinner label="Sventolio" name="FlexWind"/> + <spinner label="Tensione" name="FlexTension"/> + <spinner label="Forza X" name="FlexForceX"/> + <spinner label="Forza Y" name="FlexForceY"/> + <spinner label="Forza Z" name="FlexForceZ"/> <check_box label="Luce" name="Light Checkbox Ctrl" tool_tip="Imposta l'oggetto come sorgente di luce"/> <color_swatch label="" name="colorswatch" tool_tip="Clicca per aprire il selettore dei colori"/> <texture_picker label="" name="light texture control" tool_tip="Clicca per scegliere un'immagine da proiettare (funziona solo con il rendering differito attivato)"/> - <spinner label="Intensità " label_width="72" name="Light Intensity" width="135"/> + <spinner label="Intensità " name="Light Intensity"/> <spinner label="Angolo di vista" name="Light FOV"/> - <spinner label="Raggio" label_width="72" name="Light Radius" width="135"/> + <spinner label="Raggio" name="Light Radius"/> <spinner label="Centro focale" name="Light Focus"/> - <spinner label="Attenuazione" label_width="72" name="Light Falloff" width="135"/> + <spinner label="Attenuazione" name="Light Falloff"/> <spinner label="Atmosfera" name="Light Ambiance"/> </panel> <panel label="Texture" name="Texture"> @@ -395,28 +395,27 @@ <text name="glow label"> Bagliore </text> - <check_box bottom_delta="-21" label="Massima luminosità " name="checkbox fullbright"/> + <check_box label="Massima luminosità " name="checkbox fullbright"/> <text name="tex gen"> - Applicazione -della texture + Applicazione </text> - <combo_box bottom_delta="-38" name="combobox texgen"> + <combo_box name="combobox texgen"> <combo_box.item label="Default" name="Default"/> <combo_box.item label="Planare" name="Planar"/> </combo_box> - <text bottom="-120" name="label shininess"> + <text name="label shininess"> Brillantezza </text> - <combo_box bottom_delta="-22" name="combobox shininess"> + <combo_box name="combobox shininess"> <combo_box.item label="Nessuna" name="None"/> <combo_box.item label="Bassa" name="Low"/> <combo_box.item label="Media" name="Medium"/> <combo_box.item label="Alta" name="High"/> </combo_box> - <text bottom="-120" name="label bumpiness"> + <text name="label bumpiness"> Rilievo </text> - <combo_box bottom_delta="-22" name="combobox bumpiness" width="100"> + <combo_box name="combobox bumpiness"> <combo_box.item label="Nessuna" name="None"/> <combo_box.item label="Luminoso" name="Brightness"/> <combo_box.item label="Scuro" name="Darkness"/> @@ -476,17 +475,17 @@ della texture <text name="label_area"> Zona: [AREA] m² </text> - <button label="Informazioni sui terreni" label_selected="Informazioni sui terreni" name="button about land" width="156"/> + <button label="Informazioni sui terreni" label_selected="Informazioni sui terreni" name="button about land"/> <check_box label="Mostra i proprietari" name="checkbox show owners" tool_tip="Colora i terreni in base ai loro proprietari: Verde = il tuo terreno Acqua = la terra del tuo gruppo Rosso = posseduta da altri Giallo = in vendita Viola = in asta Grigia = pubblica"/> <text name="label_parcel_modify"> Modifica il terreno </text> - <button label="Suddividi" label_selected="Suddividi" name="button subdivide land" width="156"/> - <button label="Iscriviti" label_selected="Iscriviti" name="button join land" width="156"/> + <button label="Suddividi" label_selected="Suddividi" name="button subdivide land"/> + <button label="Iscriviti" label_selected="Iscriviti" name="button join land"/> <text name="label_parcel_trans"> Transazioni terreno </text> - <button label="Acquista terreno" label_selected="Acquista terreno" name="button buy land" width="156"/> - <button label="Abbandona il terreno" label_selected="Abbandona il terreno" name="button abandon land" width="156"/> + <button label="Acquista terreno" label_selected="Acquista terreno" name="button buy land"/> + <button label="Abbandona il terreno" label_selected="Abbandona il terreno" name="button abandon land"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_tos.xml b/indra/newview/skins/default/xui/it/floater_tos.xml index a11ccdc3af..28a2dfdda2 100644 --- a/indra/newview/skins/default/xui/it/floater_tos.xml +++ b/indra/newview/skins/default/xui/it/floater_tos.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=""> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Caricamento in corso %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Continua" label_selected="Continua" name="Continue"/> <button label="Annulla" label_selected="Annulla" name="Cancel"/> <check_box label="Accetto i Termini del servizio e le Regole sulla privacy" name="agree_chk"/> <text name="tos_heading"> Sei pregato di leggere attentamente i Termini del servizio e le Regole sulla privacy di seguito. Per continuare l'accesso a [SECOND_LIFE], devi accettare le condizioni. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <string name="real_url"> - http://secondlife.com/app/tos/ - </string> </floater> diff --git a/indra/newview/skins/default/xui/it/menu_attachment_other.xml b/indra/newview/skins/default/xui/it/menu_attachment_other.xml index 3dfadd9690..d4d6fd68d0 100644 --- a/indra/newview/skins/default/xui/it/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/it/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Segnala" name="abuse"/> <menu_item_call label="Congela" name="Freeze..."/> <menu_item_call label="Espelli" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug delle texture" name="Debug..."/> <menu_item_call label="Zoom avanti" name="Zoom In"/> <menu_item_call label="Paga" name="Pay..."/> <menu_item_call label="Profilo dell'oggetto" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/it/menu_attachment_self.xml b/indra/newview/skins/default/xui/it/menu_attachment_self.xml index f30b286901..054f4802e6 100644 --- a/indra/newview/skins/default/xui/it/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/it/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="I miei amici..." name="Friends..."/> <menu_item_call label="I miei gruppi" name="Groups..."/> <menu_item_call label="Il mio profilo" name="Profile..."/> + <menu_item_call label="Debug delle texture" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_avatar_other.xml b/indra/newview/skins/default/xui/it/menu_avatar_other.xml index 8a1ff3d7ec..c2edc32a49 100644 --- a/indra/newview/skins/default/xui/it/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/it/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Segnala" name="abuse"/> <menu_item_call label="Congela" name="Freeze..."/> <menu_item_call label="Espelli" name="Eject..."/> - <menu_item_call label="Debug" name="Debug..."/> + <menu_item_call label="Debug delle texture" name="Debug..."/> <menu_item_call label="Zoom avanti" name="Zoom In"/> <menu_item_call label="Paga" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_avatar_self.xml b/indra/newview/skins/default/xui/it/menu_avatar_self.xml index 09219cb843..d73d97d499 100644 --- a/indra/newview/skins/default/xui/it/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/it/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="I miei amici..." name="Friends..."/> <menu_item_call label="I miei gruppi" name="Groups..."/> <menu_item_call label="Il mio profilo" name="Profile..."/> + <menu_item_call label="Debug delle texture" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_edit.xml b/indra/newview/skins/default/xui/it/menu_edit.xml new file mode 100644 index 0000000000..ffb20a02e9 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Modifica" name="Edit"> + <menu_item_call label="Annulla" name="Undo"/> + <menu_item_call label="Ripeti" name="Redo"/> + <menu_item_call label="Taglia" name="Cut"/> + <menu_item_call label="Copia" name="Copy"/> + <menu_item_call label="Incolla" name="Paste"/> + <menu_item_call label="Elimina" name="Delete"/> + <menu_item_call label="Duplica" name="Duplicate"/> + <menu_item_call label="Seleziona tutto" name="Select All"/> + <menu_item_call label="Deseleziona" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/it/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/it/menu_inspect_avatar_gear.xml index ca6d5a4ad8..22a37d7095 100644 --- a/indra/newview/skins/default/xui/it/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/it/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Segnala" name="report"/> <menu_item_call label="Congela" name="freeze"/> <menu_item_call label="Espelli" name="eject"/> - <menu_item_call label="Debug" name="debug"/> + <menu_item_call label="Debug delle texture" name="debug"/> <menu_item_call label="Trova sulla mappa" name="find_on_map"/> <menu_item_call label="Zoom avanti" name="zoom_in"/> <menu_item_call label="Paga" name="pay"/> diff --git a/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml index 359afcc283..33229bb7c0 100644 --- a/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/it/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Il mio profilo" name="my_profile"/> <menu_item_call label="I miei amici..." name="my_friends"/> <menu_item_call label="I miei gruppi" name="my_groups"/> + <menu_item_call label="Debug delle texture" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/it/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/it/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..471640eff5 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Chiudi" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/it/menu_inventory.xml b/indra/newview/skins/default/xui/it/menu_inventory.xml index 9662f6f937..3b36198774 100644 --- a/indra/newview/skins/default/xui/it/menu_inventory.xml +++ b/indra/newview/skins/default/xui/it/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Condividi" name="Share"/> <menu_item_call label="Compra" name="Task Buy"/> <menu_item_call label="Apri" name="Task Open"/> <menu_item_call label="Esegui" name="Task Play"/> @@ -8,28 +9,28 @@ <menu_item_call label="Elimina" name="Task Remove"/> <menu_item_call label="Svuota il Cestino" name="Empty Trash"/> <menu_item_call label="Svuota gli oggetti persi e ritrovati" name="Empty Lost And Found"/> - <menu_item_call label="Nuova Cartella" name="New Folder"/> - <menu_item_call label="Nuovo Script" name="New Script"/> + <menu_item_call label="Nuova cartella" name="New Folder"/> + <menu_item_call label="Nuovo script" name="New Script"/> <menu_item_call label="Nuovo biglietto" name="New Note"/> - <menu_item_call label="Nuova Gesture" name="New Gesture"/> + <menu_item_call label="Nuova gesture" name="New Gesture"/> <menu label="Maglietta intima" name="New Clothes"> - <menu_item_call label="Nuova Maglietta" name="New Shirt"/> - <menu_item_call label="Nuovi Pantaloni" name="New Pants"/> - <menu_item_call label="Nuove Scarpe" name="New Shoes"/> - <menu_item_call label="Nuove Calze" name="New Socks"/> - <menu_item_call label="Nuova Giacca" name="New Jacket"/> - <menu_item_call label="Nuova Gonna" name="New Skirt"/> - <menu_item_call label="Nuovi Guanti" name="New Gloves"/> - <menu_item_call label="Nuova Canottiera" name="New Undershirt"/> - <menu_item_call label="Nuove Mutande" name="New Underpants"/> + <menu_item_call label="Nuova maglietta" name="New Shirt"/> + <menu_item_call label="Nuovi pantaloni" name="New Pants"/> + <menu_item_call label="Nuove scarpe" name="New Shoes"/> + <menu_item_call label="Nuove calze" name="New Socks"/> + <menu_item_call label="Nuova giacca" name="New Jacket"/> + <menu_item_call label="Nuova gonna" name="New Skirt"/> + <menu_item_call label="Nuovi guanti" name="New Gloves"/> + <menu_item_call label="Nuova canottiera" name="New Undershirt"/> + <menu_item_call label="Nuove mutande" name="New Underpants"/> <menu_item_call label="Nuovo Alfa Mask" name="New Alpha Mask"/> <menu_item_call label="Nuovo tatuaggio" name="New Tattoo"/> </menu> <menu label="Nuove parti del corpo" name="New Body Parts"> - <menu_item_call label="Nuova Forma del corpo" name="New Shape"/> - <menu_item_call label="Nuova Pelle" name="New Skin"/> - <menu_item_call label="Nuovi Capelli" name="New Hair"/> - <menu_item_call label="Nuovi Occhi" name="New Eyes"/> + <menu_item_call label="Nuova forma del corpo" name="New Shape"/> + <menu_item_call label="Nuova pelle" name="New Skin"/> + <menu_item_call label="Nuovi capelli" name="New Hair"/> + <menu_item_call label="Nuovi occhi" name="New Eyes"/> </menu> <menu label="Cambia tipo" name="Change Type"> <menu_item_call label="Predefinito" name="Default"/> @@ -48,6 +49,8 @@ <menu_item_call label="Apri" name="Sound Open"/> <menu_item_call label="Sostituisci vestiti" name="Replace Outfit"/> <menu_item_call label="Aggiungi al vestiario" name="Add To Outfit"/> + <menu_item_call label="Rimuovi dal vestiario attuale" name="Remove From Outfit"/> + <menu_item_call label="Trova originale" name="Find Original"/> <menu_item_call label="Elimina oggetto" name="Purge Item"/> <menu_item_call label="Ripristina oggetto" name="Restore Item"/> <menu_item_call label="Apri" name="Open"/> @@ -57,6 +60,7 @@ <menu_item_call label="Copia" name="Copy"/> <menu_item_call label="Incolla" name="Paste"/> <menu_item_call label="Incolla come link" name="Paste As Link"/> + <menu_item_call label="Rimuovi link" name="Remove Link"/> <menu_item_call label="Cancella" name="Delete"/> <menu_item_call label="Elimina la cartella di sistema" name="Delete System Folder"/> <menu_item_call label="Inizia la conferenza chat" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/it/menu_login.xml b/indra/newview/skins/default/xui/it/menu_login.xml index 36eeadc478..904b819198 100644 --- a/indra/newview/skins/default/xui/it/menu_login.xml +++ b/indra/newview/skins/default/xui/it/menu_login.xml @@ -6,19 +6,10 @@ </menu> <menu label="Aiuto" name="Help"> <menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Mostra menu Debug" name="Show Debug Menu"/> <menu label="Debug" name="Debug"> - <menu label="Modifica" name="Edit"> - <menu_item_call label="Annulla" name="Undo"/> - <menu_item_call label="Rifai" name="Redo"/> - <menu_item_call label="Taglia" name="Cut"/> - <menu_item_call label="Copia" name="Copy"/> - <menu_item_call label="Incolla" name="Paste"/> - <menu_item_call label="Elimina" name="Delete"/> - <menu_item_call label="Duplica" name="Duplicate"/> - <menu_item_call label="Seleziona tutto" name="Select All"/> - <menu_item_call label="Deseleziona" name="Deselect"/> - </menu> <menu_item_call label="Mostra impostazioni di debug" name="Debug Settings"/> <menu_item_call label="Impostazioni colori interfaccia" name="UI/Color Settings"/> <menu label="Test interfaccia utente" name="UI Tests"/> @@ -26,5 +17,7 @@ <menu_item_call label="Mostra i Termini del servizio (TOS)" name="TOS"/> <menu_item_call label="Mostra messaggio critico" name="Critical"/> <menu_item_call label="Test browser Web" name="Web Browser Test"/> + <menu_item_check label="Mostra selettore griglia" name="Show Grid Picker"/> + <menu_item_call label="Mostra Console notifiche" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/it/menu_participant_list.xml b/indra/newview/skins/default/xui/it/menu_participant_list.xml index e641d38508..71f1a9a0da 100644 --- a/indra/newview/skins/default/xui/it/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/it/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Chiama" name="Call"/> <menu_item_call label="Condividi" name="Share"/> <menu_item_call label="Paga" name="Pay"/> + <menu_item_check label="Icone persone" name="View Icons"/> <menu_item_check label="Blocca voce" name="Block/Unblock"/> <menu_item_check label="Blocca testo" name="MuteText"/> <context_menu label="Opzioni moderatore >" name="Moderator Options"> @@ -15,6 +16,6 @@ <menu_item_call label="Disattiva audio di questo participante" name="ModerateVoiceMuteSelected"/> <menu_item_call label="Disattiva audio di tutti gli altri" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Riattiva audio di questo participante" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Disattiva audio di tutti gli altri" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Riattiva audio di tutti gli altri" name="ModerateVoiceUnMuteOthers"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/it/menu_save_outfit.xml b/indra/newview/skins/default/xui/it/menu_save_outfit.xml new file mode 100644 index 0000000000..ac7b40ca48 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Salva" name="save_outfit"/> + <menu_item_call label="Salva come nuovo" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/it/menu_script_chiclet.xml b/indra/newview/skins/default/xui/it/menu_script_chiclet.xml new file mode 100644 index 0000000000..604f754ba8 --- /dev/null +++ b/indra/newview/skins/default/xui/it/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Chiudi" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 36b44abf4b..a5923ac42b 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -30,7 +30,8 @@ <menu_item_check label="Mappa del mondo" name="World Map"/> <menu_item_call label="Istantanea" name="Take Snapshot"/> <menu_item_call label="Crea punto di riferimento per questo luogo" name="Create Landmark Here"/> - <menu label="Profilo del posto" name="Land"> + <menu label="Profilo del luogo" name="Land"> + <menu_item_call label="Profilo del luogo" name="Place Profile"/> <menu_item_call label="Informazioni sui terreni" name="About Land"/> <menu_item_call label="Regione/proprietà immobiliare" name="Region/Estate"/> </menu> @@ -63,20 +64,9 @@ <menu_item_call label="Strumento Ingrandisci" name="Focus"/> <menu_item_call label="Strumento Movimento" name="Move"/> <menu_item_call label="Strumento Modifica" name="Edit"/> - <menu_item_call label="Crea strumento" name="Create"/> + <menu_item_call label="Strumento Crea" name="Create"/> <menu_item_call label="Strumento Terreno" name="Land"/> </menu> - <menu label="Modifica" name="Edit"> - <menu_item_call label="Annulla" name="Undo"/> - <menu_item_call label="Rifai" name="Redo"/> - <menu_item_call label="Taglia" name="Cut"/> - <menu_item_call label="Copia" name="Copy"/> - <menu_item_call label="Incolla" name="Paste"/> - <menu_item_call label="Elimina" name="Delete"/> - <menu_item_call label="Duplica" name="Duplicate"/> - <menu_item_call label="Seleziona tutto" name="Select All"/> - <menu_item_call label="Deseleziona" name="Deselect"/> - </menu> <menu_item_call label="Collegamento" name="Link"/> <menu_item_call label="Scollega" name="Unlink"/> <menu_item_check label="Modifica le parti collegate" name="Edit Linked Parts"/> @@ -118,11 +108,13 @@ </menu> </menu> <menu label="Aiuto" name="Help"> - <menu_item_call label="[SECOND_LIFE] Aiuto" name="Second Life Help"/> + <menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/> <menu_item_call label="Segnala abuso" name="Report Abuse"/> <menu_item_call label="Segnala bug" name="Report Bug"/> + <menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzate" name="Advanced"> + <menu_item_check label="Mostra menu Avanzato" name="Show Advanced Menu"/> <menu_item_call label="Ferma animazione" name="Stop Animating My Avatar"/> <menu_item_call label="Ridisegna le texture" name="Rebake Texture"/> <menu_item_call label="Imposta dimensioni dell'interfaccia sui valori predefiniti" name="Set UI Size to Default"/> @@ -144,7 +136,6 @@ <menu_item_check label="Evidenzia trasparenza" name="Highlight Transparent"/> <menu_item_check label="Mostra elementi HUD" name="Show HUD Attachments"/> <menu_item_check label="Mostra mirino visuale soggettiva" name="ShowCrosshairs"/> - <menu_item_check label="Mostra tooltip terreno" name="Land Tips"/> </menu> <menu label="Modalità di rendering" name="Rendering Types"> <menu_item_check label="Semplice" name="Simple"/> @@ -191,7 +182,7 @@ <menu_item_call label="Strumento Ingrandisci" name="Focus"/> <menu_item_call label="Strumento Movimento" name="Move"/> <menu_item_call label="Strumento Modifica" name="Edit"/> - <menu_item_call label="Crea strumento" name="Create"/> + <menu_item_call label="Strumento Crea" name="Create"/> <menu_item_call label="Strumento Terreno" name="Land"/> </menu> <menu_item_call label="Zoom avanti" name="Zoom In"/> diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 6736c6a6f1..4739e5cce9 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -341,7 +341,7 @@ Non ci sono rimborsi per la tariffa pagata. <notification name="DeleteMedia"> Hai selezionato la cancellazione del media associato a questa faccia. Vuoi continuare? - <usetemplate ignoretext="Conferma prima di eliminare elemnti multimediali dall'oggetto" name="okcancelignore" notext="No" yestext="Sì"/> + <usetemplate ignoretext="Conferma prima di eliminare elementi multimediali dall'oggetto" name="okcancelignore" notext="No" yestext="Sì"/> </notification> <notification name="ClassifiedSave"> Salva le modifiche all'annuncio [NAME]? @@ -352,7 +352,7 @@ Vuoi continuare? <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - Cancella il favorito [PICK]? + Elimina preferito <nolink>[PICK]</nolink>? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> </notification> <notification name="PromptGoToEventsPage"> @@ -625,7 +625,7 @@ Attese [VALIDS] Riprova più tardi. </notification> <notification name="LandmarkCreated"> - Hai aggiunto "[LANDMARK_NAME]" alla tua [FOLDER_NAME] cartella. + Hai aggiunto "[LANDMARK_NAME]" alla tua cartella [FOLDER_NAME]. </notification> <notification name="LandmarkAlreadyExists"> Hai già il punto di riferimento di questo luogo. @@ -898,7 +898,7 @@ Unisci il terreno? In genere si tratta di un problema temporaneo. Attendi alcuni minuti per modificare e salvare nuovamente gli elementi indossabili. </notification> <notification name="YouHaveBeenLoggedOut"> - Accidenti. Sei stato scollegato da [SECOND_LIFE] + Sei stato scollegato da [SECOND_LIFE]. [MESSAGE] <usetemplate name="okcancelbuttons" notext="Esci" yestext="Vedi IM & Chat"/> </notification> @@ -924,6 +924,16 @@ Offri l'amicizia a [NAME]? <button name="Cancel" text="Annulla"/> </form> </notification> + <notification label="Salva vestiario" name="SaveOutfitAs"> + Salva gli abiti che indosso come nuovo vestiario: + <form name="form"> + <input name="message"> + [DESC] (nuovo) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Annulla"/> + </form> + </notification> <notification name="RemoveFromFriends"> Vuoi rimuovere remove [FIRST_NAME] [LAST_NAME] dalla lista dei tuoi amici? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> @@ -1414,6 +1424,10 @@ La chat e gli IM verranno nascosti. Gli IM riceveranno la tua risposta di Non di Teleport a [CLASSIFIED]? <usetemplate ignoretext="Conferma il teleport verso questa posizione negli annunci" name="okcancelignore" notext="Annulla" yestext="Teleport"/> </notification> + <notification name="TeleportToHistoryEntry"> + Teleport a [HISTORY_ENTRY]? + <usetemplate ignoretext="Conferma il teleport verso un luogo che compare nella cronologia" name="okcancelignore" notext="Annulla" yestext="Teleport"/> + </notification> <notification label="Manda un messaggio a tutti nella tua proprietà " name="MessageEstate"> Scrivi un annuncio breve che verrà mandato a tutti quelli che sono in questo momento nella tua proprietà . <form name="form"> @@ -1505,6 +1519,9 @@ Puoi cliccare su Cambia preferenze per modificare la categoria di accesso e quin <ignore name="ignore" text="La categoria di accesso impostata mi impedisce di entrare in una regione"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + La tua categoria di accesso attuale è [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Non puoi prendere possesso di questo terreno a causa della tua categoria di accesso. Questo può essere dovuto ad una mancanza di informazioni valide che confermino la tua età . @@ -1586,11 +1603,11 @@ Pubblica questo annuncio adesso per [AMOUNT]L$? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> </notification> <notification name="SetClassifiedMature"> - Queste inserzioni includono contenuto Mature? + Queste inserzioni includono contenuti di tipo Moderato? <usetemplate canceltext="Annulla" name="yesnocancelbuttons" notext="No" yestext="Si"/> </notification> <notification name="SetGroupMature"> - Questo gruppo include contenuto Mature? + Questo gruppo include contenuti di tipo Moderato? <usetemplate canceltext="Annulla" name="yesnocancelbuttons" notext="No" yestext="Si"/> </notification> <notification label="Conferma il riavvio" name="ConfirmRestart"> @@ -1605,7 +1622,7 @@ Pubblica questo annuncio adesso per [AMOUNT]L$? <button name="Cancel" text="Annulla"/> </form> </notification> - <notification label="Cambiato il contenuto Mature" name="RegionMaturityChange"> + <notification label="Cambiato il contenuto Moderato" name="RegionMaturityChange"> La classificazione di questa regione è stata aggiornata. Un periodo di tempo è necessario prima che la modifica venga integrata nella mappa. @@ -1921,6 +1938,9 @@ Inseriscilo in una pagina web per dare ad altri un accesso facile a questa ubica <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Annullato </notification> @@ -1949,6 +1969,11 @@ Inseriscilo in una pagina web per dare ad altri un accesso facile a questa ubica Sto importando le fotografie per l'uso inworld e per il web... (Durata circa 5 minuti.) </notification> + <notification name="UploadConfirmation"> + Il costo per il caricamento è di L$ [AMOUNT]. +Continuare? + <usetemplate name="okcancelbuttons" notext="Annulla" yestext="Carica nel server"/> + </notification> <notification name="UploadPayment"> Hai pagato [AMOUNT]L$ per il caricamento. </notification> @@ -2067,7 +2092,7 @@ Prova a selezionare una parte di terreno più piccola. Alcuni termini della ricerca sono stati esclusi a causa delle restrizioni di contenuto come esposto negli Standard della comunità . </notification> <notification name="NoContentToSearch"> - Seleziona almeno un tipo di contenuto per la ricerca (PG, Mature, o Adult). + Seleziona almeno un tipo di contenuto per la ricerca (Generale, Moderato o Adulti). </notification> <notification name="GroupVote"> [NAME] ha proposto di votare su: @@ -2290,9 +2315,9 @@ Riprova tra qualche istante. </form> </notification> <notification name="TeleportOffered"> - [NAME] ti ha offerto di teleportarti nella sua ubicazione: + [NAME_SLURL] ti ha offerto il teleport alla sua ubicazione: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teleport"/> <button name="Cancel" text="Cancella"/> @@ -2310,11 +2335,11 @@ Riprova tra qualche istante. </form> </notification> <notification name="OfferFriendship"> - [NAME] ti ha offerto la sua amicizia. + [NAME_SLURL] ti ha offerto di diventare amici. [MESSAGE] -(Di default, potrete vedervi reciprocamente online.) +(L'impostazione predefinita consente a ciascuno di vedere se l'altro è online.) <form name="form"> <button name="Accept" text="Accetta"/> <button name="Decline" text="Rifiuta"/> @@ -2377,6 +2402,9 @@ Dall'oggetto: [OBJECTNAME], di: [NAME]? <notification name="FailedToFindWearable"> Impossibile trovare [TYPE] chiamato [DESC] nel database. </notification> + <notification name="ShareToWebFailed"> + Caricamento dell'immagine su Web non riuscita. + </notification> <notification name="InvalidWearable"> L'elemento che stai tentando di indossare usa delle caratteristiche che il tuo viewer non può leggere. Aggiorna la versione di [APP_NAME] per poterlo indossare. </notification> @@ -2573,6 +2601,12 @@ Per sicurezza, verranno bloccati per alcuni secondi. Il pulsante selezionato non può essere visualizzato in questo momento. Il pulsante verrà visualizzato quando lo spazio sarà sufficiente. </notification> + <notification name="ShareNotification"> + Trascina articoli dell'inventario su una persona nel selettore residenti + </notification> + <notification name="AvatarRezNotification"> + Avatar '[NAME]' rezzato in [TIME] secondi. + </notification> <global name="UnsupportedCPU"> - La velocità della tua CPU non soddisfa i requisiti minimi. </global> diff --git a/indra/newview/skins/default/xui/it/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/it/outfit_accordion_tab.xml new file mode 100644 index 0000000000..bac885e5d8 --- /dev/null +++ b/indra/newview/skins/default/xui/it/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/it/panel_edit_eyes.xml b/indra/newview/skins/default/xui/it/panel_edit_eyes.xml index 3b1e51e759..9f31bb7dc7 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Iride" name="Iris" tool_tip="Clicca per scegliere una fotografia"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Occhi"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Occhi"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_gloves.xml b/indra/newview/skins/default/xui/it/panel_edit_gloves.xml index 2a80d6df3d..48024b8095 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Guanti"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Guanti"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_hair.xml b/indra/newview/skins/default/xui/it/panel_edit_hair.xml index 534ff457ff..50e2e7e4b3 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Texture" name="Texture" tool_tip="Clicca per scegliere una fotografia"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Colore"/> - <accordion_tab name="hair_style_tab" title="Stile"/> - <accordion_tab name="hair_eyebrows_tab" title="Sopracciglia"/> - <accordion_tab name="hair_facial_tab" title="Del viso"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Colore"/> + <accordion_tab name="hair_style_tab" title="Stile"/> + <accordion_tab name="hair_eyebrows_tab" title="Sopracciglia"/> + <accordion_tab name="hair_facial_tab" title="Del viso"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_jacket.xml b/indra/newview/skins/default/xui/it/panel_edit_jacket.xml index 43c825ff73..d77c1ec763 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Tessuto inferiore" name="Lower Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Giacca"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Giacca"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_pants.xml b/indra/newview/skins/default/xui/it/panel_edit_pants.xml index cbab711fb1..83ef274877 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Pantaloni"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Pantaloni"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_pick.xml b/indra/newview/skins/default/xui/it/panel_edit_pick.xml index d2d97cfc71..f93b953eac 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_pick.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Modifica scelta" name="panel_edit_pick"> +<panel label="Modifica preferito" name="panel_edit_pick"> <panel.string name="location_notice"> (si aggiornerà dopo il salvataggio) </panel.string> <text name="title"> - Modifica scelta + Modifica preferito </text> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> diff --git a/indra/newview/skins/default/xui/it/panel_edit_shape.xml b/indra/newview/skins/default/xui/it/panel_edit_shape.xml index cc0676b43c..7e1ba43756 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Maschio" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Corpo"/> - <accordion_tab name="shape_head_tab" title="Testa"/> - <accordion_tab name="shape_eyes_tab" title="Occhi"/> - <accordion_tab name="shape_ears_tab" title="Orecchie"/> - <accordion_tab name="shape_nose_tab" title="Naso"/> - <accordion_tab name="shape_mouth_tab" title="Bocca"/> - <accordion_tab name="shape_chin_tab" title="Mento"/> - <accordion_tab name="shape_torso_tab" title="Torace"/> - <accordion_tab name="shape_legs_tab" title="Gambe"/> - </accordion> + <panel label="Camicia" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Corpo"/> + <accordion_tab name="shape_head_tab" title="Testa"/> + <accordion_tab name="shape_eyes_tab" title="Occhi"/> + <accordion_tab name="shape_ears_tab" title="Orecchie"/> + <accordion_tab name="shape_nose_tab" title="Naso"/> + <accordion_tab name="shape_mouth_tab" title="Bocca"/> + <accordion_tab name="shape_chin_tab" title="Mento"/> + <accordion_tab name="shape_torso_tab" title="Torace"/> + <accordion_tab name="shape_legs_tab" title="Gambe"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_shirt.xml b/indra/newview/skins/default/xui/it/panel_edit_shirt.xml index 631d609d60..1f41b28348 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Camicia"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Camicia"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_shoes.xml b/indra/newview/skins/default/xui/it/panel_edit_shoes.xml index bd1fa5b16d..7a82c8e99d 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Scarpe"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Scarpe"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_skin.xml b/indra/newview/skins/default/xui/it/panel_edit_skin.xml index 9e05599470..a15489b333 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Tatuaggi superiori" name="Upper Tattoos" tool_tip="Clicca per scegliere una fotografia"/> <texture_picker label="Tatuaggi inferiori" name="Lower Tattoos" tool_tip="Clicca per scegliere una fotografia"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Colore della pelle"/> - <accordion_tab name="skin_face_tab" title="Dettagli del viso"/> - <accordion_tab name="skin_makeup_tab" title="Makeup"/> - <accordion_tab name="skin_body_tab" title="Dettagli del corpo"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Colore della pelle"/> + <accordion_tab name="skin_face_tab" title="Dettagli del viso"/> + <accordion_tab name="skin_makeup_tab" title="Makeup"/> + <accordion_tab name="skin_body_tab" title="Dettagli del corpo"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_skirt.xml b/indra/newview/skins/default/xui/it/panel_edit_skirt.xml index e036fff67e..7080b65737 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Gonna"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Gonna"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_socks.xml b/indra/newview/skins/default/xui/it/panel_edit_socks.xml index d2af3ebd5a..6731511282 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Calzini"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Calzini"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_underpants.xml b/indra/newview/skins/default/xui/it/panel_edit_underpants.xml index ca2ba3ca01..671eb57551 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Slip"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Slip"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/it/panel_edit_undershirt.xml index cf44dad464..fccc86f8fc 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tessuto" name="Fabric" tool_tip="Clicca per scegliere una fotografia"/> <color_swatch label="Colore/Tinta" name="Color/Tint" tool_tip="Clicca per aprire il selettore dei colori"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Maglietta intima"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Maglietta intima"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_edit_wearable.xml b/indra/newview/skins/default/xui/it/panel_edit_wearable.xml index 2583cf4e0e..1135a582f5 100644 --- a/indra/newview/skins/default/xui/it/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/it/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Camicia" name="wearable_type_panel"> <text name="description_text" value="Figura corporea:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Opzioni"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Salva con nome" name="save_as_button"/> <button label="Ripristina" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/it/panel_group_general.xml b/indra/newview/skins/default/xui/it/panel_group_general.xml index e21f9d2049..49baa73811 100644 --- a/indra/newview/skins/default/xui/it/panel_group_general.xml +++ b/indra/newview/skins/default/xui/it/panel_group_general.xml @@ -46,9 +46,12 @@ Muovi il tuo mouse sopra le opzioni per maggiore aiuto. <check_box label="Chiunque può aderire" name="open_enrollement" tool_tip="Imposta se questo gruppo permette ai nuovi membri di aderire senza essere invitati."/> <check_box label="Quota di adesione" name="check_enrollment_fee" tool_tip="Imposta se richiedere una tassa d'iscrizione per aderire al gruppo"/> <spinner label="L$" left_delta="136" name="spin_enrollment_fee" tool_tip="I nuovi soci devono pagare questa tassa d'iscrizione quando è selezionata." width="60"/> - <combo_box name="group_mature_check" tool_tip="Imposta se le informazioni sul tuo gruppo sono da considerarsi Mature."> - <combo_box.item label="Contenuto PG" name="pg"/> - <combo_box.item label="Contenuto Mature" name="mature"/> + <combo_box name="group_mature_check" tool_tip="Imposta se le informazioni sul tuo gruppo sono da considerarsi di tipo Moderato."> + <combo_item name="select_mature"> + - Seleziona categoria di accesso - + </combo_item> + <combo_box.item label="Contenuti di tipo Moderato" name="mature"/> + <combo_box.item label="Contenuti di tipo Generale" name="pg"/> </combo_box> <check_box initial_value="true" label="Mostra nella ricerca" name="show_in_group_list" tool_tip="Permetti alle persone di vedere questo gruppo nei risultati della ricerca"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_im_control_panel.xml b/indra/newview/skins/default/xui/it/panel_im_control_panel.xml index 97ec0e11eb..76b28eab24 100644 --- a/indra/newview/skins/default/xui/it/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/it/panel_im_control_panel.xml @@ -20,7 +20,7 @@ <button label="Chiama" name="call_btn"/> </layout_panel> <layout_panel name="end_call_btn_panel"> - <button label="Abbandona chiamata" name="end_call_btn"/> + <button label="Chiudi chiamata" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> <button label="Regolazione voce" name="voice_ctrls_btn"/> diff --git a/indra/newview/skins/default/xui/it/panel_inventory_item.xml b/indra/newview/skins/default/xui/it/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_landmark_info.xml b/indra/newview/skins/default/xui/it/panel_landmark_info.xml index 4af59605c1..b4c5ab01bc 100644 --- a/indra/newview/skins/default/xui/it/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/it/panel_landmark_info.xml @@ -19,7 +19,7 @@ [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> <button name="back_btn" tool_tip="Indietro"/> - <text name="title" value="Profilo del posto"/> + <text name="title" value="Profilo del luogo"/> <scroll_container name="place_scroll"> <panel name="scrolling_panel"> <text name="maturity_value" value="sconosciuto"/> diff --git a/indra/newview/skins/default/xui/it/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/it/panel_media_settings_permissions.xml index 53dac1299f..0f0f1c9fe4 100644 --- a/indra/newview/skins/default/xui/it/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/it/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Proprietario + </text> <check_box initial_value="false" label="Permetti navigazione e interattività " name="perms_owner_interact"/> <check_box initial_value="false" label="Mostra la barra di controllo" name="perms_owner_control"/> + <text name="group_label"> + Gruppo: + </text> <check_box initial_value="false" label="Permetti navigazione e interattività " name="perms_group_interact"/> <check_box initial_value="false" label="Mostra la barra di controllo" name="perms_group_control"/> + <text name="anyone_label"> + Chiunque + </text> <check_box initial_value="false" label="Permetti navigazione e interattività " name="perms_anyone_interact"/> <check_box initial_value="false" label="Mostra la barra di controllo" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_nearby_media.xml b/indra/newview/skins/default/xui/it/panel_nearby_media.xml index 5343ecae13..649b772424 100644 --- a/indra/newview/skins/default/xui/it/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/it/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld oggetti multimediali) + </string> <string name="empty_item_text"> <vuoto> </string> @@ -16,15 +19,10 @@ <button label="Interrompi tutto" name="all_nearby_media_disable_btn" tool_tip="Spegni tutti i media nei dintorni"/> <button label="Accendi tutto" name="all_nearby_media_enable_btn" tool_tip="Accendi tutti i media nei dintorni"/> <button name="open_prefs_btn" tool_tip="Accedi alle preferenze del media"/> - <button label="Più >>" label_selected="Meno <<" name="more_less_btn" tool_tip="Opzioni avanzate"/> + <button label="Più >>" label_selected="Meno <<" name="more_btn" tool_tip="Opzioni avanzate"/> + <button label="Più >>" label_selected="Meno <<" name="less_btn" tool_tip="Opzioni avanzate"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - Multimedia vicini - </text> - <text name="show"> - Mostra: - </text> <combo_box name="show_combo"> <combo_box.item label="Tutto" name="All"/> <combo_box.item label="In questo lotto" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Nome" name="media_name"/> <scroll_list.columns label="Debug" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Interrompi supporto selezionato"/> @@ -53,7 +51,7 @@ <slider_bar initial_value="0.5" name="volume_slider" tool_tip="Volume audio per il media selezionato"/> </layout_panel> <layout_panel name="mute"> - <button name="mute_btn" tool_tip="Disattiva audio del media selezionato"/> + <button name="mute_btn" tool_tip="Disattiva audio dei supporti selezionati"/> </layout_panel> <layout_panel name="zoom"> <button name="zoom_btn" tool_tip="Zoom nel media selezionato"/> diff --git a/indra/newview/skins/default/xui/it/panel_outfit_edit.xml b/indra/newview/skins/default/xui/it/panel_outfit_edit.xml new file mode 100644 index 0000000000..516181e0e9 --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Modifica del vestiario" name="outfit_edit"> + <string name="No Outfit" value="Nessun vestiario"/> + <panel.string name="not_available"> + (non pert.) + </panel.string> + <panel.string name="unknown"> + (sconosciuto) + </panel.string> + <string name="Filter.All" value="Tutto"/> + <string name="Filter.Clothes/Body" value="Abiti/corpo"/> + <string name="Filter.Objects" value="Oggetti"/> + <button label="modifica" name="edit_wearable_btn"/> + <text name="title" value="Modifica vestiario"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Modifica..."/> + <text name="curr_outfit_name" value="[Current Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="Pannello di controllo IM" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Articolo look" name="look_item"/> + <scroll_list.columns label="Ordina in base agli articoli del vestiario" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filtro" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="Pannello di controllo IM" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Aggiungi al vestiario:"/> + <button label="V" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="C" name="folder_view_btn"/> + <button label="E" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Salva" name="save_btn"/> + <button label="Ripristina" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml index 58055d91c7..932788eaa3 100644 --- a/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/it/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Cose" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="I MIEI ABITI" name="outfitslist_tab"/> + <panel label="I MIEI ABITI" name="outfitslist_tab"/> <inventory_panel label="INDOSSA" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Rimuovi l'articolo selezionato"/> <button label="Salva vestiario" name="make_outfit_btn" tool_tip="Salva questo aspetto fisico come un vestito"/> <button label="Indossa" name="wear_btn" tool_tip="Indossa il vestiario selezionato"/> - <button label="M" name="look_edit_btn"/> + <button label="Modifica vestiario" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_people.xml b/indra/newview/skins/default/xui/it/panel_people.xml index acbc2cf326..c469da014a 100644 --- a/indra/newview/skins/default/xui/it/panel_people.xml +++ b/indra/newview/skins/default/xui/it/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Persone" name="people_panel"> - <string name="no_people" value="Nessuna persona"/> - <string name="no_one_near" value="Nessuno vicino"/> + <string name="no_recent_people" value="Nessuna persona recente. Stai cercando persone da frequentare? Prova la [secondlife:///app/search/people Ricerca] o la [secondlife:///app/worldmap Mappa del mondo]."/> + <string name="no_filtered_recent_people" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]."/> + <string name="no_one_near" value="Nessuno vicino. Stai cercando persone da frequentare? Try la [secondlife:///app/search/people Ricerca] o la [secondlife:///app/worldmap Mappa del mondo]."/> + <string name="no_one_filtered_near" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]."/> <string name="no_friends_online" value="Nessun amico online"/> <string name="no_friends" value="Nessun amico"/> + <string name="no_friends_msg"> + Per trovare amici, utilizza [secondlife:///app/search/people Cerca] oppure fai clic col tasto destro del mouse su un residente per aggiungerlo come amico. +Stai cercando persone da frequentare? Prova la [secondlife:///app/worldmap Mappa del mondo]. + </string> + <string name="no_filtered_friends_msg"> + Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/people Cerca]. + </string> <string name="people_filter_label" value="Filtro persone"/> <string name="groups_filter_label" value="Filtro gruppi"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Try finding the group in search?]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Try searching for some groups to join.]"/> + <string name="no_filtered_groups_msg" value="Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/groups Cerca]."/> + <string name="no_groups_msg" value="Stai cercando gruppi di cui far parte? Prova [secondlife:///app/search/groups Cerca]."/> <filter_editor label="Filtro" name="filter_input"/> <tab_container name="tabs"> <panel label="NELLE VICINANZE" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Offri amicizia a un residente"/> <button name="del_btn" tool_tip="Rimuovi la persona selezionata dalla lista degli amici"/> </panel> - <text name="no_friends_msg"> - Per aggiungere amici, prova [secondlife:///app/search/people global search] oppure fai clic col pulsante destro del mouse su un residente per aggiungerlo come amico. -Se stai cercando qualcuno da frequentare, [secondlife:///app/worldmap try the Map]. - </text> </panel> <panel label="I MIEI GRUPPI" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/it/panel_place_profile.xml b/indra/newview/skins/default/xui/it/panel_place_profile.xml index 9a38909d47..eace6c89ce 100644 --- a/indra/newview/skins/default/xui/it/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/it/panel_place_profile.xml @@ -5,7 +5,7 @@ <string name="anyone" value="Chiunque"/> <string name="available" value="disponibile"/> <string name="allocated" value="assegnato"/> - <string name="title_place" value="Profilo del posto"/> + <string name="title_place" value="Profilo del luogo"/> <string name="title_teleport_history" value="Cronologia Teleport"/> <string name="not_available" value="(non pert.)"/> <string name="unknown" value="(sconosciuto)"/> diff --git a/indra/newview/skins/default/xui/it/panel_places.xml b/indra/newview/skins/default/xui/it/panel_places.xml index bdb852ba62..3b242b1805 100644 --- a/indra/newview/skins/default/xui/it/panel_places.xml +++ b/indra/newview/skins/default/xui/it/panel_places.xml @@ -11,5 +11,6 @@ <button label="Salva" name="save_btn"/> <button label="Annulla" name="cancel_btn"/> <button label="Chiudi" name="close_btn"/> + <button label="Profilo" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml index c24d3f656a..09e19f4bc0 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml @@ -13,13 +13,16 @@ </text> <check_box label="Costruire/Modificare" name="edit_camera_movement" tool_tip="Utilizza il posizionamento automatico della fotocamera entrando o uscendo dalla modalità modifica"/> <check_box label="Aspetto fisico" name="appearance_camera_movement" tool_tip="Utilizza il posizionamento automatico della camera in modalità modifica"/> - <check_box label="Mostra in modalità Mouselook" name="first_person_avatar_visible"/> + <check_box label="Visualizzami in modalità soggettiva" name="first_person_avatar_visible"/> <check_box label="Le frecce di direzione mi fanno sempre spostare" name="arrow_keys_move_avatar_check"/> <check_box label="Doppio click e tieni premuto per correre" name="tap_tap_hold_to_run"/> - <check_box label="Consente il movimento delle labbra dell'avatar quando parla" name="enable_lip_sync"/> + <check_box label="Movimento delle labbra dell'avatar quando parla" name="enable_lip_sync"/> <check_box label="Chat a bolla" name="bubble_text_chat"/> <slider label="Opacità " name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Scegli il colore delle vignette della chat"/> + <text name="UI Size:"> + Dimensioni interfaccia utente + </text> <check_box label="Mostra errori dello script in:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat nei dintorni" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Pulsante di comando della funzione Premi per parlare" name="modifier_combo"/> <button label="Imposta tasto" name="set_voice_hotkey_button"/> <button label="Pulsante centrale del mouse" name="set_voice_middlemouse_button" tool_tip="Reimposta sul pulsante centrale del mouse"/> + <button label="Altri dispositivi" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_general.xml b/indra/newview/skins/default/xui/it/panel_preferences_general.xml index 6bf857366b..e8c826609c 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_general.xml @@ -20,20 +20,20 @@ (Richiede il riavvio) </text> <text name="maturity_desired_prompt"> - Voglio accedere al contenuto di tipo: + Voglio accedere ai contenuti di tipo: </text> <text name="maturity_desired_textbox"/> <combo_box name="maturity_desired_combobox"> - <combo_box.item label="PG, Mature e Adult" name="Desired_Adult"/> - <combo_box.item label="PG e Mature" name="Desired_Mature"/> - <combo_box.item label="PG" name="Desired_PG"/> + <combo_box.item label="Generale, Moderato e Adulti" name="Desired_Adult"/> + <combo_box.item label="Generale e Moderato" name="Desired_Mature"/> + <combo_box.item label="Generale" name="Desired_PG"/> </combo_box> <text name="start_location_textbox"> Luogo di partenza: </text> <combo_box name="start_location_combo"> - <combo_box.item label="Ultimo posto visitato" name="MyLastLocation" tool_tip="Vai nell'ultimo posto visitato di default quando fai login."/> - <combo_box.item label="Casa mia" name="MyHome" tool_tip="Vai a casa di default quando fai login"/> + <combo_box.item label="Ultimo luogo visitato" name="MyLastLocation" tool_tip="Vai automaticamente all'ultimo luogo visitato quando effettui l'accesso."/> + <combo_box.item label="Casa mia" name="MyHome" tool_tip="Vai automaticamente a casa quando effettui l'accesso"/> </combo_box> <check_box initial_value="true" label="Mostra con il login" name="show_location_checkbox"/> <text name="name_tags_textbox"> diff --git a/indra/newview/skins/default/xui/it/panel_region_general.xml b/indra/newview/skins/default/xui/it/panel_region_general.xml index 7d8b346c17..6ca5dd878e 100644 --- a/indra/newview/skins/default/xui/it/panel_region_general.xml +++ b/indra/newview/skins/default/xui/it/panel_region_general.xml @@ -30,10 +30,10 @@ <text label="Maturità " name="access_text" width="120"> Categoria di accesso: </text> - <icons_combo_box label="Mature" left="126" name="access_combo" width="74"> - <icons_combo_box.item label="Adult" name="Adult" value="42"/> - <icons_combo_box.item label="Mature" name="Mature" value="21"/> - <icons_combo_box.item label="PG" name="PG" value="13"/> + <icons_combo_box label="Moderato" left="126" name="access_combo" width="74"> + <icons_combo_box.item label="Adulti" name="Adult" value="42"/> + <icons_combo_box.item label="Moderato" name="Mature" value="21"/> + <icons_combo_box.item label="Generale" name="PG" value="13"/> </icons_combo_box> <button label="Applica" name="apply_btn"/> <button label="Teleport a casa un residente..." name="kick_btn"/> diff --git a/indra/newview/skins/default/xui/it/panel_region_general_layout.xml b/indra/newview/skins/default/xui/it/panel_region_general_layout.xml index 232cd0c387..4cf31f4b6e 100644 --- a/indra/newview/skins/default/xui/it/panel_region_general_layout.xml +++ b/indra/newview/skins/default/xui/it/panel_region_general_layout.xml @@ -31,7 +31,7 @@ Categoria: </text> <combo_box label="Moderato" name="access_combo"> - <combo_box.item label="Adulto" name="Adult"/> + <combo_box.item label="Adulti" name="Adult"/> <combo_box.item label="Moderato" name="Mature"/> <combo_box.item label="Generale" name="PG"/> </combo_box> diff --git a/indra/newview/skins/default/xui/it/panel_world_map.xml b/indra/newview/skins/default/xui/it/panel_world_map.xml index 8d18e0ee0b..642af75028 100644 --- a/indra/newview/skins/default/xui/it/panel_world_map.xml +++ b/indra/newview/skins/default/xui/it/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NO </panel.string> + <panel.string name="world_map_person"> + 1 persona + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] persone + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml index 196eb75bd7..8a391c882c 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Profilo" name="info_btn"/> + <button label="Condividi" name="share_btn"/> <button label="Indossa" name="wear_btn"/> <button label="Riproduci" name="play_btn"/> <button label="Teleport" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index a1b570d716..9a6c648c8e 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -255,6 +255,9 @@ <string name="BUTTON_CLOSE_WIN"> Chiudi (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Chiudi + </string> <string name="BUTTON_RESTORE"> Ripristina </string> @@ -294,6 +297,9 @@ <string name="GroupNameNone"> (nessuno) </string> + <string name="AvalineCaller"> + Chiamante Avaline [ORDER] + </string> <string name="AssetErrorNone"> Nessun errore </string> @@ -697,13 +703,13 @@ Controllare la tua fotocamera </string> <string name="SIM_ACCESS_PG"> - PG + Generale </string> <string name="SIM_ACCESS_MATURE"> - Mature + Moderato </string> <string name="SIM_ACCESS_ADULT"> - Adult + Adulti </string> <string name="SIM_ACCESS_DOWN"> Offline @@ -886,13 +892,13 @@ Alto </string> <string name="LeaveMouselook"> - Premi ESC per tornare in visulizzazione normale + Premi ESC per tornare in visualizzazione normale </string> <string name="InventoryNoMatchingItems"> - Nessun oggetto corrispondente trovato in inventario. Prova [secondlife:///app/search/groups "Cerca"]. + Non riesci a trovare quello che cerchi? Prova [secondlife:///app/search/all Cerca]. </string> <string name="FavoritesNoMatchingItems"> - Trascina qui un punto di riferimento per aggiungerlo ai tuoi preferiti. + Trascina qui un punto di riferimento per aggiungerlo ai Preferiti. </string> <string name="InventoryNoTexture"> Non hai una copia di questa texture nel tuo inventario @@ -1548,9 +1554,7 @@ <string name="RegionNoCovenantOtherOwner"> Non esiste alcun regolamento per questa proprietà . Il terreno di questa proprietà è messo in vendita dal proprietario, non dalla Linden Lab. Contatta il proprietario del terreno per i dettagli della vendita. </string> - <string name="covenant_last_modified"> - Ultima modifica: - </string> + <string name="covenant_last_modified" value="Ultima modifica:"/> <string name="none_text" value="(nessuno)"/> <string name="never_text" value="(mai)"/> <string name="GroupOwned"> @@ -1566,7 +1570,7 @@ (si aggiornerà dopo la pubblicazione) </string> <string name="NoPicksClassifiedsText"> - Non hai creato luoghi preferiti né inserzioni. Clicca il pulsante più qui sotto per creare un luogo preferito o un'inserzione. + Non hai creato luoghi preferiti né inserzioni. Clicca il pulsante + qui sotto per creare un luogo preferito o un'inserzione. </string> <string name="NoAvatarPicksClassifiedsText"> L'utente non ha luoghi preferiti né inserzioni @@ -3227,6 +3231,15 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="LocationCtrlComboBtnTooltip"> La cronologia delle mie posizioni </string> + <string name="LocationCtrlAdultIconTooltip"> + Regione con categoria adulti + </string> + <string name="LocationCtrlModerateIconTooltip"> + Regione con categoria moderata + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Regione generale + </string> <string name="UpdaterWindowTitle"> Aggiornamento [APP_NAME] </string> @@ -3257,6 +3270,12 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Errore nell'avvio del viewer </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Oggetti in arrivo troppo velocemente da [FROM_NAME], anteprima automatica disattivata per [TIME] secondi + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Oggetti in arrivo troppo velocemente, anteprima automatica disattivata per [TIME] secondi + </string> <string name="IM_logging_string"> -- Registrazione messaggi instantanei abilitata -- </string> @@ -3284,6 +3303,9 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="IM_moderator_label"> (Moderatore) </string> + <string name="answered_call"> + Risposto alla chiamata + </string> <string name="started_call"> Chiamata vocale iniziata </string> @@ -3365,12 +3387,18 @@ Se il messaggio persiste, contatta [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] ha detto qualcosa di nuovo </string> + <string name="session_initialization_timed_out_error"> + Sessione di inizializzazione scaduta + </string> <string name="paid_you_ldollars"> [NAME] ti ha inviato un pagamento di L$[AMOUNT]. </string> <string name="you_paid_ldollars"> Hai inviato un pagamento di L$[AMOUNT] a [NAME] [REASON]. </string> + <string name="you_paid_ldollars_no_info"> + Hai pagato L$ [AMOUNT]. + </string> <string name="you_paid_ldollars_no_reason"> Hai inviato un pagamento di L$[AMOUNT] a [NAME]. </string> @@ -3481,4 +3509,13 @@ Segnala abuso <string name="Contents"> Contenuto </string> + <string name="AvatarBirthDateFormat"> + [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + nessuna/nessuna + </string> + <string name="texture_load_dimensions_error"> + Impossibile caricare immagini di dimensioni superiori a [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/it/teleport_strings.xml b/indra/newview/skins/default/xui/it/teleport_strings.xml index c11d41f6b9..7a1046abd3 100644 --- a/indra/newview/skins/default/xui/it/teleport_strings.xml +++ b/indra/newview/skins/default/xui/it/teleport_strings.xml @@ -66,7 +66,7 @@ Se si continua a visualizzare questo messaggio, consulta la pagina [SUPPORT_SITE Elaborazione della destinazione in corso... </message> <message name="contacting"> - Contattando la nuova regione. + Contatto in corso con la nuova regione. </message> <message name="arriving"> In arrivo a destinazione... diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml index 0eaad11cc7..31cfb5c339 100644 --- a/indra/newview/skins/default/xui/ja/floater_about.xml +++ b/indra/newview/skins/default/xui/ja/floater_about.xml @@ -43,13 +43,14 @@ Vivox ãƒãƒ¼ã‚¸ãƒ§ãƒ³ï¼š [VIVOX_VERSION] </panel> <panel label="クレジット" name="credits_panel"> <text_editor name="credits_editor"> - Second Life ã¯ã€ Philipã€Tessaã€Andrewã€Coryã€Jamesã€Benã€Charã€Charlieã€Colinã€Danã€Danielã€Dougã€Ericã€Hamletã€Haneyã€Eveã€Hunterã€Ianã€Jeffã€Jenniferã€Jimã€Johnã€Leeã€Markã€Peterã€Phoenixã€Richardã€Robinã€Xenonã€Steveã€Tanyaã€Eddieã€Aviã€Frankã€Bruceã€Aaronã€Aliceã€Bobã€Debraã€Eileenã€Helenã€Janetã€Louieã€Leviathaniaã€Stefanã€Rayã€Kevinã€Tomã€Mikebã€MikeTã€Burgessã€Elenaã€Tracyã€Billã€Toddã€Ryanã€Zachã€Sarahã€Novaã€Timã€Stephanieã€Michaelã€Evanã€Nicolasã€Catherineã€Rachelleã€Daveã€Hollyã€Bubã€Kellyã€Magellanã€Ramziã€Donã€Sabinã€Jillã€Rheyaã€Jeskaã€Torleyã€Konaã€Callumã€Charityã€Ventrellaã€Jackã€Vektorã€Irisã€Chrisã€Nicoleã€Mickã€Reubenã€Blueã€Babbageã€Yedwabã€Deanaã€Laurenã€Brentã€Pathfinderã€Chadrickã€Altruimaã€Jesseã€Teenyã€Monroeã€Icculusã€Davidã€Tessã€Lizzieã€Patsyã€Isaacã€Lawrenceã€Cynã€Boã€Giaã€Annetteã€Mariusã€Tboneã€Jonathanã€Karenã€Ginsuã€Satokoã€Yukoã€Makikoã€Thomasã€Harryã€Sethã€Alexeiã€Brianã€Guyã€Runitaiã€Ethanã€Dataã€Corneliusã€Kennyã€Swissã€Zeroã€Natriaã€Wendyã€Stephenã€Teepleã€Thumperã€Lucyã€Deeã€Miaã€Lianaã€Warrenã€Brankaã€Auraã€beezã€Miloã€Hermiaã€Redã€Thraxã€Joeã€Sallyã€Magentaã€Moguraã€Paulã€Joseã€Rejeanã€Henrikã€Lexieã€Amberã€Loganã€Xanã€Noraã€Morpheusã€Donovanã€Leylaã€MichaelFrancisã€Beastã€Cubeã€Buckyã€Joshuaã€Stryfeã€Harmonyã€Teresaã€Claudiaã€Walkerã€Glennã€Fritzã€Fordakã€Juneã€Cleopetraã€Jeanã€Ivyã€Betsyã€Rooseveltã€Spikeã€Kenã€Whichã€Tofuã€Chiyoã€Robã€Zeeã€dustinã€Georgeã€Delã€Matthewã€Catã€Jacquiã€Lightfootã€Adrianã€Violaã€Alfredã€Noelã€Irfanã€Sunilã€Yoolã€Rikaã€Janeã€Xtremeã€Frontierã€a2ã€Neoã€Siobhanã€Yozã€Justinã€Elleã€Qarlã€Benjaminã€Isabelã€Gulliverã€Everettã€Christopherã€Izzyã€Stephanyã€Garryã€Sejongã€Seanã€Tobinã€Iridiumã€Metaã€Anthonyã€Jeremyã€JPã€Jakeã€Mauriceã€Madhaviã€Leopardã€Kyleã€Joonã€Kariã€Bertã€Belindaã€Jonã€Kristiã€Bridieã€Pramodã€KJã€Socratesã€Mariaã€Ivanã€Aricã€Yamasakiã€Adreanneã€Jayã€MitchKã€Cerenã€Cocoã€Durlã€Jennyã€Periapseã€Karticã€Storrsã€Lotteã€Sandyã€Rohnã€Colossusã€Zenã€BigPapiã€Bradã€Pastramiã€Kurzã€Maniã€Neuroã€Jaimeã€MJã€Rowanã€Sgtã€Elvisã€Geckoã€Samuelã€Sardonyxã€Leoã€Bryanã€Nikoã€Softã€Poppyã€Rachelã€Akiã€Angeloã€Banzaiã€Alexaã€Sueã€CeeLoã€Benderã€CGã€Gillianã€Pelleã€Nickã€Echoã€Zaraã€Christineã€Shamiranã€Emmaã€Blakeã€Keikoã€Plexusã€Joppaã€Sidewinderã€Ericaã€Ashleiã€Twilightã€Kristenã€Brettã€Qã€Enusã€Simonã€Bevisã€Kraftã€Kipã€Chandlerã€Ronã€LauraPã€Ramã€KyleJMã€Scouseã€Prosperoã€Melissaã€Martyã€Natã€Hamiltonã€Kendã€Lordanã€Jimmyã€Kosmoã€Seraphã€Greenã€Ekimã€Wiggoã€JTã€Romeã€Dorisã€Mizã€Benocã€Whumpã€Trinityã€Patchã€Kateã€TJã€Baoã€Joohwanã€Christyã€Sofiaã€Matiasã€Cogsworthã€Johanã€Orehã€Cheahã€Angelaã€Brandyã€Mangoã€Lanã€Aleksã€Gloriaã€Heidyã€Mitchellã€Spaceã€Coltonã€Bambersã€Einsteinã€Maggieã€Malbersã€Roseã€Winnieã€Stellaã€Miltonã€Rothmanã€Niallã€Marinã€Allisonã€Katieã€Dawnã€Kattã€Dustyã€Kalpanaã€Judyã€Andreaã€Ambroffã€Infinityã€Gailã€Ricoã€Raymondã€Yiã€Williamã€Christaã€Mã€Teaganã€Scoutã€Mollyã€Danteã€Corrã€Dynamikeã€Usiã€Kayleeã€Vidtutsã€Lilã€Danicaã€Saschaã€Kelvã€Jacobã€Nyaã€Rodneyã€Brandonã€Elsieã€Blondinã€Grantã€Katrinã€Nyxã€Gabrielã€Locklainnã€Claireã€Devinã€Minervaã€Montyã€Austinã€Bradfordã€Siã€Keiraã€Hã€Caitlinã€Ditaã€Makaiã€Jennã€Annã€Meredithã€Clareã€Joyã€Praveenã€Codyã€Edmundã€Rutheã€Sirenaã€Gayathriã€Spiderã€FJã€Davidoffã€Tianã€Jennieã€Louiseã€Oskarã€Landonã€Noelleã€Jarvã€Ingridã€Alã€Sommerã€Docã€Ariaã€Huinã€Grayã€Liliã€Virã€DJã€Yangã€Tã€Simoneã€Maestroã€Scottã€Charleneã€Quixoteã€Amandaã€Susanã€Zedã€Anneã€Enkiduã€Esbeeã€Joroanã€Katelinã€Roxieã€Tayã€Scarletã€Kevinã€Johnnyã€Wolfgangã€Andrenã€Bobã€Howardã€Merovã€Randã€Rayã€Michonã€Newellã€Galenã€Dessieã€Lesã€Michonã€Jenelleã€Geoã€Sizã€Shapiroã€Peteã€Calyleã€Seleneã€Allenã€Phoebeã€Goldinã€Kimmoraã€Dakotaã€Slatonã€Lindquistã€Zoeyã€Hariã€Othelloã€Rohitã€Sheldonã€Petraã€Vialeã€Gordonã€Kayeã€Pinkã€Fernyã€Emersonã€Davyã€Briã€Chanã€Juanã€Robertã€Terrenceã€Nathanã€Carlã¨ã€ãã®ä»–多数ã®äººé”ã«ã‚ˆã£ã¦ä½œæˆã•ã‚Œã¾ã—ãŸã€‚ + Second Life ã¯ã€Philip, Tessa, Andrew, Cory, Ian, James, Phoenix, Ryan, Haney, Dan, Char, Ben, John, Tanya, Eddie, Richard, Mitch, Doug, Eric, Frank, Bruce, Aaron, Peter, Alice, Charlie, Debra, Eileen, Helen, Janet, Steffan, Steve, Tom, Mark, Hunter, Xenon, Burgess, Bill, Jim, Lee, Hamlet, Daniel, Jeff, Todd, Sarah, Tim, Stephanie, Colin, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Jack, Vektor, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Jesse, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Brad, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, Beez, Milo, Hermia, Red, Thrax, Gulliver, Joe, Sally, Paul, Jose, Rejean, Dore, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, Dustin, George, Del, Matthew, Cat, Jacqui, Adrian, Viola, Alfred, Noel, Irfan, Yool, Rika, Jane, Frontier, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Jeremy, JP, Jake, Anthony, Maurice, Madhavi, Leopard, Kyle, Joon, Bert, Belinda, Jon, Kristi, Bridie, Pramod, Socrates, Maria, Aric, Adreanne, Jay, Kari, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Pastrami, Kurz, Mani, Neuro, Mel, Sardonyx, MJ, Rowan, Sgt, Elvis, Samuel, Leo, Bryan, Niko, Austin, Soft, Poppy, Rachel, Aki, Banzai, Alexa, Sue, Bender, CG, Angelo, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Rothman, Niall, Marin, Allison, Katie, Dawn, Dusty, Katt, Judy, Andrea, Ambroff, Infinity, Rico, Gail, Kalpana, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Maestro, Simone, Yang, T, Shannon, Nelson, Khanh, Scott, Courtney, Charlene, Quixote, Susan, Zed, Amanda, Katelin, Enkidu, Roxie, Esbee, JoRoan, Scarlet, Tay, Kevin, Wolfgang, Johnny, Ray, Andren, Merov, Bob, Rand, Howard, Callen, Heff, Galen, Newell, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl, Ashley, JessieAnn, Huseby, Karina, Paris, Kurt, Rick, Lis, Kotler, Theeba, Lynx, Murphy, Doten, Taka, Norm, Jillian, Marcus, Mae, Novack, Esther, Perry, Dana, Ducot, Javier, Porter, Madison, Gecko, Dough, JR, Gisele, Crimp, Norie, Arch, Kimi, Fisher, Barbara, Jason, Peggy, Bernard, Jules, Leroy, Eva, Khederian, Campbell, Vogt, Masido, Karel, Torres, Lo, Breezer, Delby, Rountree, Anna, Servus, Rue, Itiaes, Chuck, Luna, Novella, Zaza, Wen, Gino, Lex, Cassandra, Limey, Nancy, Anukul, Silver, Brodesky, Jinsai, Squid, Gez, Rakesh, Ladan, Edelman, Marcet, Squire, Tatem, Tony, Jerm, Tia, Falcon, BK, Tiggs, Driscoll, Bacon, Timothee, Cru, Carmilla, Coyot, Webb, Kazu, Rudas, LJ, Sea, Ali Wallace, Bewest, Pup, Drub, Dragon, Inoshiro, Byron, Rhett, Xandix, Aimee, Fredrik, Thor, Teddy, Baron, Nelly, Ghengis, Epic, Eli, Stone, Grapes, Irie, Prep, Scobu, Valerie, Alain ãã®ä»–大勢ã®æ–¹ã€…ã«ã‚ˆã£ã¦æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚ - ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ã“ã‚Œã¾ã§ã§æœ€é«˜ã®ã‚‚ã®ã«ãªã‚‹ã‚ˆã†ã”å”力をã„ãŸã ã„ãŸä»¥ä¸‹ã®ä½äººã®çš†æ§˜ã«æ·±ãæ„Ÿè¬ã„ãŸã—ã¾ã™ã€‚ able whitman, Adeon Writer, adonaira aabye, Aeron Kohime, Agathos Frascati, Aimee Trescothick, Aleric Inglewood, Alissa Sabre, Aminom Marvin, Angela Talamasca, Aralara Rajal, Armin Weatherwax, Ashrilyn Hayashida, Athanasius Skytower, Aura Dirval, Barney Boomslang, Biancaluce Robbiani, Biker Offcourse, Borg Capalini, Bulli Schumann, catherine pfeffer, Chalice Yao, Corre Porta, Court Goodman, Cummere Mayo, Dale Innis, Darien Caldwell, Darjeeling Schoonhoven, Daten Thielt, dimentox travanti, Dirk Talamasca, Drew Dwi, Duckless Vandyke, Elanthius Flagstaff, Electro Burnstein, emiley tomsen, Escort DeFarge, Eva Rau, Ezian Ecksol, Fire Centaur, Fluf Fredriksson, Francisco Koolhoven, Frontera Thor, Frungi Stastny, Gally Young, gearsawe stonecutter, Gigs Taggart, Gordon Wendt, Gudmund Shepherd, Gypsy Paz, Harleen Gretzky, Henri Beauchamp, Inma Rau, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Jessicka Graves, Joeseph Albanese, Joshua Philgarlic, Khyota Wulluf, kirstenlee Cinquetti, Latif Khalifa, Lex Neva, Lilibeth Andree, Lisa Lowe, Lunita Savira, Loosey Demonia, lum pfohl, Marcos Fonzarelli, MartinRJ Fayray, Marusame Arai, Matthew Dowd, Maya Remblai, McCabe Maxsted, Meghan Dench, Melchoir Tokhes, Menos Short, Michelle2 Zenovka, Mimika Oh, Minerva Memel, Mm Alder, Ochi Wolfe, Omei Turnbull, Pesho Replacement, Phantom Ninetails, phoenixflames kukulcan, Polo Gufler, prez pessoa, princess niven, Prokofy Neva, Qie Niangao, Rem Beattie, RodneyLee Jessop, Saijanai Kuhn, Seg Baphomet, Sergen Davies, Shirley Marquez, SignpostMarv Martin, Sindy Tsure, Sira Arbizu, Skips Jigsaw, Sougent Harrop, Spritely Pixel, Squirrel Wood, StarSong Bright, Subversive Writer, Sugarcult Dagger, Sylumm Grigorovich, Tammy Nowotny, Tanooki Darkes, Tayra Dagostino, Theoretical Chemistry, Thickbrick Sleaford, valerie rosewood, Vex Streeter, Vixen Heron, Whoops Babii, Winter Ventura, Xiki Luik, Yann Dufaux, Yina Yao, Yukinoroh Kamachi, Zolute Infinity, Zwagoth Klaar +ç¾åœ¨æœ€ã‚‚優れãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨ãªã‚‹ã‚ˆã†ã”å”力ã„ãŸã ã„ãŸæ¬¡ã®ä½äººã®çš†æ§˜ã«æ·±ãæ„Ÿè¬ã„ãŸã—ã¾ã™ã€‚ Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan ãã®ä»–大勢ã®æ–¹ã€…。 - ビジãƒã‚¹ã§æˆåŠŸã™ã‚‹ã«ã¯ã€å‹‡æ°—ã‚’æŒã£ã¦ã€èª°ã‚ˆã‚Šã‚‚å…ˆã«ã€äººã¨é•ã£ãŸã“ã¨ã‚’ã™ã‚‹ã“ã¨ã 。 --Henry Marchant + +「努力ã¯ç¶šã。目標ã¯æŒç¶šã™ã‚‹ã€‚希望ã¯æ®‹ã•ã‚Œã¦ã„る。夢ã¯æ±ºã—ã¦æ¶ˆãˆãªã„。〠- エドワード・ケãƒãƒ‡ã‚£ </text_editor> </panel> <panel label="ライセンス" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index c9c01bc2a4..d23ab3565b 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -264,7 +264,7 @@ <text left="200" name="selected_objects_text"> [COUNT] </text> - <text name="Autoreturn" width="500"> + <text name="Autoreturn"> 他人ã®ã‚ªãƒ–ジェクトを自動返å´ï¼ˆåˆ†å˜ä½ã€0 ã§è‡ªå‹•è¿”å´ãªã—): </text> <line_editor left_delta="5" name="clean other time" right="-80"/> diff --git a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml index 8c2ac17ace..548d24097f 100644 --- a/indra/newview/skins/default/xui/ja/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/ja/floater_animation_preview.xml @@ -141,35 +141,35 @@ è¡¨ç¾ </text> <combo_box label="" name="emote_combo" tool_tip="アニメーションå†ç”Ÿä¸ã®é¡”ã®è¡¨æƒ…を決ã‚ã¾ã™"> - <combo_box.item label="(ãªã—)" name="[None]"/> - <combo_box.item label="アーーーーー" name="Aaaaah"/> - <combo_box.item label="æれる" name="Afraid"/> - <combo_box.item label="怒る" name="Angry"/> - <combo_box.item label="満é¢ã®ç¬‘ã¿" name="BigSmile"/> - <combo_box.item label="退屈" name="Bored"/> - <combo_box.item label="æ³£ã" name="Cry"/> - <combo_box.item label="侮辱" name="Disdain"/> - <combo_box.item label="æ¥ãšã‹ã—ãŒã‚‹" name="Embarrassed"/> - <combo_box.item label="ã—ã‹ã‚ã£é¢" name="Frown"/> - <combo_box.item label="ã‚ス" name="Kiss"/> - <combo_box.item label="笑ã†" name="Laugh"/> - <combo_box.item label="Plllppt" name="Plllppt"/> - <combo_box.item label="嫌悪感" name="Repulsed"/> - <combo_box.item label="悲ã—ã„" name="Sad"/> - <combo_box.item label="è‚©ã‚’ã™ãã‚ã‚‹" name="Shrug"/> - <combo_box.item label="微笑む" name="Smile"/> - <combo_box.item label="é©šã" name="Surprise"/> - <combo_box.item label="ウィンク" name="Wink"/> - <combo_box.item label="心é…ã™ã‚‹" name="Worry"/> + <item label="(ãªã—)" name="[None]" value=""/> + <item label="アーーーーー" name="Aaaaah" value="アーーーーー"/> + <item label="æれる" name="Afraid" value="æれる"/> + <item label="怒る" name="Angry" value="怒る"/> + <item label="満é¢ã®ç¬‘ã¿" name="BigSmile" value="満é¢ã®ç¬‘ã¿"/> + <item label="退屈" name="Bored" value="退屈"/> + <item label="æ³£ã" name="Cry" value="æ³£ã"/> + <item label="侮辱" name="Disdain" value="侮辱"/> + <item label="æ¥ãšã‹ã—ãŒã‚‹" name="Embarrassed" value="æ¥ãšã‹ã—ãŒã‚‹"/> + <item label="ã—ã‹ã‚ã£é¢" name="Frown" value="ã—ã‹ã‚ã£é¢"/> + <item label="ã‚ス" name="Kiss" value="ã‚ス"/> + <item label="笑ã†" name="Laugh" value="笑ã†"/> + <item label="Plllppt" name="Plllppt" value="Plllppt"/> + <item label="嫌悪感" name="Repulsed" value="嫌悪感"/> + <item label="悲ã—ã„" name="Sad" value="悲ã—ã„"/> + <item label="è‚©ã‚’ã™ãã‚ã‚‹" name="Shrug" value="è‚©ã‚’ã™ãã‚ã‚‹"/> + <item label="微笑む" name="Smile" value="微笑む"/> + <item label="é©šã" name="Surprise" value="é©šã"/> + <item label="ウィンク" name="Wink" value="ウィンク"/> + <item label="心é…ã™ã‚‹" name="Worry" value="心é…ã™ã‚‹"/> </combo_box> <text name="preview_label"> åŒæ™‚進行行動 </text> <combo_box label="" name="preview_base_anim" tool_tip="ã‚¢ãƒã‚¿ãƒ¼ãŒæ™®é€šã®è¡Œå‹•ã‚’ã™ã‚‹ã¨ãã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®å‹•ãをテストã™ã‚‹ãŸã‚ã«ã“れを使ã„ã¾ã™ã€‚"> - <combo_box.item label="ç«‹ã¤" name="Standing"/> - <combo_box.item label="æ©ã" name="Walking"/> - <combo_box.item label="座る" name="Sitting"/> - <combo_box.item label="飛ã¶" name="Flying"/> + <item label="ç«‹ã¤" name="Standing" value="ç«‹ã¤"/> + <item label="æ©ã" name="Walking" value="æ©ã"/> + <item label="座る" name="Sitting" value="座る"/> + <item label="飛ã¶" name="Flying" value="飛ã¶"/> </combo_box> <spinner label="イーズイン(秒)" name="ease_in_time" tool_tip="アニメーションã®ãƒ–レンドイン時間(秒)"/> <spinner label="イーズアウト(秒)" name="ease_out_time" tool_tip="アニメーションã®ãƒ–レンドアウト時間(秒)"/> diff --git a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml index b924af4e67..b0949cd4e0 100644 --- a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Day Cycle Floater" title="デイサイクル編集"> <tab_container name="Day Cycle Tabs"> <panel label="デイサイクル" name="Day Cycle"> - <button label="?" name="WLDayCycleHelp" /> + <button label="?" name="WLDayCycleHelp"/> <text name="WL12am"> 深夜 12時 </text> @@ -57,41 +57,38 @@ <text name="WL12amHash2"> | </text> - <button label="ã‚ーã®è¿½åŠ " label_selected="ã‚ーã®è¿½åŠ " name="WLAddKey" /> - <button label="ã‚ーã®å‰Šé™¤" label_selected="ã‚ーã®å‰Šé™¤" name="WLDeleteKey" /> + <button label="ã‚ーã®è¿½åŠ " label_selected="ã‚ーã®è¿½åŠ " name="WLAddKey"/> + <button label="ã‚ーã®å‰Šé™¤" label_selected="ã‚ーã®å‰Šé™¤" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> ã‚ーフレームã®è¨å®šï¼š </text> <text name="WLCurKeyTimeText"> ã‚ータイム: </text> - <spinner label="時間" name="WLCurKeyHour" /> - <spinner label="分" name="WLCurKeyMin" /> + <spinner label="時間" name="WLCurKeyHour"/> + <spinner label="分" name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> ã‚ーã®äº‹å‰è¨å®šï¼š </text> - <combo_box label="事å‰è¨å®š" name="WLKeyPresets" /> + <combo_box label="事å‰è¨å®š" name="WLKeyPresets"/> <text name="DayCycleText"> スナップ: </text> - <combo_box label="5 分" name="WLSnapOptions" /> + <combo_box label="5 分" name="WLSnapOptions"/> <text name="DayCycleText2"> サイクルã®é•·ã•ï¼š </text> - <spinner label="時間" name="WLLengthOfDayHour" /> - <spinner label="分" name="WLLengthOfDayMin" /> - <spinner label="秒" name="WLLengthOfDaySec" /> + <spinner label="時間" name="WLLengthOfDayHour"/> + <spinner label="分" name="WLLengthOfDayMin"/> + <spinner label="秒" name="WLLengthOfDaySec"/> <text name="DayCycleText3"> プレビュー: </text> <button label="å†ç”Ÿ" label_selected="å†ç”Ÿ" name="WLAnimSky"/> - <button label="åœæ¢" label_selected="åœæ¢" name="WLStopAnimSky" /> - <button label="ä¸å‹•ç”£ã®æ™‚刻を使用" - label_selected="ä¸å‹•ç”£ã®æ™‚刻ã«å¤‰æ›´" name="WLUseLindenTime"/> - <button label="デイテストをä¿å˜" - label_selected="デイテストをä¿å˜" name="WLSaveDayCycle" /> - <button label="デイテストをãƒãƒ¼ãƒ‰" - label_selected="デイテストをãƒãƒ¼ãƒ‰" name="WLLoadDayCycle" /> + <button label="åœæ¢" label_selected="åœæ¢" name="WLStopAnimSky"/> + <button label="ä¸å‹•ç”£ã®æ™‚刻を使用" label_selected="ä¸å‹•ç”£ã®æ™‚刻ã«å¤‰æ›´" name="WLUseLindenTime"/> + <button label="デイテストをä¿å˜" label_selected="デイテストをä¿å˜" name="WLSaveDayCycle"/> + <button label="デイテストをãƒãƒ¼ãƒ‰" label_selected="デイテストをãƒãƒ¼ãƒ‰" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_god_tools.xml b/indra/newview/skins/default/xui/ja/floater_god_tools.xml index 6ccd6b9293..ffea9474b0 100644 --- a/indra/newview/skins/default/xui/ja/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_god_tools.xml @@ -2,12 +2,11 @@ <floater name="godtools floater" title="ゴッド・ツール"> <tab_container name="GodTools Tabs"> <panel label="グリッド" name="grid"> - <button label="ä½äººå…¨å“¡ã‚’追ã„出ã™" label_selected="ä½äººå…¨å“¡ã‚’追ã„出ã™" name="Kick all users" width="160"/> <button label="ã“ã®åœ°åŸŸã®åœ°å›³ã®è¡¨ç¤ºã‚ャッシュを消去" label_selected="ã“ã®åœ°åŸŸã®åœ°å›³ã®è¡¨ç¤ºã‚ャッシュを消去" name="Flush This Region's Map Visibility Caches"/> </panel> <panel label="地域" name="region"> - <text name="Sim Name:"> - シムå: + <text name="Region Name:"> + リージョンå: </text> <check_box label="準備" name="check prelude" tool_tip="ã“ã®è¨å®šã«ã‚ˆã‚Šã€ã“ã®åœ°åŸŸã®æº–備をã—ã¾ã™ã€‚"/> <check_box label="太陽固定" name="check fixed sun" tool_tip="太陽ä½ç½®ã‚’固定([地域ï¼ä¸å‹•ç”£]>[地形]ã®å ´åˆã¨åŒæ§˜ï¼‰"/> @@ -52,8 +51,8 @@ <panel.string name="no_target"> (ターゲットãªã—) </panel.string> - <text name="Sim Name:"> - シムå: + <text name="Region Name:"> + リージョンå: </text> <text name="region name"> ウェルシュ diff --git a/indra/newview/skins/default/xui/ja/floater_image_preview.xml b/indra/newview/skins/default/xui/ja/floater_image_preview.xml index 2e57acf0d2..1ffc27fd70 100644 --- a/indra/newview/skins/default/xui/ja/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/ja/floater_image_preview.xml @@ -10,16 +10,16 @@ プレビュー: </text> <combo_box label="æœã®ç¨®é¡ž" name="clothing_type_combo"> - <combo_box.item label="ç”»åƒ" name="Image"/> - <combo_box.item label="髪" name="Hair"/> - <combo_box.item label="女性ã®é " name="FemaleHead"/> - <combo_box.item label="女性ã®ä¸ŠåŠèº«" name="FemaleUpperBody"/> - <combo_box.item label="女性ã®ä¸‹åŠèº«" name="FemaleLowerBody"/> - <combo_box.item label="男性ã®é " name="MaleHead"/> - <combo_box.item label="男性ã®ä¸ŠåŠèº«" name="MaleUpperBody"/> - <combo_box.item label="男性ã®ä¸‹åŠèº«" name="MaleLowerBody"/> - <combo_box.item label="スカート" name="Skirt"/> - <combo_box.item label="スカルプトプリム" name="SculptedPrim"/> + <item label="ç”»åƒ" name="Image" value="ç”»åƒ"/> + <item label="髪" name="Hair" value="髪"/> + <item label="女性ã®é " name="FemaleHead" value="女性ã®é "/> + <item label="女性ã®ä¸ŠåŠèº«" name="FemaleUpperBody" value="女性ã®ä¸ŠåŠèº«"/> + <item label="女性ã®ä¸‹åŠèº«" name="FemaleLowerBody" value="女性ã®ä¸‹åŠèº«"/> + <item label="男性ã®é " name="MaleHead" value="男性ã®é "/> + <item label="男性ã®ä¸ŠåŠèº«" name="MaleUpperBody" value="男性ã®ä¸ŠåŠèº«"/> + <item label="男性ã®ä¸‹åŠèº«" name="MaleLowerBody" value="男性ã®ä¸‹åŠèº«"/> + <item label="スカート" name="Skirt" value="スカート"/> + <item label="スカルプトプリム" name="SculptedPrim" value="スカルプトプリム"/> </combo_box> <text name="bad_image_text"> イメージをèªã¿å–ã‚Œã¾ã›ã‚“。 diff --git a/indra/newview/skins/default/xui/ja/floater_outgoing_call.xml b/indra/newview/skins/default/xui/ja/floater_outgoing_call.xml index 4ccaf1a4af..f1a05e0eec 100644 --- a/indra/newview/skins/default/xui/ja/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/ja/floater_outgoing_call.xml @@ -28,7 +28,7 @@ [VOICE_CHANNEL_NAME] ã¸ã®æŽ¥ç¶šãŒåˆ‡ã‚Œã¾ã—ãŸã€‚ [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] ãŒã‚³ãƒ¼ãƒ«ã‚’終了ã—ã¾ã—ãŸã€‚ [RECONNECT_NEARBY] + コールを切りã¾ã—ãŸã€‚ [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> コールを終了ã—ã¾ã—ãŸã€‚ [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/ja/floater_snapshot.xml b/indra/newview/skins/default/xui/ja/floater_snapshot.xml index 153b4068ad..9aecbab70f 100644 --- a/indra/newview/skins/default/xui/ja/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/ja/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="スナップショットã®ãƒ—レビュー"> - <text name="type_label"> - スナップショットã®é€ã‚Šå…ˆ - </text> - <radio_group label="スナップショットã®ç¨®é¡ž" name="snapshot_type_radio"> - <radio_item label="メール" name="postcard"/> - <radio_item label="「æŒã¡ç‰©ã€ã«ä¿å˜ï¼ˆL$ [AMOUNT])" name="texture"/> - <radio_item label="コンピューターã«ä¿å˜" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="スナップショットを更新" name="new_snapshot_btn"/> - <button label="é€ä¿¡" name="send_btn"/> - <button label="ä¿å˜ï¼ˆL$[AMOUNT])" name="upload_btn"/> - <flyout_button label="ä¿å˜" name="save_btn" tool_tip="ç”»åƒã‚’ファイルã«ä¿å˜"> - <flyout_button.item label="ä¿å˜" name="save_item"/> - <flyout_button.item label="別åã§ä¿å˜..." name="saveas_item"/> - </flyout_button> - <button label="ã‚ャンセル" name="discard_btn"/> - <button label="全表示" name="more_btn" tool_tip="詳ã—ã„è¨å®š"/> - <button label="簡易" name="less_btn" tool_tip="詳ã—ã„è¨å®š"/> - <text name="type_label2"> - サイズ - </text> - <text name="format_label" width="75"> - å½¢å¼ - </text> - <combo_box label="解åƒåº¦" name="postcard_size_combo"> - <combo_box.item label="ç¾åœ¨ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦" name="CurrentWindow"/> - <combo_box.item label="640 x 480" name="640x480"/> - <combo_box.item label="800 x 600" name="800x600"/> - <combo_box.item label="1024 x 768" name="1024x768"/> - <combo_box.item label="カスタム" name="Custom"/> - </combo_box> - <combo_box label="解åƒåº¦" name="texture_size_combo"> - <combo_box.item label="ç¾åœ¨ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦" name="CurrentWindow"/> - <combo_box.item label="å°ï¼ˆ128 x 128)" name="Small(128x128)"/> - <combo_box.item label="ä¸ï¼ˆ256 x 256)" name="Medium(256x256)"/> - <combo_box.item label="大(512 x5 12)" name="Large(512x512)"/> - <combo_box.item label="カスタム" name="Custom"/> - </combo_box> - <combo_box label="解åƒåº¦" name="local_size_combo"> - <combo_box.item label="ç¾åœ¨ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦" name="CurrentWindow"/> - <combo_box.item label="320 x 240" name="320x240"/> - <combo_box.item label="640 x 480" name="640x480"/> - <combo_box.item label="800 x 600" name="800x600"/> - <combo_box.item label="1024 x 768" name="1024x768"/> - <combo_box.item label="1280 x 1024" name="1280x1024"/> - <combo_box.item label="1600 x 1200" name="1600x1200"/> - <combo_box.item label="カスタム" name="Custom"/> - </combo_box> - <combo_box label="å½¢å¼" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="å¹…" label_width="25" name="snapshot_width" width="90"/> - <spinner label="高ã•" label_width="30" left="115" name="snapshot_height" width="90"/> - <check_box label="縦横比ã®å›ºå®š" name="keep_aspect_check"/> - <slider label="画質" name="image_quality_slider"/> - <text name="layer_type_label"> - ã‚ャプãƒãƒ£ï¼š - </text> - <combo_box label="ç”»åƒãƒ¬ã‚¤ãƒ¤ãƒ¼" name="layer_types"> - <combo_box.item label="色" name="Colors"/> - <combo_box.item label="色深度" name="Depth"/> - <combo_box.item label="マットオブジェクト" name="ObjectMattes"/> - </combo_box> - <check_box label="インターフェース" name="ui_check"/> - <check_box label="HUD" name="hud_check"/> - <check_box label="ä¿å˜å¾Œã‚‚é–‹ã„ãŸçŠ¶æ…‹ã‚’ä¿æŒ" name="keep_open_check"/> - <check_box label="ç”»é¢å…¨ä½“ã‚’é™æ¢" name="freeze_frame_check"/> - <check_box label="自動更新" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="スナップショット"> + <floater.string name="unknown"> ä¸æ˜Ž - </string> + </floater.string> + <button label="スナップショットを更新" name="new_snapshot_btn"/> + <line_editor label="説明" name="description"/> + <button label="共有" name="share"/> + <button label="Web ã§å…±æœ‰" name="share_to_web"/> + <button label="「æŒã¡ç‰©ã€ã«ä¿å˜" name="save_to_inventory"/> + <button label="ä¿å˜" name="save"/> + <button label="スナップショットをメール" name="share_to_email"/> + <button label="コンピューターã«ä¿å˜" name="save_to_computer"/> + <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«ã«è¨å®š" name="set_profile_pic"/> + <button label="戻る" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_tos.xml b/indra/newview/skins/default/xui/ja/floater_tos.xml index 337766987c..ae064724c0 100644 --- a/indra/newview/skins/default/xui/ja/floater_tos.xml +++ b/indra/newview/skins/default/xui/ja/floater_tos.xml @@ -1,22 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=" "> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="続行" label_selected="続行" name="Continue"/> <button label="å–り消ã—" label_selected="å–り消ã—" name="Cancel"/> - <radio_group name="tos_agreement"> - <radio_item label="利用è¦ç´„ã«åŒæ„ã—ã¾ã›ã‚“" name="radio_disagree"/> - <radio_item label="利用è¦ç´„ã«åŒæ„ã—ã¾ã™" name="radio_agree"/> - </radio_group> - <text name="tos_title"> - 利用è¦ç´„ - </text> <check_box label="利用è¦ç´„ã¨ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã«åŒæ„ã—ã¾ã™" name="agree_chk"/> <text name="tos_heading"> 次ã®åˆ©ç”¨è¦ç´„ã¨ãƒ—ライãƒã‚·ãƒ¼ãƒãƒªã‚·ãƒ¼ã‚’よããŠèªã¿ãã ã•ã„。 [SECOND_LIFE] ã¸ã®ãƒã‚°ã‚¤ãƒ³ã‚’続ã‘ã‚‹ã«ã¯ã€è¦ç´„ã«åŒæ„ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <text name="real_url"> - http://secondlife.com/app/tos/ - </text> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_world_map.xml b/indra/newview/skins/default/xui/ja/floater_world_map.xml index 0e489be9a8..ce9e7d0777 100644 --- a/indra/newview/skins/default/xui/ja/floater_world_map.xml +++ b/indra/newview/skins/default/xui/ja/floater_world_map.xml @@ -23,7 +23,7 @@ 土地販売 </text> <text name="by_owner_label"> - 所有者ã«ã¦ + 所有者ã®è²©å£² </text> <text name="auction_label"> 土地オークション @@ -68,7 +68,7 @@ <scroll_list.columns label="" name="sim_name"/> </scroll_list> <button label="テレãƒãƒ¼ãƒˆ" label_selected="テレãƒãƒ¼ãƒˆ" name="Teleport" tool_tip="é¸æŠžã—ãŸå ´æ‰€ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ã¾ã™"/> - <button label="SLurl をコピー" name="copy_slurl" tool_tip="ç¾åœ¨åœ°ã® SLurl をコピーã—㦠Web ã§ä½¿ç”¨ã—ã¾ã™ã€‚"/> + <button label="SLurl をコピー" name="copy_slurl" tool_tip="ç¾åœ¨åœ°ã® SLurl をコピーã—㦠Web ã§ä½¿ç”¨ã—ã¾ã™"/> <button label="é¸æŠžã‚’表示ã™ã‚‹" label_selected="目的地を表示" name="Show Destination" tool_tip="é¸æŠžã—ãŸå ´æ‰€ã‚’地図ã®ä¸å¿ƒã«è¡¨ç¤ºã—ã¾ã™"/> </panel> <panel name="layout_panel_5"> diff --git a/indra/newview/skins/default/xui/ja/inspect_avatar.xml b/indra/newview/skins/default/xui/ja/inspect_avatar.xml index aeac0a8328..fb4937242b 100644 --- a/indra/newview/skins/default/xui/ja/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/ja/inspect_avatar.xml @@ -20,7 +20,7 @@ <button label="IM" name="im_btn"/> <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="view_profile_btn"/> <panel name="moderator_panel"> - <button label="ボイスを無効ã«ã™ã‚‹" name="disable_voice"/> - <button label="ボイスを有効ã«ã™ã‚‹" name="enable_voice"/> + <button label="ボイスを無効" name="disable_voice"/> + <button label="ボイスを有効" name="enable_voice"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/ja/menu_attachment_other.xml b/indra/newview/skins/default/xui/ja/menu_attachment_other.xml index f163c2cf4f..5adf0b3745 100644 --- a/indra/newview/skins/default/xui/ja/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/ja/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="å ±å‘Š" name="abuse"/> <menu_item_call label="フリーズ" name="Freeze..."/> <menu_item_call label="追放" name="Eject..."/> - <menu_item_call label="デãƒãƒƒã‚°" name="Debug..."/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="Debug..."/> <menu_item_call label="ズームイン" name="Zoom In"/> <menu_item_call label="支払ã†" name="Pay..."/> <menu_item_call label="オブジェクトã®ãƒ—ãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/ja/menu_attachment_self.xml b/indra/newview/skins/default/xui/ja/menu_attachment_self.xml index 209edd80ba..72c91da479 100644 --- a/indra/newview/skins/default/xui/ja/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/ja/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="フレンド" name="Friends..."/> <menu_item_call label="グループ" name="Groups..."/> <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Profile..."/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_avatar_other.xml b/indra/newview/skins/default/xui/ja/menu_avatar_other.xml index 74d877cdda..54dd96f5ef 100644 --- a/indra/newview/skins/default/xui/ja/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/ja/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="å ±å‘Š" name="abuse"/> <menu_item_call label="フリーズ" name="Freeze..."/> <menu_item_call label="追放" name="Eject..."/> - <menu_item_call label="デãƒãƒƒã‚°" name="Debug..."/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="Debug..."/> <menu_item_call label="ズームイン" name="Zoom In"/> <menu_item_call label="支払ã†" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml index a638bed36f..c856cdccb9 100644 --- a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="フレンド" name="Friends..."/> <menu_item_call label="グループ" name="Groups..."/> <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Profile..."/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_edit.xml b/indra/newview/skins/default/xui/ja/menu_edit.xml new file mode 100644 index 0000000000..c2ef0179b2 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="編集" name="Edit"> + <menu_item_call label="å…ƒã«æˆ»ã™" name="Undo"/> + <menu_item_call label="ã‚„ã‚Šç›´ã—" name="Redo"/> + <menu_item_call label="切りå–ã‚Š" name="Cut"/> + <menu_item_call label="コピー" name="Copy"/> + <menu_item_call label="貼り付ã‘" name="Paste"/> + <menu_item_call label="削除" name="Delete"/> + <menu_item_call label="複製" name="Duplicate"/> + <menu_item_call label="ã™ã¹ã¦é¸æŠž" name="Select All"/> + <menu_item_call label="é¸æŠžè§£é™¤" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/ja/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/ja/menu_inspect_avatar_gear.xml index 93f75f3ce1..5fdaa9ae6b 100644 --- a/indra/newview/skins/default/xui/ja/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/ja/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="å ±å‘Š" name="report"/> <menu_item_call label="フリーズ" name="freeze"/> <menu_item_call label="追放" name="eject"/> - <menu_item_call label="デãƒãƒƒã‚°" name="debug"/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="debug"/> <menu_item_call label="地図ã§æŽ¢ã™" name="find_on_map"/> <menu_item_call label="ズームイン" name="zoom_in"/> <menu_item_call label="支払ã†" name="pay"/> diff --git a/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml index d02701b400..8867e5ccd6 100644 --- a/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/ja/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="my_profile"/> <menu_item_call label="フレンド" name="my_friends"/> <menu_item_call label="グループ" name="my_groups"/> + <menu_item_call label="テクスãƒãƒ£ã®ãƒ‡ãƒãƒƒã‚°" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/ja/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/ja/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..9a4a8138f5 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="é–‰ã˜ã‚‹" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml index 1607b2647e..bfb5023cf7 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="共有" name="Share"/> <menu_item_call label="購入" name="Task Buy"/> <menu_item_call label="é–‹ã" name="Task Open"/> <menu_item_call label="å†ç”Ÿ" name="Task Play"/> @@ -49,9 +50,9 @@ <menu_item_call label="ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã‚’入れ替ãˆã‚‹" name="Replace Outfit"/> <menu_item_call label="ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã«è¿½åŠ ã™ã‚‹" name="Add To Outfit"/> <menu_item_call label="ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã‹ã‚‰å–り除ã" name="Remove From Outfit"/> + <menu_item_call label="オリジナルを探ã™" name="Find Original"/> <menu_item_call label="アイテムを除外ã™ã‚‹" name="Purge Item"/> <menu_item_call label="アイテムを復元ã™ã‚‹" name="Restore Item"/> - <menu_item_call label="オリジナルを探ã™" name="Find Original"/> <menu_item_call label="é–‹ã" name="Open"/> <menu_item_call label="プãƒãƒ‘ティ" name="Properties"/> <menu_item_call label="åå‰ã‚’変更ã™ã‚‹" name="Rename"/> diff --git a/indra/newview/skins/default/xui/ja/menu_login.xml b/indra/newview/skins/default/xui/ja/menu_login.xml index d6f13f0e59..e2a7f39dfd 100644 --- a/indra/newview/skins/default/xui/ja/menu_login.xml +++ b/indra/newview/skins/default/xui/ja/menu_login.xml @@ -8,18 +8,8 @@ <menu_item_call label="[SECOND_LIFE] ヘルプ" name="Second Life Help"/> <menu_item_call label="[APP_NAME] ã«ã¤ã„ã¦" name="About Second Life"/> </menu> + <menu_item_check label="デãƒãƒƒã‚°ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’表示ã™ã‚‹" name="Show Debug Menu"/> <menu label="デãƒãƒƒã‚°" name="Debug"> - <menu label="編集" name="Edit"> - <menu_item_call label="å…ƒã«æˆ»ã™" name="Undo"/> - <menu_item_call label="ã‚„ã‚Šç›´ã—" name="Redo"/> - <menu_item_call label="切りå–ã‚Š" name="Cut"/> - <menu_item_call label="コピー" name="Copy"/> - <menu_item_call label="貼り付ã‘" name="Paste"/> - <menu_item_call label="削除" name="Delete"/> - <menu_item_call label="複製" name="Duplicate"/> - <menu_item_call label="ã™ã¹ã¦é¸æŠž" name="Select All"/> - <menu_item_call label="é¸æŠžè§£é™¤" name="Deselect"/> - </menu> <menu_item_call label="デãƒãƒƒã‚°è¨å®šã‚’表示" name="Debug Settings"/> <menu_item_call label="UI/色ã®è¨å®š" name="UI/Color Settings"/> <menu_item_call label="XUI プレビューツール" name="UI Preview Tool"/> @@ -28,5 +18,7 @@ <menu_item_call label="利用è¦ç´„を表示" name="TOS"/> <menu_item_call label="クリティカルメッセージを表示" name="Critical"/> <menu_item_call label="Web ブラウザã®ãƒ†ã‚¹ãƒˆ" name="Web Browser Test"/> + <menu_item_check label="グリッドピッカーを表示ã™ã‚‹" name="Show Grid Picker"/> + <menu_item_call label="通知コンソールを表示ã™ã‚‹" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/ja/menu_participant_list.xml b/indra/newview/skins/default/xui/ja/menu_participant_list.xml index 398a78bb61..3d0368245e 100644 --- a/indra/newview/skins/default/xui/ja/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/ja/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="コール" name="Call"/> <menu_item_call label="共有" name="Share"/> <menu_item_call label="支払ã†" name="Pay"/> + <menu_item_check label="人ã®ã‚¢ã‚¤ã‚³ãƒ³è¡¨ç¤º" name="View Icons"/> <menu_item_check label="ボイスをブãƒãƒƒã‚¯" name="Block/Unblock"/> <menu_item_check label="æ–‡å—をブãƒãƒƒã‚¯ã™ã‚‹" name="MuteText"/> <context_menu label="モデレーターã®ã‚ªãƒ—ション >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/ja/menu_save_outfit.xml b/indra/newview/skins/default/xui/ja/menu_save_outfit.xml new file mode 100644 index 0000000000..7ebaa6e1c8 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="ä¿å˜" name="save_outfit"/> + <menu_item_call label="æ–°è¦ã§ä¿å˜" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/ja/menu_script_chiclet.xml b/indra/newview/skins/default/xui/ja/menu_script_chiclet.xml new file mode 100644 index 0000000000..a89dd0bcbe --- /dev/null +++ b/indra/newview/skins/default/xui/ja/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="é–‰ã˜ã‚‹" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index bcad812457..760128408d 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -31,6 +31,7 @@ <menu_item_call label="スナップショット" name="Take Snapshot"/> <menu_item_call label="ç¾åœ¨åœ°ã‚’ランドマーク" name="Create Landmark Here"/> <menu label="å ´æ‰€ã®ãƒ—ãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Land"> + <menu_item_call label="å ´æ‰€ã®ãƒ—ãƒãƒ•ã‚£ãƒ¼ãƒ«" name="Place Profile"/> <menu_item_call label="åœŸåœ°æƒ…å ±" name="About Land"/> <menu_item_call label="地域 / ä¸å‹•ç”£" name="Region/Estate"/> </menu> @@ -66,17 +67,6 @@ <menu_item_call label="作æˆãƒ„ール" name="Create"/> <menu_item_call label="土地ツール" name="Land"/> </menu> - <menu label="編集" name="Edit"> - <menu_item_call label="å…ƒã«æˆ»ã™" name="Undo"/> - <menu_item_call label="ã‚„ã‚Šç›´ã—" name="Redo"/> - <menu_item_call label="切りå–ã‚Š" name="Cut"/> - <menu_item_call label="コピー" name="Copy"/> - <menu_item_call label="貼り付ã‘" name="Paste"/> - <menu_item_call label="削除" name="Delete"/> - <menu_item_call label="複製" name="Duplicate"/> - <menu_item_call label="ã™ã¹ã¦é¸æŠž" name="Select All"/> - <menu_item_call label="é¸æŠžè§£é™¤" name="Deselect"/> - </menu> <menu_item_call label="リンク" name="Link"/> <menu_item_call label="リンクを外ã™" name="Unlink"/> <menu_item_check label="リンクã—ãŸéƒ¨åˆ†ã‚’編集" name="Edit Linked Parts"/> @@ -124,6 +114,7 @@ <menu_item_call label="[APP_NAME] ã«ã¤ã„ã¦" name="About Second Life"/> </menu> <menu label="アドãƒãƒ³ã‚¹" name="Advanced"> + <menu_item_check label="アドãƒãƒ³ã‚¹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’表示ã™ã‚‹" name="Show Advanced Menu"/> <menu_item_call label="自分ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’åœæ¢ã™ã‚‹" name="Stop Animating My Avatar"/> <menu_item_call label="テクスãƒãƒ£ã®ãƒªãƒ™ãƒ¼ã‚¯ã‚’ã™ã‚‹" name="Rebake Texture"/> <menu_item_call label="UI ã®ã‚µã‚¤ã‚ºã‚’デフォルトã«è¨å®šã™ã‚‹" name="Set UI Size to Default"/> @@ -145,7 +136,6 @@ <menu_item_check label="é€æ˜Žéƒ¨åˆ†ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹" name="Highlight Transparent"/> <menu_item_check label="HUD を表示ã™ã‚‹" name="Show HUD Attachments"/> <menu_item_check label="一人称視点ã®ã¨ãã«åå—線を表示ã™ã‚‹" name="ShowCrosshairs"/> - <menu_item_check label="土地ã®ãƒ„ールãƒãƒƒãƒ—を表示ã™ã‚‹" name="Land Tips"/> </menu> <menu label="レンダリング(種類)" name="Rendering Types"> <menu_item_check label="シンプル" name="Simple"/> diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index ddb2ae49f7..7adc5e3a78 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -374,7 +374,7 @@ L$ ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ã§ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‚åŠ ã™ã‚‹ã“ã¨ãŒã§ãã <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - ピック「 [PICK] ã€ã‚’削除ã—ã¾ã™ã‹ï¼Ÿ + <nolink>[PICK]</nolink> を削除ã—ã¾ã™ã‹ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="OK"/> </notification> <notification name="PromptGoToEventsPage"> @@ -958,6 +958,16 @@ L$ ã¯è¿”金ã•ã‚Œã¾ã›ã‚“。 <button name="Cancel" text="ã‚ャンセル"/> </form> </notification> + <notification label="アウトフィットをä¿å˜ã™ã‚‹" name="SaveOutfitAs"> + ç€ç”¨ä¸ã®ã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã‚’æ–°ã—ã„アウトフットã¨ã—ã¦ä¿å˜ï¼š + <form name="form"> + <input name="message"> + [DESC] (新) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="ã‚ャンセル"/> + </form> + </notification> <notification name="RemoveFromFriends"> [FIRST_NAME] [LAST_NAME] をフレンドリストã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã‹ï¼Ÿ <usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="OK"/> @@ -1456,6 +1466,10 @@ F1 ã‚ーを押ã—ã¦ãã ã•ã„。 [CLASSIFIED] ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ã¾ã™ã‹ï¼Ÿ <usetemplate ignoretext="クラシファイド広告ã®å ´æ‰€ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ãŸã„ã‹ã©ã†ã‹ã®ç¢ºèª" name="okcancelignore" notext="ã‚ャンセル" yestext="テレãƒãƒ¼ãƒˆ"/> </notification> + <notification name="TeleportToHistoryEntry"> + [HISTORY_ENTRY] ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ã¾ã™ã‹ï¼Ÿ + <usetemplate ignoretext="å±¥æ´ã®å ´æ‰€ã«ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã—ãŸã„ã‹ã©ã†ã‹ã®ç¢ºèª" name="okcancelignore" notext="ã‚ャンセル" yestext="テレãƒãƒ¼ãƒˆ"/> + </notification> <notification label="ã‚ãªãŸã®ä¸å‹•ç”£å†…ã®å…¨å“¡ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é€ä¿¡" name="MessageEstate"> 今ã‚ãªãŸã®ä¸å‹•ç”£ã«ã„る人全員ã«é€ã‚‹ã€çŸã„メッセージを入力ã—ã¦ãã ã•ã„。 <form name="form"> @@ -1547,6 +1561,9 @@ F1 ã‚ーを押ã—ã¦ãã ã•ã„。 <ignore name="ignore" text="é¸æŠžã—ãŸãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ãŒåŽŸå› ã§ã€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã«å…¥ã‚Œãªã„ã¨ã"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†è¨å®šã¯ç¾åœ¨ [RATING] ã§ã™ã€‚ + </notification> <notification name="LandClaimAccessBlocked"> ã‚ãªãŸã®ãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°åŒºåˆ†ã«ã‚ˆã‚Šã€ã“ã®åœŸåœ°ã‚’å–å¾—ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 年齢を確èªã™ã‚‹éš›ã®æƒ…å ±ã«ä¸è¶³ãŒã‚ã£ãŸãŸã‚ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ @@ -1970,6 +1987,9 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> å–り消ã•ã‚Œã¾ã—ãŸã€‚ </notification> @@ -1998,6 +2018,11 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã インワールド㨠Web サイトã®ã‚¹ãƒŠãƒƒãƒ—ショットをアップãƒãƒ¼ãƒ‰ä¸ã§ã™... (所è¦æ™‚間:約 5 分) </notification> + <notification name="UploadConfirmation"> + アップãƒãƒ¼ãƒ‰æ–™é‡‘㯠L$[AMOUNT] ã§ã™ã€‚ +続ã‘ã¾ã™ã‹ï¼Ÿ + <usetemplate name="okcancelbuttons" notext="ã‚ャンセル" yestext="アップãƒãƒ¼ãƒ‰"/> + </notification> <notification name="UploadPayment"> アップãƒãƒ¼ãƒ‰ã« L$ [AMOUNT] 支払ã„ã¾ã—ãŸã€‚ </notification> @@ -2346,9 +2371,9 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã </form> </notification> <notification name="TeleportOffered"> - [NAME] ã¯ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ãªãŸã‚’呼んã§ã„ã¾ã™ã€‚ + [NAME_SLURL] ã¯ãƒ†ãƒ¬ãƒãƒ¼ãƒˆã§ã‚ãªãŸã‚’呼んã§ã„ã¾ã™ã€‚ -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="テレãƒãƒ¼ãƒˆ"/> <button name="Cancel" text="å–り消ã—"/> @@ -2366,12 +2391,11 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã </form> </notification> <notification name="OfferFriendship"> - [NAME]ã¯ã€ -フレンド登録を申ã—込んã§ã„ã¾ã™ã€‚ + [NAME_SLURL] ã¯ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã‚’申ã—込んã§ã„ã¾ã™ã€‚ [MESSAGE] -(デフォルトã§ãŠäº’ã„ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³çŠ¶æ…‹ã‚’見るã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚) +(デフォルトè¨å®šã ã¨ãŠäº’ã„ã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³çŠ¶æ…‹ã‚’見るã“ã¨ãŒã§ãã¾ã™ï¼‰ <form name="form"> <button name="Accept" text="å—ã‘入れる"/> <button name="Decline" text="辞退"/> @@ -2435,6 +2459,9 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <notification name="FailedToFindWearable"> データベース㫠[DESC] ã¨ã„ã†åå‰ã® [TYPE] ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ </notification> + <notification name="ShareToWebFailed"> + Web サイトã¸ã®ç”»åƒã®ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ + </notification> <notification name="InvalidWearable"> ç€ç”¨ã—よã†ã¨ã—ã¦ã„るアイテムã¯ã‚ãªãŸã®ãƒ“ューワã§ã¯èªã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã›ã‚“。 [APP_NAME] ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’アップグレードã—ã¦ã‹ã‚‰ã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’ç€ç”¨ã—ã¦ãã ã•ã„。 </notification> @@ -2476,14 +2503,6 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã <button name="Ignore" text="無視ã™ã‚‹"/> </form> </notification> - <notification name="ScriptToast"> - [FIRST] [LAST] ã®ã€Œ [TITLE] ã€ã¯ã€ä½äººã‚¤ãƒ³ãƒ—ットをリクエストã—ã¦ã„ã¾ã™ã€‚ - <form name="form"> - <button name="Open" text="ダイアãƒã‚°ã‚’é–‹ã"/> - <button name="Ignore" text="無視"/> - <button name="Block" text="ブãƒãƒƒã‚¯"/> - </form> - </notification> <notification name="BuyLindenDollarSuccess"> ãŠæ”¯æ‰•ã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™ã€‚ @@ -2639,6 +2658,12 @@ M ã‚ーを押ã—ã¦å¤‰æ›´ã—ã¾ã™ã€‚ é¸æŠžã—ãŸãƒœã‚¿ãƒ³ã‚’ç¾åœ¨è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 ã˜ã‚…ã†ã¶ã‚“ãªã‚¹ãƒšãƒ¼ã‚¹ãŒã§ãã‚Œã°ãƒœã‚¿ãƒ³ã¯è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ </notification> + <notification name="ShareNotification"> + ä½äººé¸æŠžç”»é¢ã«è¡¨ç¤ºã•ã‚ŒãŸäººã«ã€ŒæŒã¡ç‰©ã€ã‹ã‚‰ã‚¢ã‚¤ãƒ†ãƒ をドラッグã—ã¦ãã ã•ã„ + </notification> + <notification name="AvatarRezNotification"> + ã‚¢ãƒã‚¿ãƒ¼ã€Œ [NAME] ã€ãŒ [TIME] 秒ã§å‡ºç¾ã—ã¾ã™ã€‚ + </notification> <global name="UnsupportedCPU"> - ã‚ãªãŸã® CPU ã®é€Ÿåº¦ã¯å¿…é ˆå‹•ä½œç’°å¢ƒã®æ¡ä»¶ã‚’満ãŸã—ã¦ã„ã¾ã›ã‚“。 </global> diff --git a/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml new file mode 100644 index 0000000000..bac885e5d8 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Mockup Tab"/> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_eyes.xml b/indra/newview/skins/default/xui/ja/panel_edit_eyes.xml index 0cee85f685..94967999a1 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="çž³" name="Iris" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="ç›®"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="ç›®"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_gloves.xml b/indra/newview/skins/default/xui/ja/panel_edit_gloves.xml index 393bd15236..83e9abca85 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="手袋"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="手袋"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_hair.xml b/indra/newview/skins/default/xui/ja/panel_edit_hair.xml index 065771df16..f73f760192 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="テクスãƒãƒ£" name="Texture" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="色"/> - <accordion_tab name="hair_style_tab" title="スタイル"/> - <accordion_tab name="hair_eyebrows_tab" title="眉毛"/> - <accordion_tab name="hair_facial_tab" title="フェイシャル"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="色"/> + <accordion_tab name="hair_style_tab" title="スタイル"/> + <accordion_tab name="hair_eyebrows_tab" title="眉毛"/> + <accordion_tab name="hair_facial_tab" title="フェイシャル"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_jacket.xml b/indra/newview/skins/default/xui/ja/panel_edit_jacket.xml index 96a851cc4c..fe95061e57 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="生地・下" name="Lower Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="ジャケット"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="ジャケット"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_pants.xml b/indra/newview/skins/default/xui/ja/panel_edit_pants.xml index f93d3d6b14..9f672337aa 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="パンツ"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="パンツ"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml index 1e20eb26b6..e60534a54e 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="男性" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="身体"/> - <accordion_tab name="shape_head_tab" title="é "/> - <accordion_tab name="shape_eyes_tab" title="ç›®"/> - <accordion_tab name="shape_ears_tab" title="耳"/> - <accordion_tab name="shape_nose_tab" title="é¼»"/> - <accordion_tab name="shape_mouth_tab" title="å£"/> - <accordion_tab name="shape_chin_tab" title="ã‚ã”"/> - <accordion_tab name="shape_torso_tab" title="é "/> - <accordion_tab name="shape_legs_tab" title="è„š"/> - </accordion> + <panel label="シャツ" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="身体"/> + <accordion_tab name="shape_head_tab" title="é "/> + <accordion_tab name="shape_eyes_tab" title="ç›®"/> + <accordion_tab name="shape_ears_tab" title="耳"/> + <accordion_tab name="shape_nose_tab" title="é¼»"/> + <accordion_tab name="shape_mouth_tab" title="å£"/> + <accordion_tab name="shape_chin_tab" title="ã‚ã”"/> + <accordion_tab name="shape_torso_tab" title="é "/> + <accordion_tab name="shape_legs_tab" title="è„š"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_shirt.xml b/indra/newview/skins/default/xui/ja/panel_edit_shirt.xml index b2eb8fa18e..457c0bceb8 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="シャツ"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="シャツ"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_shoes.xml b/indra/newview/skins/default/xui/ja/panel_edit_shoes.xml index 83e302f8f9..98b4c57fc7 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="é´"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="é´"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_skin.xml b/indra/newview/skins/default/xui/ja/panel_edit_skin.xml index cd7efbec68..2c554dad94 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="上部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="Upper Tattoos" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž"/> <texture_picker label="下部ã®ã‚¿ãƒˆã‚¥ãƒ¼" name="Lower Tattoos" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="è‚Œã®è‰²"/> - <accordion_tab name="skin_face_tab" title="é¡”ã®è©³ç´°"/> - <accordion_tab name="skin_makeup_tab" title="メイクアップ"/> - <accordion_tab name="skin_body_tab" title="身体ã®è©³ç´°"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="è‚Œã®è‰²"/> + <accordion_tab name="skin_face_tab" title="é¡”ã®è©³ç´°"/> + <accordion_tab name="skin_makeup_tab" title="メイクアップ"/> + <accordion_tab name="skin_body_tab" title="身体ã®è©³ç´°"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_skirt.xml b/indra/newview/skins/default/xui/ja/panel_edit_skirt.xml index 0a0936a3a9..b169bab591 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠž"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="スカート"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="スカート"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_socks.xml b/indra/newview/skins/default/xui/ja/panel_edit_socks.xml index 7cbc75624f..b095257a56 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="é´ä¸‹"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="é´ä¸‹"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_underpants.xml b/indra/newview/skins/default/xui/ja/panel_edit_underpants.xml index 9287463b2c..fec34479c3 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="下ç€ãƒ‘ンツ"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="下ç€ãƒ‘ンツ"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/ja/panel_edit_undershirt.xml index 085ad97384..bd47d89947 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="生地" name="Fabric" tool_tip="クリックã—ã¦å†™çœŸã‚’é¸æŠžã—ã¾ã™"/> <color_swatch label="色・色彩é…åˆ" name="Color/Tint" tool_tip="クリックã—ã¦ã‚«ãƒ©ãƒ¼ãƒ”ッカーを開ãã¾ã™"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="下ç€ã‚·ãƒ£ãƒ„"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="下ç€ã‚·ãƒ£ãƒ„"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml b/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml index 2ae8e1863e..67828af6c2 100644 --- a/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/ja/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="シャツ" name="wearable_type_panel"> <text name="description_text" value="シェイプ:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="オプション"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="別åã§ä¿å˜" name="save_as_button"/> <button label="å…ƒã«æˆ»ã™" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/ja/panel_group_general.xml b/indra/newview/skins/default/xui/ja/panel_group_general.xml index 1b89b1b3cc..bfe69cbdd9 100644 --- a/indra/newview/skins/default/xui/ja/panel_group_general.xml +++ b/indra/newview/skins/default/xui/ja/panel_group_general.xml @@ -47,8 +47,11 @@ <check_box label="入会費ãŒã‹ã‹ã‚Šã¾ã™" name="check_enrollment_fee" tool_tip="入会費ãŒå¿…è¦ã‹ã©ã†ã‹ã‚’è¨å®šã—ã¾ã™ã€‚"/> <spinner label="L$" name="spin_enrollment_fee" tool_tip="「入会費ã€ã«ãƒã‚§ãƒƒã‚¯ãŒå…¥ã£ã¦ã„ã‚‹å ´åˆã€æ–°è¦ãƒ¡ãƒ³ãƒãƒ¼ã¯æŒ‡å®šã•ã‚ŒãŸå…¥ä¼šè²»ã‚’支払ã‚ãªã‘ã‚Œã°ã‚°ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚Œã¾ã›ã‚“。"/> <combo_box name="group_mature_check" tool_tip="ã‚ãªãŸã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ã€ŒModerateã€ã«ãƒ¬ãƒ¼ãƒˆè¨å®šã•ã‚ŒãŸæƒ…å ±ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’è¨å®šã—ã¾ã™"> - <combo_box.item label="「Generalã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„" name="pg"/> + <combo_item name="select_mature"> + - レーティングã®é¸æŠž - + </combo_item> <combo_box.item label="「Moderateã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„" name="mature"/> + <combo_box.item label="「Generalã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„" name="pg"/> </combo_box> <check_box initial_value="true" label="検索ã«è¡¨ç¤º" name="show_in_group_list" tool_tip="ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—を検索çµæžœã«è¡¨ç¤ºã•ã›ã¾ã™"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_inventory_item.xml b/indra/newview/skins/default/xui/ja/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/ja/panel_media_settings_permissions.xml index 223bd3e28c..11d9ed4c16 100644 --- a/indra/newview/skins/default/xui/ja/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/ja/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ ミニ </combo_item> </combo_box> + <text name="owner_label"> + 所有者 + </text> <check_box initial_value="false" label="ナビゲーションã¨ç›¸äº’作用力を有効ã«ã™ã‚‹" name="perms_owner_interact"/> <check_box initial_value="false" label="コントãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’表示ã™ã‚‹" name="perms_owner_control"/> + <text name="group_label"> + グループ: + </text> <check_box initial_value="false" label="ナビゲーションã¨ç›¸äº’作用力を有効ã«ã™ã‚‹" name="perms_group_interact"/> <check_box initial_value="false" label="コントãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’表示ã™ã‚‹" name="perms_group_control"/> + <text name="anyone_label"> + 全員 + </text> <check_box initial_value="false" label="ナビゲーションã¨ç›¸äº’作用力を有効ã«ã™ã‚‹" name="perms_anyone_interact"/> <check_box initial_value="false" label="コントãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’表示ã™ã‚‹" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml index fb273de420..d0e423bd18 100644 --- a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (メディアアイテム%ld ) + </string> <string name="empty_item_text"> <空> </string> @@ -16,15 +19,10 @@ <button label="ã™ã¹ã¦åœæ¢" name="all_nearby_media_disable_btn" tool_tip="è¿‘ãã®ãƒ¡ãƒ‡ã‚£ã‚¢ã‚’ã™ã¹ã¦ã‚ªãƒ•ã«ã—ã¾ã™"/> <button label="ã™ã¹ã¦é–‹å§‹" name="all_nearby_media_enable_btn" tool_tip="è¿‘ãã®ãƒ¡ãƒ‡ã‚£ã‚¢ã‚’ã™ã¹ã¦ã‚ªãƒ³ã«ã—ã¾ã™"/> <button name="open_prefs_btn" tool_tip="メディアã®è¨å®šã‚’é–‹ãã¾ã™"/> - <button label="詳細 >>" label_selected="簡易 <<" name="more_less_btn" tool_tip="アドãƒãƒ³ã‚¹ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«"/> + <button label="詳細 >>" label_selected="簡易 <<" name="more_btn" tool_tip="アドãƒãƒ³ã‚¹ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«"/> + <button label="詳細 >>" label_selected="簡易 <<" name="less_btn" tool_tip="アドãƒãƒ³ã‚¹ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - è¿‘ãã®ãƒ¡ãƒ‡ã‚£ã‚¢ - </text> - <text name="show"> - 表示: - </text> <combo_box name="show_combo"> <combo_box.item label="ã™ã¹ã¦" name="All"/> <combo_box.item label="ã“ã®åŒºç”»å†…" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="åå‰" name="media_name"/> <scroll_list.columns label="デãƒãƒƒã‚°" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="é¸æŠžã—ãŸãƒ¡ãƒ‡ã‚£ã‚¢ã‚’åœæ¢"/> diff --git a/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml b/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml new file mode 100644 index 0000000000..d0089b46aa --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="アウトフットã®ç·¨é›†" name="outfit_edit"> + <string name="No Outfit" value="アウトフィットãªã—"/> + <panel.string name="not_available"> + (該当ãªã—) + </panel.string> + <panel.string name="unknown"> + (ä¸æ˜Žï¼‰ + </panel.string> + <string name="Filter.All" value="ã™ã¹ã¦"/> + <string name="Filter.Clothes/Body" value="衣類/身体"/> + <string name="Filter.Objects" value="オブジェクト"/> + <button label="編集" name="edit_wearable_btn"/> + <text name="title" value="アウトフットã®ç·¨é›†"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="編集ä¸..."/> + <text name="curr_outfit_name" value="[Current Outfit]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="IM コントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="アイテムを確èª" name="look_item"/> + <scroll_list.columns label="アウトフィットアイテムã®ä¸¦ã¹æ›¿ãˆ" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="フィルター" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="IM コントãƒãƒ¼ãƒ«ãƒ‘ãƒãƒ«" name="filter_button_panel"> + <text name="add_to_outfit_label" value="アウトフィットã«è¿½åŠ :"/> + <button label="O" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="F" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="ä¿å˜" name="save_btn"/> + <button label="å…ƒã«æˆ»ã™" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/ja/panel_outfits_inventory.xml index b941763388..14f0d7d5e0 100644 --- a/indra/newview/skins/default/xui/ja/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/ja/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="ã‚‚ã®" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="マイ アウトフィット" name="outfitslist_tab"/> + <panel label="マイ アウトフィット" name="outfitslist_tab"/> <inventory_panel label="ç€ç”¨ä¸" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ を削除ã—ã¾ã™"/> <button label="アウトフィットをä¿å˜ã™ã‚‹" name="make_outfit_btn" tool_tip="容姿をアウトフィットã«ä¿å˜ã—ã¾ã™" width="140"/> <button label="装ç€" name="wear_btn" tool_tip="é¸æŠžã—ãŸã‚¢ã‚¦ãƒˆãƒ•ã‚£ãƒƒãƒˆã‚’ç€ç”¨ã—ã¾ã™"/> - <button label="M" name="look_edit_btn"/> + <button label="アウトフットã®ç·¨é›†" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_people.xml b/indra/newview/skins/default/xui/ja/panel_people.xml index 488a8c7a9b..5af578b640 100644 --- a/indra/newview/skins/default/xui/ja/panel_people.xml +++ b/indra/newview/skins/default/xui/ja/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="人" name="people_panel"> - <string name="no_people" value="誰もã„ã¾ã›ã‚“"/> - <string name="no_one_near" value="è¿‘ãã«èª°ã‚‚ã„ã¾ã›ã‚“"/> + <string name="no_recent_people" value="最近交æµã—ãŸäººã¯ã„ã¾ã›ã‚“。 一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚’ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‹ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_filtered_recent_people" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_one_near" value="è¿‘ãã«èª°ã‚‚ã„ã¾ã›ã‚“。 一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚’ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‹ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_one_filtered_near" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> <string name="no_friends_online" value="オンラインã®ãƒ•ãƒ¬ãƒ³ãƒ‰ã¯ã„ã¾ã›ã‚“"/> <string name="no_friends" value="フレンドã¯ã„ã¾ã›ã‚“"/> + <string name="no_friends_msg"> + å‹é”を見ã¤ã‘ã‚‹ã«ã¯ã€[secondlife:///app/search/people 検索] ã‚’ã™ã‚‹ã‹ã€ä½äººã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã—ã¦ãã ã•ã„。 +一緒ã«ä½•ã‹ã™ã‚‹ä»²é–“ã‚’ãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/worldmap 世界地図] ã‚’ãŠè©¦ã—ãã ã•ã„。 + </string> + <string name="no_filtered_friends_msg"> + ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/people 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 + </string> <string name="people_filter_label" value="人をフィルター"/> <string name="groups_filter_label" value="グループをフィルター"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups 検索ã§ã‚°ãƒ«ãƒ¼ãƒ—を探ã—ã¦ã¿ã¾ã™ã‹ï¼Ÿ]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups 入会ã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—を探ã—ã¾ã™ã€‚]"/> + <string name="no_filtered_groups_msg" value="ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/groups 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> + <string name="no_groups_msg" value="グループをãŠæŽ¢ã—ã§ã™ã‹ï¼Ÿ [secondlife:///app/search/groups 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。"/> <filter_editor label="フィルター" name="filter_input"/> <tab_container name="tabs"> <panel label="è¿‘ã" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="フレンド登録を申ã—出ã¾ã™"/> <button name="del_btn" tool_tip="é¸æŠžã—ãŸäººã‚’フレンドリストã‹ã‚‰å‰Šé™¤ã—ã¾ã™"/> </panel> - <text name="no_friends_msg"> - フレンドを登録ã™ã‚‹ã«ã¯ã€[secondlife:///app/search/people ã‚°ãƒãƒ¼ãƒãƒ«æ¤œç´¢] ã‚’ã™ã‚‹ã‹ã€ä½äººã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãã ã•ã„。 -誰ã‹ä¸€ç·’ã«è¡Œå‹•ã‚’ã™ã‚‹äººã‚’ãŠæŽ¢ã—ã®æ™‚ã¯ã€[secondlife:///app/worldmap 地図をãŠè©¦ã—ã ã•ã„]。 - </text> </panel> <panel label="マイ グループ" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> diff --git a/indra/newview/skins/default/xui/ja/panel_places.xml b/indra/newview/skins/default/xui/ja/panel_places.xml index acfa0bf4e8..d78a56aa10 100644 --- a/indra/newview/skins/default/xui/ja/panel_places.xml +++ b/indra/newview/skins/default/xui/ja/panel_places.xml @@ -11,5 +11,6 @@ <button label="ä¿å˜" name="save_btn"/> <button label="ã‚ャンセル" name="cancel_btn"/> <button label="é–‰ã˜ã‚‹" name="close_btn"/> + <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml index a8520a51cc..753951e282 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml @@ -20,6 +20,9 @@ <check_box label="å¹ã出ã—ãƒãƒ£ãƒƒãƒˆ" name="bubble_text_chat"/> <slider label="é€æ˜Žåº¦" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="å¹ã出ã—ãƒãƒ£ãƒƒãƒˆã®è‰²ã‚’é¸æŠžã—ã¾ã™"/> + <text name="UI Size:"> + UI サイズ + </text> <check_box label="スクリプトã®ã‚¨ãƒ©ãƒ¼ã‚’表示:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="è¿‘ãã®ãƒãƒ£ãƒƒãƒˆ" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="プッシュ・トゥ・スピークã®ãƒˆãƒªã‚¬ãƒ¼" name="modifier_combo"/> <button label="ã‚ーè¨å®š" name="set_voice_hotkey_button"/> <button label="マウスã®ä¸å¤®ãƒœã‚¿ãƒ³" name="set_voice_middlemouse_button" tool_tip="マウスã®ä¸å¤®ãƒœã‚¿ãƒ³ã«ãƒªã‚»ãƒƒãƒˆã—ã¾ã™"/> + <button label="ãã®ä»–ã®ãƒ‡ã‚£ãƒã‚¤ã‚¹" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_world_map.xml b/indra/newview/skins/default/xui/ja/panel_world_map.xml index 2f5c2bf6a1..8ff853193a 100644 --- a/indra/newview/skins/default/xui/ja/panel_world_map.xml +++ b/indra/newview/skins/default/xui/ja/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> 北西 </panel.string> + <panel.string name="world_map_person"> + 1 人 + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] 人 + </panel.string> <text label="北" name="floater_map_north" text="北"> 北 </text> diff --git a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml index 0c97fed901..f82c6136a6 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="プãƒãƒ•ã‚£ãƒ¼ãƒ«" name="info_btn"/> + <button label="共有" name="share_btn"/> <button label="装ç€" name="wear_btn"/> <button label="プレイ" name="play_btn"/> <button label="テレãƒãƒ¼ãƒˆ" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index a54d96061f..560465f808 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -261,6 +261,9 @@ <string name="BUTTON_CLOSE_WIN"> é–‰ã˜ã‚‹ (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + é–‰ã˜ã‚‹ + </string> <string name="BUTTON_RESTORE"> 復元 </string> @@ -303,6 +306,9 @@ <string name="GroupNameNone"> (ãªã—) </string> + <string name="AvalineCaller"> + Avaline コール [ORDER] + </string> <string name="AssetErrorNone"> エラーãªã— </string> @@ -904,10 +910,10 @@ ESC ã‚ーを押ã—ã¦ãƒ¯ãƒ¼ãƒ«ãƒ‰ãƒ“ューã«æˆ»ã‚Šã¾ã™ </string> <string name="InventoryNoMatchingItems"> - 一致ã™ã‚‹ã‚¢ã‚¤ãƒ†ãƒ ãŒã‚ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚[secondlife:///app/search/groups 「検索ã€]ã‚’ãŠè©¦ã—ãã ã•ã„。 + ãŠæŽ¢ã—ã®ã‚‚ã®ã¯è¦‹ã¤ã‹ã‚Šã¾ã—ãŸã‹ï¼Ÿ [secondlife:///app/search/all 検索] ã‚’ãŠè©¦ã—ãã ã•ã„。 </string> <string name="FavoritesNoMatchingItems"> - ã“ã“ã«ãƒ©ãƒ³ãƒ‰ãƒžãƒ¼ã‚¯ã‚’ドラッグã—ã¦ã€ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã—ã¾ã™ã€‚ + ã“ã“ã«ãƒ©ãƒ³ãƒ‰ãƒžãƒ¼ã‚¯ã‚’ドラッグã—ã¦ãŠæ°—ã«å…¥ã‚Šã«è¿½åŠ ã—ã¾ã™ã€‚ </string> <string name="InventoryNoTexture"> 「æŒã¡ç‰©ã€å†…ã«ã“ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã®ã‚³ãƒ”ーãŒã‚ã‚Šã¾ã›ã‚“ @@ -1575,9 +1581,7 @@ <string name="RegionNoCovenantOtherOwner"> ã“ã®ä¸å‹•ç”£ã«ã¯ç´„款ãŒã‚ã‚Šã¾ã›ã‚“。 ã“ã®ä¸å‹•ç”£ä¸Šã®åœŸåœ°ã¯ä¸å‹•ç”£æ‰€æœ‰è€…ã«ã‚ˆã‚Šè²©å£²ã•ã‚Œã€Linden Lab ã¯è²©å£²ã—ã¾ã›ã‚“。 販売ã«é–¢ã™ã‚‹ãŠå•ã„åˆã‚ã›ã¯ã€ä¸å‹•ç”£æ‰€æœ‰è€…ã¾ã§ãŠé¡˜ã„致ã—ã¾ã™ã€‚ </string> - <string name="covenant_last_modified"> - 最終修æ£æ—¥ï¼š - </string> + <string name="covenant_last_modified" value="最終修æ£æ—¥ï¼š"/> <string name="none_text" value=" (ãªã—) "/> <string name="never_text" value=" (無) "/> <string name="GroupOwned"> @@ -3311,6 +3315,15 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="LocationCtrlDamageTooltip"> 体力 </string> + <string name="LocationCtrlAdultIconTooltip"> + Adult リージョン + </string> + <string name="LocationCtrlModerateIconTooltip"> + Moderate リージョン + </string> + <string name="LocationCtrlGeneralIconTooltip"> + General リージョン + </string> <string name="UpdaterWindowTitle"> [APP_NAME] アップデート </string> @@ -3341,6 +3354,12 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="UpdaterFailStartTitle"> ビューワã®èµ·å‹•ã«å¤±æ•—ã—ã¾ã—㟠</string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME] : アイテム㌠[FROM_NAME] ã‹ã‚‰åŒæ™‚ã«ãŸãã•ã‚“èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME] : アイテムãŒåŒæ™‚ã«ãŸãã•ã‚“èªã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã€è‡ªå‹•ãƒ—レビュー㌠[TIME] 秒間無効ã¨ãªã‚Šã¾ã™ã€‚ + </string> <string name="IM_logging_string"> -- インスタントメッセージã®ä¿å˜é–‹å§‹ -- </string> @@ -3368,6 +3387,9 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="IM_moderator_label"> (モデレータ) </string> + <string name="answered_call"> + 相手ãŒã‚³ãƒ¼ãƒ«ã‚’å—ã‘ã¾ã—㟠+ </string> <string name="started_call"> ボイスコールを開始ã—ã¾ã™ </string> @@ -3461,12 +3483,18 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="unread_chat_multiple"> [SOURCES] ã¯ä½•ã‹æ–°ã—ã„ã“ã¨ã‚’言ã„ã¾ã—ãŸã€‚ </string> + <string name="session_initialization_timed_out_error"> + セッションã®åˆæœŸåŒ–ãŒã‚¿ã‚¤ãƒ アウトã—ã¾ã—㟠+ </string> <string name="paid_you_ldollars"> [NAME] 㯠L$[AMOUNT] 支払ã„ã¾ã—㟠</string> <string name="you_paid_ldollars"> [NAME] ã« L$ [AMOUNT] を支払ã„ã¾ã—ãŸï¼š[REASON] </string> + <string name="you_paid_ldollars_no_info"> + L$ [AMOUNT] を支払ã„ã¾ã—ãŸã€‚ + </string> <string name="you_paid_ldollars_no_reason"> [NAME] ã« L$ [AMOUNT] を支払ã„ã¾ã—ãŸã€‚ </string> @@ -3577,7 +3605,13 @@ www.secondlife.com ã‹ã‚‰æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ダウンãƒãƒ¼ãƒ‰ã—ã¦ãã ã <string name="Contents"> コンテンツ </string> - <string name="AvatarBirthDateFormat"> - [year,datetime,slt]/[mthnum,datetime,slt]/[day,datetime,slt] - </string> + <string name="AvatarBirthDateFormat"> + [year,datetime,slt]/[mthnum,datetime,slt]/[day,datetime,slt] + </string> + <string name="DefaultMimeType"> + ãªã—/ãªã— + </string> + <string name="texture_load_dimensions_error"> + [WIDTH]*[HEIGHT] 以上ã®ç”»åƒã¯èªã¿è¾¼ã‚ã¾ã›ã‚“ + </string> </strings> diff --git a/indra/newview/skins/default/xui/nl/floater_customize.xml b/indra/newview/skins/default/xui/nl/floater_customize.xml index 4de26347e1..e6a4ed7a27 100644 --- a/indra/newview/skins/default/xui/nl/floater_customize.xml +++ b/indra/newview/skins/default/xui/nl/floater_customize.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="UITERLIJK" width="551"> - <tab_container name="customize tab container" tab_min_width="120" width="549"> +<floater name="floater customize" title="UITERLIJK"> + <tab_container name="customize tab container" tab_min_width="120"> <placeholder label="Lichaamsdelen" name="body_parts_placeholder"/> <panel label="Postuur" name="Shape" left="124" width="389"> <button label="Herstel" label_selected="Herstel" name="Revert"/> @@ -462,7 +462,7 @@ slepen. Ook kunt u zelf van begin af aan een nieuwe creëren en dragen. <button label="Herstel" label_selected="Herstel" name="Revert"/> </panel> </tab_container> - <scroll_container left="254" name="panel_container"/> + <scroll_container name="panel_container"/> <button label="Annuleren" label_selected="Annuleren" name="Cancel"/> <button label="OK" label_selected="OK" name="Ok"/> <button label="Maak kleding..." label_selected="Maak kleding..." name="Make Outfit" left="110"/> diff --git a/indra/newview/skins/default/xui/nl/floater_tools.xml b/indra/newview/skins/default/xui/nl/floater_tools.xml index f79d3dbd6b..0f8392428f 100644 --- a/indra/newview/skins/default/xui/nl/floater_tools.xml +++ b/indra/newview/skins/default/xui/nl/floater_tools.xml @@ -403,7 +403,7 @@ <text name="glow label"> Gloed </text> - <check_box label="Volledige helderheid" name="checkbox fullbright" bottom_delta="-21"/> + <check_box label="Volledige helderheid" name="checkbox fullbright"/> <text name="tex gen"> Mapping </text> diff --git a/indra/newview/skins/default/xui/pl/menu_login.xml b/indra/newview/skins/default/xui/pl/menu_login.xml index 2673f5c271..ed4937182f 100644 --- a/indra/newview/skins/default/xui/pl/menu_login.xml +++ b/indra/newview/skins/default/xui/pl/menu_login.xml @@ -6,6 +6,7 @@ </menu> <menu label="Pomoc" name="Help"> <menu_item_call label="[SECOND_LIFE]: Pomoc" name="Second Life Help"/> + <menu_item_call label="O [APP_NAME]" name="About Second Life"/> </menu> <menu label="Debug" name="Debug"> <menu label="Edytuj" name="Edit"> diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 85ceb9592f..d1f0ac0e5c 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -119,6 +119,7 @@ <menu_item_call label="[SECOND_LIFE] Portal Pomocy" name="Second Life Help"/> <menu_item_call label="Złóż Raport o Nadużyciu" name="Report Abuse"/> <menu_item_call label="ZgÅ‚oÅ› BÅ‚Ä™dy Klienta" name="Report Bug"/> + <menu_item_call label="O [APP_NAME]" name="About Second Life"/> </menu> <menu label="Zaawansowane" name="Advanced"> <menu_item_call label="Zatrzymaj Wszystkie Animacje" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml index f1f6ff9aea..7671f58691 100644 --- a/indra/newview/skins/default/xui/pt/floater_about.xml +++ b/indra/newview/skins/default/xui/pt/floater_about.xml @@ -44,17 +44,12 @@ Versão Vivox: [VIVOX_VERSION] <text_editor name="credits_editor"> O Second Life é o resultado do trabalho de Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les e muitos mais. -Agradecemos também aos seguintes residentes por sua colaboração na mais nova versão do Second Life: (in progress) +Agradecemos também aos seguintes residentes por sua colaboração na mais nova versão do Second Life: Drew Dwi, Zai Lynch, Latif Khalifa, Ellla McMahon, Harleen Gretzky, Squirrel Wood, Malarthi Behemoth, Dante Tucker, Buckaroo Mu, Eddi Decosta, Dirk, Talamasca, Torben Trautman, Irene Muni, Lilly Zenovka, Vick Forcella, Sasy Scarborough, Gentle Welinder, Elric Anatine, Techwolf Lupindo, Dusan Writer, WolfPup Lowenhar, Marianne McCann, Fiachra Lach, Sitearm Madonna, Sudane Erato, Sahkolihaa Contepomi, Sachi Vixen, Questar Utu, Dimitrio Lewis, Matto Destiny, Scrim Pinion, Radio Signals, Psi Merlin, Pixel Gausman, Mel Vanbeeck, Laurent Bechir, Lamorna Proctor, Lares Carter, Gwyneth Llewelyn, Hydra Shaftoe, Holger Gilruth, Gentle Heron, Carla Broek, Boroondas Gupte, Fury Rosewood, Flower Ducatillon, Colpo Wexler, gwampa Lomu, Borg Capalini, Beansy Twine, Ardy Lay, , 45ms Zhong, Adeon Writer, Aeonix Aeon, Ai Austin, Aiko Ying, Alexandrea Fride, Alliez Mysterio, Annie Milestone, Annika Genezzia, Ansariel Hiller, ArminasX Saiman, Arya Braveheart, Asaeda Meltingdots, Asturkon Jua, Avallyn Oakleaf, Avatar Quinzet, BabyA Littlething, Bacchus Ireto, Bazaar, Riva, Benjamin Bigdipper, Beth Walcher, Bezilon Kasei, Biancaluce Robbiani, Bill Walach, blakopal Galicia, Blitzckreed Levenque, Bryn Oh, Callipygian Christensen, Cap Carver, Carr Arbenlow, Chantal Harvey, Charles Courtois, Charlie Sazaland, Cherry Cheevers, ChickyBabes Zuzu, Christopher Organiser, Ciaran Laval, Clara Young, Celierra Darling, Corinne Helendale, Corro Moseley, Coughdrop Littlething, Darien Caldwell, Dartagan Shepherd, Debs Regent, Decro Schmooz, Denim Kamachi, DiJodi Dubratt, Dil Spitz, Edgware Marker, Egehan Dryke, Emma Portilo, Emmie Fairymeadow, Evangelista Emerald, Faelon Swordthain, Frenchimmo Sabra, Gaberoonie Zanzibar, Ganymedes Costagravas, Gene Frostbite, GeneJ Composer, Giggles Littlebird, Grady Echegaray, Guni Greenstein, Gypsy Tripsa, Hackshaven Harford, Ham Rambler, Han Shuffle, Hanglow Short, Hatzfeld Runo, herina Bode, Horatio Freund, Hypatia Callisto, Hypatia Pickens, Identity Euler, Imnotgoing Sideways, Innula Zenovka, Iyoba Tarantal, Jack Abraham, Jagga Meredith, Jennifer Boyle, Jeremy Marquez, Jessica Qin, Jinx Nordberg, Jo Bernandes, Jocial Sonnenkern, Joel Savard, Jondan Lundquist, Josef Munster, Josette Windlow, Juilan Tripsa, Juro Kothari, Justin RiversRunRed, Kagehi Kohn, Kaimen Takahe, Keklily Longfall, Ken Lavender, Kestral Karas, Khisme Nitely, Kimar Coba, Kithrak Kirkorian, Kitty Barnett, Kolor Fall, Komiko Okamoto, Korvel Noh, Larry Pixel, Leal Choche, len Starship, Lenae Munz, Lexi Frua, Lillie Cordeaux, Lizzy Macarthur, LSL Scientist, Luban Yiyuan, Luc Starsider, Maccus McCullough, Madison Blanc, Maggie Darwin, Mallory Destiny, Manx Wharton, Marc Claridge, Marc2 Sands, Matthew Anthony, Maxim RiversRunRed, Medhue Simoni, Melinda Latynina, Mencius Watts, Michi Lumin, Midian Farspire, Miles Glaz, Mindy Mathy, Mitch Wagner, Mo Hax, Mourna Biziou, Nao Noe, naofan Teardrop, Naomah Beaumont, Nathiel Siamendes, Nber Medici, Neko Link, Netpat Igaly, Neutron Chesnokov, Newfie Pendragon, Nicholai Laviscu, Nick Rhodes, Nicoladie Gymnast, Ollie Kubrick, Orenj Marat, Orion Delphis, Oryx Tempel, Parvati Silverweb, PeterPunk Mooney, Pixel Scientist, Pounce Teazle, Professor Noarlunga, Quantum Destiny, Quicksilver Hermes, Ralf Setsuko, RAT Quan, RedMokum Bravin, Revolution Perenti, Rezit Sideways, Rich Grainger, Rosco Teardrop, Rose Evans, Rudee Voom, RufusTT Horsefly, Saii Hallard, SaintLEOlions Zimer, Samm Larkham, Satanello Miami, SexySteven Morrisey, Sheet Spotter, Shnurui Troughton, sicarius Thorne, Sicarius Toxx, Sini Nubalo, SLB Wirefly, snowy Sidran, Soupa Segura, ST Mensing, Starshine Halasy, Stickman Ingmann, Synystyr Texan, Takeda Terrawyng, Tali Rosca, Templar Merlin, Tezcatlipoca Bisiani, Tiel Stonecutter, Tony Kembia, TouchaHoney Perhaps, Trey Reanimator, TriloByte Zanzibar, Trinity Dechou, Trinity Dejavu, Unlikely Quintessa, UsikuFarasi Kanarik, Veritas Raymaker, Vex Streeter, Viaticus Speculaas, Villain Baroque, Vixie Durant, Void Singer, Watty Berkson, Westley Schridde, Westley Streeter, Whimsy Winx, Winter Ventura, Wundur Primbee, xstorm Radek, YongYong Francois, Zak Westminster, Zana Kohime, Zaren Alexander, Zeja Pyle, ZenMondo Wormser, Zoex Flanagan e muitos mais. - - - - -Raras são as mentes capazes de tornar óbvio o até então inexistente. Dizer 'eu poderia ter pensado a mesma coisa' é comum, revelador e nem sempre a verdade; porque de fato não pensaram. - -- Douglas Adams +"O trabalho continua, a causa vive, a esperança persiste, e os sonhos nunca morrem" - Edward Kennedy </text_editor> </panel> <panel label="Licenças" name="licenses_panel"> diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index 252969609a..787836a8bd 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -39,10 +39,10 @@ ID do Leilão: [ID] </panel.string> <panel.string name="need_tier_to_modify"> - Você deve ter sua compra aprovada para modificar este terreno. + Sua compra deve ser aprovada para você modificar este terreno. </panel.string> <panel.string name="group_owned_text"> - (PossuÃdo pelo Grupo) + (Propriedade do grupo) </panel.string> <panel.string name="profile_text"> Perfil... @@ -57,11 +57,11 @@ (nenhum) </panel.string> <panel.string name="sale_pending_text"> - (Venda Pendente) + (Venda pendendo) </panel.string> <panel.string name="no_selection_text"> Nenhum lote selecionado. -Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar seus detalhes. +Vá para o menu Mundo > Sobre o terreno ou selecione outro lote para mostrar os detalhes. </panel.string> <text name="Name:"> Nome: @@ -79,7 +79,7 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se Classificação: </text> <text name="ContentRatingText"> - Adult + Adulto </text> <text name="Owner:"> Proprietário: @@ -94,14 +94,14 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se Leyla Linden </text> <button label="Ajustar" name="Set..."/> - <check_box label="Permitir posse para o grupo" name="check deed" tool_tip="O gerente do grupo pode acionar essa terra ao grupo, então esta será mantida pelo gestor da ilha"/> - <button label="Passar" name="Deed..." tool_tip="Você só pode delegar esta terra se você for um gerente selecionado pelo grupo."/> - <check_box label="Proprietário faz contribuição com delegação" name="check contrib" tool_tip="Quando a terra é delegada ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/> + <check_box label="Permitir doação para o grupo" name="check deed" tool_tip="Oficiais do grupo podem doar esse terreno ao grupo, passando a administração para o gestor da ilha"/> + <button label="Passar" name="Deed..." tool_tip="Você só pode doar o terreno se você for um dos oficiais do grupo selecionado."/> + <check_box label="Proprietário faz contribuição com doação" name="check contrib" tool_tip="Quando o terreno é doado ao grupo, o proprietário anterior contribui alocando terra suficiente para mantê-la."/> <text name="For Sale:"> - À Venda: + À venda: </text> <text name="Not for sale."> - Não está à Venda. + Não está à venda. </text> <text name="For Sale: Price L$[PRICE]."> Preço: L$[PRICE] (L$[PRICE_PER_SQM]/m²). @@ -111,10 +111,10 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se À venda para: [BUYER] </text> <text name="Sell with landowners objects in parcel."> - À venda (Objetos incluÃdos). + À venda (objetos incluÃdos). </text> <text name="Selling with no objects in parcel."> - À venda (Objetos não incluÃdos). + À venda (objetos não incluÃdos). </text> <button label="Cancelar venda do terreno" label_selected="Cancelar venda do terreno" left="275" name="Cancel Land Sale" width="165"/> <text name="Claimed:"> @@ -137,7 +137,7 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se </text> <button label="Comprar terreno..." label_selected="Comprar terreno..." left="130" name="Buy Land..." width="125"/> <button label="Dados do script" name="Scripts..."/> - <button label="Comprar para o Grupo" name="Buy For Group..."/> + <button label="Comprar para o grupo" name="Buy For Group..."/> <button label="Comprar passe..." label_selected="Comprar passe..." left="130" name="Buy Pass..." tool_tip="Um passe concede a você acesso temporário a este terreno." width="125"/> <button label="Abandonar terreno..." label_selected="Abandonar terreno..." name="Abandon Land..."/> <button label="Pedir terreno" name="Reclaim Land..."/> @@ -145,24 +145,22 @@ Vá para o menu Mundo > Sobre a Terra ou selecione outro lote para mostrar se </panel> <panel label="CONTRATO" name="land_covenant_panel"> <panel.string name="can_resell"> - Terrenos comprados nesta região podem ser revendidos. + Permitido para terrenos comprados nesta região. </panel.string> <panel.string name="can_not_resell"> - Terrenos comprados nesta região não podem ser revendidos. + Proibido para terrenos comprados nesta região. </panel.string> <panel.string name="can_change"> - Terrenos comprados nesta região podem ser compartilhados -ou sub-divididos. + Permitido subdividir terrenos comprados nesta região. </panel.string> <panel.string name="can_not_change"> - Terrenos comprados nesta região não podem ser compartilhados -ou sub-divididos. + Proibido compartilhar ou subdividir terrenos comprados nesta região. </panel.string> <text name="estate_section_lbl"> Propriedade: </text> <text name="estate_name_text"> - mainland + continente </text> <text name="estate_owner_lbl"> Dono: @@ -174,7 +172,7 @@ ou sub-divididos. Não há corretor para esta Propriedade. </text_editor> <text name="covenant_timestamp_text"> - Última Alteração: Qua, Dez 31 16:00:00 1969 + Última modificação: Qua, Dez 31 16:00:00 1969 </text> <text name="region_section_lbl"> Região: @@ -192,19 +190,19 @@ ou sub-divididos. Classificação: </text> <text name="region_maturity_text"> - Adult + Adulto </text> <text name="resellable_lbl"> Revender: </text> <text name="resellable_clause"> - Terra nesta região não pode ser revendida. + Proibido revender terrenos nesta região. </text> <text name="changeable_lbl"> Subdividir: </text> <text name="changeable_clause"> - Terra nesta região não pode ser unida/sub-dividida. + Proibido juntar/subdividir terrenos nesta região. </text> </panel> <panel label="OBJETOS" name="land_objects_panel"> @@ -224,13 +222,13 @@ ou sub-divididos. [COUNT] de [MAX] ([AVAILABLE] disponÃveis) </text> <text name="Primitives parcel supports:" width="200"> - Prims suportadas pelo lote: + Prims suportados pelo lote: </text> <text left="214" name="object_contrib_text" width="152"> [COUNT] </text> <text name="Primitives on parcel:"> - Prims no Lote: + Prims no lote: </text> <text left="214" name="total_objects_text" width="48"> [COUNT] @@ -242,15 +240,15 @@ ou sub-divididos. [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowOwner" right="-135" width="60"/> - <button label="Retornar" name="ReturnOwner..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/> + <button label="Devolver" name="ReturnOwner..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Set to group:" width="180"> - Configurados ao grupo: + Reservado para o grupo: </text> <text left="214" name="group_objects_text" width="48"> [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowGroup" right="-135" width="60"/> - <button label="Retornar" name="ReturnGroup..." right="-10" tool_tip="Retornar os objetos para seus donos." width="119"/> + <button label="Devolver" name="ReturnGroup..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Owned by others:" width="128"> Propriedade de outros: </text> @@ -258,14 +256,14 @@ ou sub-divididos. [COUNT] </text> <button label="Mostrar" label_selected="Mostrar" name="ShowOther" right="-135" width="60"/> - <button label="Retornar" name="ReturnOther..." right="-10" tool_tip="Retornar os objetos aos seus donos." width="119"/> + <button label="Devolver" name="ReturnOther..." right="-10" tool_tip="Devolver objetos a seus donos." width="119"/> <text left="14" name="Selected / sat upon:" width="193"> Selecionado/Sentado: </text> <text left="214" name="selected_objects_text" width="48"> [COUNT] </text> - <text left="4" name="Autoreturn" width="412"> + <text name="Autoreturn"> Devolver objetos de outros residentes (p/ desligar tecle 0) </text> <line_editor name="clean other time" right="-10"/> @@ -273,7 +271,7 @@ ou sub-divididos. Donos dos objetos: </text> <button label="Atualizar lista" label_selected="Atualizar lista" left="118" name="Refresh List" tool_tip="Refresh Object List"/> - <button label="Retornar objetos..." label_selected="Retornar objetos..." left="230" name="Return objects..."/> + <button label="Devolver objetos..." label_selected="Devolver objetos..." left="230" name="Return objects..."/> <name_list name="owner list"> <name_list.columns label="Tipo" name="type"/> <name_list.columns label="Nome" name="name"/> @@ -299,32 +297,32 @@ Apenas lotes maiores podem ser listados na busca. Conteúdo Adulto </panel.string> <panel.string name="mature_check_mature_tooltip"> - A informação do seu lote ou seu conteúdo são considerados adulto. + Os dados do seu lote ou seu conteúdo são considerados adulto. </panel.string> <panel.string name="mature_check_adult_tooltip"> - A informação do seu lote ou seu conteúdo são considerados adulto. + Os dados do seu lote ou seu conteúdo são considerados adulto. </panel.string> <panel.string name="landing_point_none"> (nenhum) </panel.string> <panel.string name="push_restrict_text"> - Sem empurrar + Proibido empurrar </panel.string> <panel.string name="push_restrict_region_text"> - Sem empurrar (imposição na região) + Proibido empurrar (regulamento da região) </panel.string> <text name="allow_label"> Autorizar outros residentes a: </text> - <check_box label="Editar Terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar a forma da sua terra. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/> - <check_box label="Voar" name="check fly" tool_tip="Se ativado, os Residentes podem voar na sua terra. Se desativado, eles podem voar apenas para dentro e por cima de sua terra."/> + <check_box label="Editar terreno" name="edit land check" tool_tip="Se ativado, qualquer um pode modificar o terreno. É melhor deixar esta opção desativada, uma vez que você sempre pode editar seu próprio terreno."/> + <check_box label="Voar" name="check fly" tool_tip="Se ativado, residentes podem voar sobre seu terreno. Se desativado, eles podem voar apenas até chegar ou sobrevoar o seu terreno."/> <text name="allow_label2"> Criar objetos: </text> <check_box label="Residentes" name="edit objects check"/> <check_box label="Grupo" name="edit group objects check"/> <text name="allow_label3"> - Entrada do objeto: + Entrada de objetos: </text> <check_box label="Residentes" name="all object entry check"/> <check_box label="Grupo" name="group object entry check"/> @@ -334,10 +332,10 @@ Apenas lotes maiores podem ser listados na busca. <check_box label="Residentes" name="check other scripts"/> <check_box label="Grupo" name="check group scripts"/> <text name="land_options_label"> - Opções de terra: + Opções do terreno: </text> - <check_box label="Salvo (sem dano)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, desabilitando combate com danos. Se não ativado, o combate com danos é habilitado."/> - <check_box label="Sem Empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. A ativação dessa opção pode ser útil para prevenir comportamentos desordeiros na sua terra."/> + <check_box label="Seguro (sem danos)" name="check safe" tool_tip="Se ativado, ajusta o terreno para Seguro, impedindo lutas com danos. Se não ativado, lutas com danos é habilitado."/> + <check_box label="Proibido empurrar" name="PushRestrictCheck" tool_tip="Evita scripts que empurram. Ativar essa opção ajuda a prevenir comportamentos desordeiros no seu terreno."/> <check_box label="Mostrar terreno nos resultados de busca (L$30/semana)" name="ShowDirectoryCheck" tool_tip="Permitir que as pessoas vejam este terreno nos resultados de busca"/> <combo_box left="265" name="land category with adult" width="155"> <combo_box.item label="Qualquer categoria" name="item0"/> @@ -348,7 +346,7 @@ Apenas lotes maiores podem ser listados na busca. <combo_box.item label="Educacional" name="item5"/> <combo_box.item label="Jogos" name="item6"/> <combo_box.item label="Moradia" name="item7"/> - <combo_box.item label="Amigável a Novos Usuários" name="item8"/> + <combo_box.item label="Amigável a novos usuários" name="item8"/> <combo_box.item label="Parques & Natureza" name="item9"/> <combo_box.item label="Residencial" name="item10"/> <combo_box.item label="Compras" name="item11"/> @@ -362,7 +360,7 @@ Apenas lotes maiores podem ser listados na busca. <combo_box.item label="Educacional" name="item5"/> <combo_box.item label="Jogos" name="item6"/> <combo_box.item label="Moradia" name="item7"/> - <combo_box.item label="Amigável a Novos Usuários" name="item8"/> + <combo_box.item label="Amigável a novos usuários" name="item8"/> <combo_box.item label="Parques e Natureza" name="item9"/> <combo_box.item label="Residencial" name="item10"/> <combo_box.item label="Compras" name="item11"/> @@ -376,10 +374,10 @@ Apenas lotes maiores podem ser listados na busca. <text name="landing_point"> Ponto de Aterrissagem: [LANDING] </text> - <button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem aonde o visitante chega. Define para o ponto em que seu avatar se encontra neste lote."/> + <button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem de visitantes. Define para o ponto em que seu avatar se encontra neste lote."/> <button label="Limpar" label_selected="Limpar" name="Clear" tool_tip="Limpar o ponto de aterrissagem."/> <text name="Teleport Routing: "> - Rota de Teletransporte: + Rota de teletransporte: </text> <combo_box left="140" name="landing type" tool_tip="Rota de Teletransporte -- Selecione como tratar os teletransportes no seu lote." width="160"> <combo_box.item label="Bloqueado" name="Blocked"/> @@ -408,7 +406,7 @@ Textura: </text> <texture_picker label="" left="97" name="media texture" tool_tip="Clique para escolher uma imagem"/> <text name="replace_texture_help"> - Objetos com esta textura vão aparecer no filme ou página da web depois de clicar em Tocar. Selecione outras texturas clicando nas miniaturas. + Objetos com esta textura vão aparecer no filme ou página da web depois de clicar em Tocar. Selecione outras texturas clicando nas miniaturas. </text> <check_box label="Escala automática" left="97" name="media_auto_scale" tool_tip="Marcando esta opção o conteúdo se ajustará ao lote automaticamente. A mÃdia pode se tornar lenta e com baixa qualidade visual mas nenhum outro ajuste de textura ou alinhamento será necessário."/> <text left="102" name="media_size" tool_tip="Tamanho para desenhar a mÃdia Web, deixar 0 como padrão." width="115"> @@ -423,7 +421,7 @@ Textura: Opções de MÃdia: </text> - <check_box label="MÃdia em Repetição" name="media_loop" tool_tip="Executar a mÃdia repetidamente. Quando a mÃdia terminar a execução, ela reiniciará do começo."/> + <check_box label="Repetir mÃdia" name="media_loop" tool_tip="Executar a mÃdia repetidamente. Quando a mÃdia chegar ao fim, ela recomeça."/> </panel> <panel label="SOM" name="land_audio_panel"> <check_box label="Ocultar URL" name="hide_music_url" tool_tip="Selecionar esta opção oculta o URL de música a visitantes não autorizados aos dados do terreno."/> diff --git a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml index 78bcde251a..3ec81612a1 100644 --- a/indra/newview/skins/default/xui/pt/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/pt/floater_animation_preview.xml @@ -141,35 +141,35 @@ A duração máxima de animação permitida é de [MAX_LENGTH] segundos. Expressão </text> <combo_box left_delta="100" name="emote_combo" tool_tip="Controla as expressões faciais durante a animação" width="184"> - <combo_box.item label="(nenhum)" name="[None]"/> - <combo_box.item label="Aaaaah" name="Aaaaah"/> - <combo_box.item label="Com medo" name="Afraid"/> - <combo_box.item label="Bravo" name="Angry"/> - <combo_box.item label="Sorriso contagiante" name="BigSmile"/> - <combo_box.item label="À toa" name="Bored"/> - <combo_box.item label="Chorar" name="Cry"/> - <combo_box.item label="Desdenho" name="Disdain"/> - <combo_box.item label="Com vergonha" name="Embarrassed"/> - <combo_box.item label="Franzir testa" name="Frown"/> - <combo_box.item label="Beijo" name="Kiss"/> - <combo_box.item label="Rir" name="Laugh"/> - <combo_box.item label="Mostrar a lÃngua" name="Plllppt"/> - <combo_box.item label="Asco" name="Repulsed"/> - <combo_box.item label="Triste" name="Sad"/> - <combo_box.item label="Encolher os ombros" name="Shrug"/> - <combo_box.item label="Sorriso" name="Smile"/> - <combo_box.item label="Surpresa" name="Surprise"/> - <combo_box.item label="Piscar" name="Wink"/> - <combo_box.item label="Preocupado" name="Worry"/> + <item label="(nenhum)" name="[None]" value=""/> + <item label="Aaaaah" name="Aaaaah" value="Aaaaah"/> + <item label="Com medo" name="Afraid" value="Com medo"/> + <item label="Bravo" name="Angry" value="Bravo"/> + <item label="Sorriso contagiante" name="BigSmile" value="Sorriso contagiante"/> + <item label="À toa" name="Bored" value="À toa"/> + <item label="Chorar" name="Cry" value="Chorar"/> + <item label="Desdenho" name="Disdain" value="Desdenho"/> + <item label="Com vergonha" name="Embarrassed" value="Com vergonha"/> + <item label="Franzir testa" name="Frown" value="Franzir testa"/> + <item label="Beijo" name="Kiss" value="Beijo"/> + <item label="Rir" name="Laugh" value="Rir"/> + <item label="Mostrar a lÃngua" name="Plllppt" value="Mostrar a lÃngua"/> + <item label="Asco" name="Repulsed" value="Asco"/> + <item label="Triste" name="Sad" value="Triste"/> + <item label="Encolher os ombros" name="Shrug" value="Encolher os ombros"/> + <item label="Sorriso" name="Smile" value="Sorriso"/> + <item label="Surpresa" name="Surprise" value="Surpresa"/> + <item label="Piscar" name="Wink" value="Piscar"/> + <item label="Preocupado" name="Worry" value="Preocupado"/> </combo_box> <text name="preview_label" width="250"> Prever enquanto </text> <combo_box left_delta="100" name="preview_base_anim" tool_tip="Use isto para testar o comportamento de sua animação enquanto seu avatar executa ações comuns." width="130"> - <combo_box.item label="Em pé" name="Standing"/> - <combo_box.item label="Andando" name="Walking"/> - <combo_box.item label="Sentado" name="Sitting"/> - <combo_box.item label="Voando" name="Flying"/> + <item label="Em pé" name="Standing" value="Em pé"/> + <item label="Andando" name="Walking" value="Andando"/> + <item label="Sentado" name="Sitting" value="Sentado"/> + <item label="Voando" name="Flying" value="Voando"/> </combo_box> <spinner label="Facilitar a entrada (sec)" label_width="125" name="ease_in_time" tool_tip="Tempo (em segundos) da transição inicial da animação" width="192"/> <spinner bottom_delta="-20" label="Facilitar a saÃda (sec)" label_width="125" left="10" name="ease_out_time" tool_tip="Tempo (em segundos) da transição de saÃda da animação" width="192"/> diff --git a/indra/newview/skins/default/xui/pt/floater_customize.xml b/indra/newview/skins/default/xui/pt/floater_customize.xml index 2a367cb24a..a9ec0b9b1f 100644 --- a/indra/newview/skins/default/xui/pt/floater_customize.xml +++ b/indra/newview/skins/default/xui/pt/floater_customize.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="APARÊNCIA" width="546"> - <tab_container name="customize tab container" tab_min_width="115" width="544"> +<floater name="floater customize" title="APARÊNCIA"> + <tab_container name="customize tab container" tab_min_width="115"> <text label="Corpo" name="body_parts_placeholder"> Partes do corpo </text> diff --git a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml index dbca247a2f..306487939e 100644 --- a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml @@ -55,7 +55,7 @@ <spinner label="Minuto" name="WLLengthOfDayMin"/> <spinner label="Segundo" name="WLLengthOfDaySec"/> <text name="DayCycleText3"> - Prévia: + Visualizar </text> <button label="Tocar" label_selected="Tocar" name="WLAnimSky"/> <button label="Pare!" label_selected="Pare" name="WLStopAnimSky"/> diff --git a/indra/newview/skins/default/xui/pt/floater_god_tools.xml b/indra/newview/skins/default/xui/pt/floater_god_tools.xml index 2e63d86281..8003a35d16 100644 --- a/indra/newview/skins/default/xui/pt/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_god_tools.xml @@ -2,20 +2,19 @@ <floater name="godtools floater" title="FERRAMENTAS DE DEUS"> <tab_container name="GodTools Tabs"> <panel label="Grade" name="grid"> - <button label="Chutar todos" label_selected="Chutar todos" name="Kick all users"/> - <button label="Limpar os cachês de visibilidade do mapa da região." label_selected="Limpar os cachês de visibilidade do mapa da região." name="Flush This Region's Map Visibility Caches"/> + <button label="Limpar os caches de visibilidade do mapa da região." label_selected="Limpar os caches de visibilidade do mapa da região." name="Flush This Region's Map Visibility Caches"/> </panel> <panel label="Região" name="region"> - <text name="Sim Name:"> - Nome do Simulador: + <text name="Region Name:"> + Nome da região: </text> <check_box label="Prelúdio" name="check prelude" tool_tip="Ajustar para tornar esta região um prelúdio."/> <check_box label="Fixar Sol" name="check fixed sun" tool_tip="Fixa a posição do sol (como em Região/Estados) > Terreno."/> - <check_box label="Redefinir Home no teletransporte" name="check reset home" tool_tip="Quando um residente sair, definir o destino com sua posição inicial."/> + <check_box label="Redefinir InÃcio no teletransporte" name="check reset home" tool_tip="Quando um residente sair, definir o destino com sua posição inicial."/> <check_box label="VisÃvel" name="check visible" tool_tip="Ajustar para fazer essa região visÃvel para os não-deuses"/> <check_box label="Dano" name="check damage" tool_tip="Ajustar para permitir dano nesta região"/> <check_box label="Bloquear ratreamento do Tráfego" name="block dwell" tool_tip="Configure isto para fazer a região não computar o tráfego."/> - <check_box label="Bloquear Terraform" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/> + <check_box label="Bloquear terraplenagens" name="block terraform" tool_tip="Ajustar para desabilitar as pessoas a terraplanarem seus terrenos"/> <check_box label="Sandbox" name="is sandbox" tool_tip="Alterar se esta região for uma sandbox."/> <button label="Nivelar o terreno" label_selected="Nivelar o Terreno" name="Bake Terrain" tool_tip="Salva o terreno atual como padrão."/> <button label="Reverter Terreno" label_selected="Reverter Terreno" name="Revert Terrain" tool_tip="Substituir o terreno atual pelo padrão."/> @@ -47,8 +46,8 @@ <button label="Autosalvar Agora" label_selected="Autosalvar Agora" name="Autosave now" tool_tip="Salvar estado compactado para o diretório de gravação automática."/> </panel> <panel label="Objetos" name="objects"> - <text name="Sim Name:"> - Sim Nome: + <text name="Region Name:"> + Nome da região: </text> <text name="region name"> Welsh @@ -64,9 +63,9 @@ <button label="Apagar objetos programados do alvo em outras terras" label_selected="Apagar objetos programados do alvo em outras terras" name="Delete Target's Scripted Objects On Others Land" tool_tip="Apagar todos os objetos programados possuÃdos pelo alvo nas terras fora do domÃnio do alvo. Objetos (sem cópia) irão retornar."/> <button label="Apagar objetos programados do Alvo em qualquer terreno" label_selected="Apagar objetos programados do Alvo em qualquer terreno" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="Apagar todos os objetos programados do alvo nesta região. Objetos (sem cópia) irão retornar."/> <button label="Apagar *TODOS* os objetos do alvo" label_selected="Apagar *TODOS* os objetos do alvo" name="Delete *ALL* Of Target's Objects" tool_tip="Apagar todos os objetos possuÃdos pelo alvo nesta região. Objetos (sem cópia) objetos irão retornar."/> - <button label="Pegar os maiores colidentes" label_selected="Pegar os maiores colidentes" name="Get Top Colliders" tool_tip="Pega a lista de objetos que estão experimentando as chamadas mais freqüentes."/> - <button label="Pegar os scripts principais" label_selected="Pegar os scripts principais" name="Get Top Scripts" tool_tip="Pegar a lista de objetos programados com a maior duração em tempo de execução."/> - <button label="Informações de Scripts" label_selected="Informações de Scripts" name="Scripts digest" tool_tip="Pega uma lista de todos os scripts e o número de ocorrências de cada um."/> + <button label="Principais colidentes" label_selected="Lista dos maiores colidentes" name="Get Top Colliders" tool_tip="Gera a lista de objetos que estão experimentando as chamadas mais frequentes."/> + <button label="Principais scripts" label_selected="Lista dos scripts principais" name="Get Top Scripts" tool_tip="Gera a lista de objetos programados com a maior duração em tempo de execução."/> + <button label="Dados dos scripts" label_selected="Dados dos scripts" name="Scripts digest" tool_tip="Gera uma lista de todos os scripts e o número de ocorrências de cada um."/> </panel> <panel label="Requisição" name="request"> <text name="Destination:"> diff --git a/indra/newview/skins/default/xui/pt/floater_image_preview.xml b/indra/newview/skins/default/xui/pt/floater_image_preview.xml index 2ff1aa7915..3582923ed0 100644 --- a/indra/newview/skins/default/xui/pt/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/pt/floater_image_preview.xml @@ -11,16 +11,16 @@ imagem como: </text> <combo_box label="Tipo de Roupas" left="100" name="clothing_type_combo" width="186"> - <combo_box.item label="Imagem" name="Image"/> - <combo_box.item label="Cabelo" name="Hair"/> - <combo_box.item label="Cabeça de mulher" name="FemaleHead"/> - <combo_box.item label="Cintura para cima, mulher" name="FemaleUpperBody"/> - <combo_box.item label="Cintura para baixo, mulher" name="FemaleLowerBody"/> - <combo_box.item label="Cabeça de homem" name="MaleHead"/> - <combo_box.item label="Cintura para cima, homem" name="MaleUpperBody"/> - <combo_box.item label="Cintura para baixo, homem" name="MaleLowerBody"/> - <combo_box.item label="Saia" name="Skirt"/> - <combo_box.item label="Prim esculpido" name="SculptedPrim"/> + <item label="Imagem" name="Image" value="Imagem"/> + <item label="Cabelo" name="Hair" value="Cabelo"/> + <item label="Cabeça de mulher" name="FemaleHead" value="Cabeça de mulher"/> + <item label="Cintura para cima, mulher" name="FemaleUpperBody" value="Cintura para cima, mulher"/> + <item label="Cintura para baixo, mulher" name="FemaleLowerBody" value="Cintura para baixo, mulher"/> + <item label="Cabeça de homem" name="MaleHead" value="Cabeça de homem"/> + <item label="Cintura para cima, homem" name="MaleUpperBody" value="Cintura para cima, homem"/> + <item label="Cintura para baixo, homem" name="MaleLowerBody" value="Cintura para baixo, homem"/> + <item label="Saia" name="Skirt" value="Saia"/> + <item label="Prim esculpido" name="SculptedPrim" value="Prim esculpido"/> </combo_box> <text name="bad_image_text"> Incapaz de ler a imagem. diff --git a/indra/newview/skins/default/xui/pt/floater_outgoing_call.xml b/indra/newview/skins/default/xui/pt/floater_outgoing_call.xml index 8a536b90db..35afde7612 100644 --- a/indra/newview/skins/default/xui/pt/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/pt/floater_outgoing_call.xml @@ -28,7 +28,7 @@ Você saiu da ligação com [VOICE_CHANNEL_NAME]. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_other"> - [VOICE_CHANNEL_NAME] encerrou a ligação. [RECONNECT_NEARBY] + A ligação foi desligada. [RECONNECT_NEARBY] </text> <text name="nearby_P2P_by_agent"> Você encerrou a ligação. [RECONNECT_NEARBY] diff --git a/indra/newview/skins/default/xui/pt/floater_postcard.xml b/indra/newview/skins/default/xui/pt/floater_postcard.xml index d3c5b6ec23..9740fbcb4d 100644 --- a/indra/newview/skins/default/xui/pt/floater_postcard.xml +++ b/indra/newview/skins/default/xui/pt/floater_postcard.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Postcard" title="ENVIAR FOTO VIA EMAIL"> <text name="to_label" width="135"> - Email do Destinatário: + Para (email): </text> <line_editor left="143" name="to_form" width="127"/> <text name="from_label"> - Seu Email: + De (email): </text> <line_editor left="143" name="from_form" width="127"/> <text name="name_label"> @@ -16,7 +16,7 @@ Assunto: </text> <line_editor left="143" name="subject_form" width="127"/> - <line_editor label="Digite seu assunto aqui." name="subject_form"/> + <line_editor label="Digite o assunto aqui" name="subject_form"/> <text name="msg_label"> Mensagem: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_snapshot.xml b/indra/newview/skins/default/xui/pt/floater_snapshot.xml index bb852cb11a..b612442195 100644 --- a/indra/newview/skins/default/xui/pt/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/pt/floater_snapshot.xml @@ -1,79 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Snapshot" title="VER FOTO"> - <text name="type_label"> - Destino da foto - </text> - <radio_group label="Tipo de foto" name="snapshot_type_radio"> - <radio_item label="Email" name="postcard"/> - <radio_item label="Meu inventário (L$[AMOUNT])" name="texture"/> - <radio_item label="Salvar no meu PC" name="local"/> - </radio_group> - <text name="file_size_label"> - [SIZE] KB - </text> - <button label="Atualizar a foto" name="new_snapshot_btn"/> - <button label="Enviar" name="send_btn"/> - <button label="Salvar (L$[AMOUNT])" name="upload_btn"/> - <flyout_button label="Salvar" name="save_btn" tool_tip="Salvar imagem em um arquivo"> - <flyout_button.item label="Salvar" name="save_item"/> - <flyout_button.item label="Salvar como..." name="saveas_item"/> - </flyout_button> - <button label="Cancelar" name="discard_btn"/> - <button label="Mais" name="more_btn" tool_tip="Opções avançadas"/> - <button label="Menos" name="less_btn" tool_tip="Opções avançadas"/> - <text name="type_label2"> - Tamanho - </text> - <text name="format_label"> - Formato - </text> - <combo_box label="Resolução" name="postcard_size_combo"> - <combo_box.item label="Janela atual" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="Customizado" name="Custom"/> - </combo_box> - <combo_box label="Resolução" name="texture_size_combo"> - <combo_box.item label="Janela atual" name="CurrentWindow"/> - <combo_box.item label="Pequeno (128x128)" name="Small(128x128)"/> - <combo_box.item label="Médio (256x256)" name="Medium(256x256)"/> - <combo_box.item label="Grande (512x512)" name="Large(512x512)"/> - <combo_box.item label="Customizado" name="Custom"/> - </combo_box> - <combo_box label="Resolução" name="local_size_combo"> - <combo_box.item label="Janela atual" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> - <combo_box.item label="Customizado" name="Custom"/> - </combo_box> - <combo_box label="Formato" name="local_format_combo"> - <combo_box.item label="PNG" name="PNG"/> - <combo_box.item label="JPEG" name="JPEG"/> - <combo_box.item label="BMP" name="BMP"/> - </combo_box> - <spinner label="Largura" label_width="41" name="snapshot_width" width="101"/> - <spinner label="Altura" label_width="31" left="119" name="snapshot_height" width="91"/> - <check_box label="Limitar proproções" name="keep_aspect_check"/> - <slider label="Qualidade da imagem" name="image_quality_slider"/> - <text name="layer_type_label"> - Capturar: - </text> - <combo_box label="Camadas da imagem" name="layer_types"> - <combo_box.item label="Cores" name="Colors"/> - <combo_box.item label="Formato" name="Depth"/> - <combo_box.item label="Decoração do objeto" name="ObjectMattes"/> - </combo_box> - <check_box label="Interface" name="ui_check"/> - <check_box bottom_delta="-17" label="HUDs" name="hud_check"/> - <check_box bottom_delta="-17" label="Manter aberto após salvar" name="keep_open_check"/> - <check_box bottom_delta="-17" label="Gerar quadro (tela inteira)" name="freeze_frame_check"/> - <check_box bottom_delta="-29" label="Auto-atualizar" name="auto_snapshot_check"/> - <string name="unknown"> +<floater name="Snapshot" title="Foto"> + <floater.string name="unknown"> desconhecido - </string> + </floater.string> + <button label="Atualizar a foto" name="new_snapshot_btn"/> + <line_editor label="Descrição" name="description"/> + <button label="Compartilhar foto" name="share"/> + <button label="Compartilhar na web" name="share_to_web"/> + <button label="Salvar no meu inventário" name="save_to_inventory"/> + <button label="Salvar foto" name="save"/> + <button label="Enviar foto por email" name="share_to_email"/> + <button label="Salvar no meu PC" name="save_to_computer"/> + <button label="Usar como foto do perfil" name="set_profile_pic"/> + <button label="Atrás" name="cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 958a166dfc..3068880599 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -68,7 +68,7 @@ þ: [COUNT] </text> <check_box label="Esticar ambos os lados" name="checkbox uniform"/> - <check_box initial_value="true" label="Esticar Texturas" name="checkbox stretch textures"/> + <check_box initial_value="true" label="Esticar texturas" name="checkbox stretch textures"/> <check_box initial_value="true" label="Mostrar na grade" name="checkbox snap to grid"/> <combo_box name="combobox grid mode" tool_tip="Selecione o tipo de régua da grade onde o objeto será colocado"> <combo_box.item label="Grid SL" name="World"/> @@ -115,7 +115,7 @@ </text> <button label="Aplicar" label_selected="Aplicar" name="button apply to selection" tool_tip="Modificar a terra selecionada"/> <text left="134" name="obj_count"> - Objects: [COUNT] + Objetos: [COUNT] </text> <text left="134" name="prim_count"> Prims: [COUNT] @@ -183,10 +183,10 @@ <name_box initial_value="Carregando..." name="Group Name Proxy"/> <button label="Doar" label_selected="Doar" name="button deed" tool_tip="Ao doar este item, o próximo dono terá permissões de próximo dono. Objetos de grupos podem ser doados por um oficial do grupo."/> <check_box label="Compartilhar" name="checkbox share with group" tool_tip="Permitir que todos os membros do grupo tenhas suas permissões de modificação para este objeto. Faça uma doação para ativar restrições de função."/> - <text name="label click action" width="220"> + <text name="label click action"> Clique para: </text> - <combo_box name="clickaction" width="192"> + <combo_box name="clickaction"> <combo_box.item label="Tocar (padrão)" name="Touch/grab(default)"/> <combo_box.item label="Sentar no objeto" name="Sitonobject"/> <combo_box.item label="Comprar objeto" name="Buyobject"/> diff --git a/indra/newview/skins/default/xui/pt/floater_tos.xml b/indra/newview/skins/default/xui/pt/floater_tos.xml index 3603545ee7..2675979783 100644 --- a/indra/newview/skins/default/xui/pt/floater_tos.xml +++ b/indra/newview/skins/default/xui/pt/floater_tos.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="modal container" title=" "> + <floater.string name="real_url"> + http://secondlife.com/app/tos/ + </floater.string> + <floater.string name="loading_url"> + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Carregando %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + </floater.string> <button label="Continuar" label_selected="Continuar" name="Continue"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> <check_box label="Concordo com os Termos de Serviço e com a PolÃtica de Privacidade" name="agree_chk"/> <text name="tos_heading"> Leia com atenção os Termos do Serviço e a PolÃtica de Privacidade. Para continuar a entrar no [SECOND_LIFE], é preciso aceitar esses termos. </text> - <text_editor name="tos_text"> - TOS_TEXT - </text_editor> - <string name="real_url"> - http://secondlife.com/app/tos/ - </string> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml index 115192203f..efd90dfaa4 100644 --- a/indra/newview/skins/default/xui/pt/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml @@ -28,7 +28,7 @@ <text name="auction_label"> leilão de terrenos </text> - <button label="Ir para Casa" label_selected="Ir para casa" name="Go Home" tool_tip="Teletransportar para meu inÃcio"/> + <button label="Voltar ao meu inÃcio" label_selected="Voltar ao meu inÃcio" name="Go Home" tool_tip="Teletransportar para meu inÃcio"/> <text name="Home_label"> InÃcio </text> diff --git a/indra/newview/skins/default/xui/pt/menu_attachment_other.xml b/indra/newview/skins/default/xui/pt/menu_attachment_other.xml index b6cf896836..cfd69158bc 100644 --- a/indra/newview/skins/default/xui/pt/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/pt/menu_attachment_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Denunciar" name="abuse"/> <menu_item_call label="Congelar" name="Freeze..."/> <menu_item_call label="Ejetar" name="Eject..."/> - <menu_item_call label="Depurar" name="Debug..."/> + <menu_item_call label="Depurar texturas" name="Debug..."/> <menu_item_call label="Mais zoom" name="Zoom In"/> <menu_item_call label="Pagar" name="Pay..."/> <menu_item_call label="Perfil do objeto" name="Object Inspect"/> diff --git a/indra/newview/skins/default/xui/pt/menu_attachment_self.xml b/indra/newview/skins/default/xui/pt/menu_attachment_self.xml index 04f6227141..de3178b946 100644 --- a/indra/newview/skins/default/xui/pt/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/pt/menu_attachment_self.xml @@ -9,4 +9,5 @@ <menu_item_call label="Meus amigos" name="Friends..."/> <menu_item_call label="Meus grupos" name="Groups..."/> <menu_item_call label="Meu perfil" name="Profile..."/> + <menu_item_call label="Depurar texturas" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_avatar_other.xml b/indra/newview/skins/default/xui/pt/menu_avatar_other.xml index 21c2cb196a..a4a26144c7 100644 --- a/indra/newview/skins/default/xui/pt/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/pt/menu_avatar_other.xml @@ -10,7 +10,7 @@ <menu_item_call label="Denunciar" name="abuse"/> <menu_item_call label="Congelar" name="Freeze..."/> <menu_item_call label="Ejetar" name="Eject..."/> - <menu_item_call label="Depurar" name="Debug..."/> + <menu_item_call label="Depurar texturas" name="Debug..."/> <menu_item_call label="Mais zoom" name="Zoom In"/> <menu_item_call label="Pagar" name="Pay..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_avatar_self.xml b/indra/newview/skins/default/xui/pt/menu_avatar_self.xml index abbf2e7032..ccbb921ebc 100644 --- a/indra/newview/skins/default/xui/pt/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/pt/menu_avatar_self.xml @@ -24,4 +24,5 @@ <menu_item_call label="Meus amigos" name="Friends..."/> <menu_item_call label="Meus grupos" name="Groups..."/> <menu_item_call label="Meu perfil" name="Profile..."/> + <menu_item_call label="Depurar texturas" name="Debug..."/> </context_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_edit.xml b/indra/newview/skins/default/xui/pt/menu_edit.xml new file mode 100644 index 0000000000..ff431c9a21 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/menu_edit.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu label="Editar" name="Edit"> + <menu_item_call label="Desfazer" name="Undo"/> + <menu_item_call label="Repetir" name="Redo"/> + <menu_item_call label="Cortar" name="Cut"/> + <menu_item_call label="Copiar" name="Copy"/> + <menu_item_call label="Colar" name="Paste"/> + <menu_item_call label="Excluir" name="Delete"/> + <menu_item_call label="Replicar" name="Duplicate"/> + <menu_item_call label="Selecionar tudo" name="Select All"/> + <menu_item_call label="Desfazer seleção" name="Deselect"/> +</menu> diff --git a/indra/newview/skins/default/xui/pt/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/pt/menu_inspect_avatar_gear.xml index cdd8959cd4..6a511e6ab7 100644 --- a/indra/newview/skins/default/xui/pt/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/pt/menu_inspect_avatar_gear.xml @@ -11,7 +11,7 @@ <menu_item_call label="Denunciar" name="report"/> <menu_item_call label="Congelar" name="freeze"/> <menu_item_call label="Ejetar" name="eject"/> - <menu_item_call label="Depurar" name="debug"/> + <menu_item_call label="Depurar texturas" name="debug"/> <menu_item_call label="Localizar no mapa" name="find_on_map"/> <menu_item_call label="Mais zoom" name="zoom_in"/> <menu_item_call label="Pagar" name="pay"/> diff --git a/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml index 2eba4ccb2d..effc970eb8 100644 --- a/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/pt/menu_inspect_self_gear.xml @@ -5,4 +5,5 @@ <menu_item_call label="Meu perfil" name="my_profile"/> <menu_item_call label="Meus amigos" name="my_friends"/> <menu_item_call label="Meus grupos" name="my_groups"/> + <menu_item_call label="Depurar texturas" name="Debug..."/> </menu> diff --git a/indra/newview/skins/default/xui/pt/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/pt/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..c404719c95 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/menu_inv_offer_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="InvOfferChiclet Menu"> + <menu_item_call label="Fechar" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml index 2691ac81b3..345534261a 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> + <menu_item_call label="Compartilhar" name="Share"/> <menu_item_call label="Comprar" name="Task Buy"/> <menu_item_call label="Abrir" name="Task Open"/> <menu_item_call label="Executar" name="Task Play"/> @@ -48,6 +49,8 @@ <menu_item_call label="Abrir" name="Sound Open"/> <menu_item_call label="Substituir equipamento" name="Replace Outfit"/> <menu_item_call label="Adicionar ao equipamento" name="Add To Outfit"/> + <menu_item_call label="Tirar do look atual" name="Remove From Outfit"/> + <menu_item_call label="Encontrar original" name="Find Original"/> <menu_item_call label="Remover item" name="Purge Item"/> <menu_item_call label="Restaurar item" name="Restore Item"/> <menu_item_call label="Abrir" name="Open"/> @@ -57,6 +60,7 @@ <menu_item_call label="Copiar" name="Copy"/> <menu_item_call label="Colar" name="Paste"/> <menu_item_call label="Colar como link" name="Paste As Link"/> + <menu_item_call label="Remover link" name="Remove Link"/> <menu_item_call label="Apagar" name="Delete"/> <menu_item_call label="Excluir pasta do sistema" name="Delete System Folder"/> <menu_item_call label="Pasta conversa em conferência" name="Conference Chat Folder"/> diff --git a/indra/newview/skins/default/xui/pt/menu_login.xml b/indra/newview/skins/default/xui/pt/menu_login.xml index 6cc83d11d0..8ea87a06d1 100644 --- a/indra/newview/skins/default/xui/pt/menu_login.xml +++ b/indra/newview/skins/default/xui/pt/menu_login.xml @@ -6,19 +6,10 @@ </menu> <menu label="Ajuda" name="Help"> <menu_item_call label="Ajuda do [SECOND_LIFE]" name="Second Life Help"/> + <menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/> </menu> + <menu_item_check label="Exibir menu de depuração" name="Show Debug Menu"/> <menu label="Depurar" name="Debug"> - <menu label="Editar" name="Edit"> - <menu_item_call label="Desfazer" name="Undo"/> - <menu_item_call label="Repetir" name="Redo"/> - <menu_item_call label="Cortar" name="Cut"/> - <menu_item_call label="Copiar" name="Copy"/> - <menu_item_call label="Colar" name="Paste"/> - <menu_item_call label="Excluir" name="Delete"/> - <menu_item_call label="Replicar" name="Duplicate"/> - <menu_item_call label="Selecionar tudo" name="Select All"/> - <menu_item_call label="Desfazer seleção" name="Deselect"/> - </menu> <menu_item_call label="Mostrar configurações" name="Debug Settings"/> <menu_item_call label="Configurações da interface e cor" name="UI/Color Settings"/> <menu label="Testes de UI" name="UI Tests"/> @@ -26,5 +17,7 @@ <menu_item_call label="Mostrar TOS" name="TOS"/> <menu_item_call label="Mostrar mensagem crÃtica" name="Critical"/> <menu_item_call label="Teste de navegador web" name="Web Browser Test"/> + <menu_item_check label="Exibir seletor da grade" name="Show Grid Picker"/> + <menu_item_call label="Exibir painel de notificações" name="Show Notifications Console"/> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/pt/menu_participant_list.xml b/indra/newview/skins/default/xui/pt/menu_participant_list.xml index 849dec3108..c0db7752af 100644 --- a/indra/newview/skins/default/xui/pt/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/pt/menu_participant_list.xml @@ -8,6 +8,7 @@ <menu_item_call label="Ligar" name="Call"/> <menu_item_call label="Compartilhar" name="Share"/> <menu_item_call label="Pagar" name="Pay"/> + <menu_item_check label="Ver Ãcones de pessoas" name="View Icons"/> <menu_item_check label="Bloquear voz" name="Block/Unblock"/> <menu_item_check label="Bloquear texto" name="MuteText"/> <context_menu label="Opções do moderador >" name="Moderator Options"> diff --git a/indra/newview/skins/default/xui/pt/menu_save_outfit.xml b/indra/newview/skins/default/xui/pt/menu_save_outfit.xml new file mode 100644 index 0000000000..a957708ae4 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/menu_save_outfit.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<toggleable_menu name="save_outfit_menu"> + <menu_item_call label="Salvar" name="save_outfit"/> + <menu_item_call label="Salvar como novo" name="save_as_new_outfit"/> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/pt/menu_script_chiclet.xml b/indra/newview/skins/default/xui/pt/menu_script_chiclet.xml new file mode 100644 index 0000000000..ccf3878e14 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/menu_script_chiclet.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="ScriptChiclet Menu"> + <menu_item_call label="Fechar" name="Close"/> +</menu> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 45f7ca1424..84ad056df6 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -31,6 +31,7 @@ <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Criar marco deste lugar" name="Create Landmark Here"/> <menu label="Perfil da região" name="Land"> + <menu_item_call label="Perfil da região" name="Place Profile"/> <menu_item_call label="Sobre terrenos" name="About Land"/> <menu_item_call label="Região/Propriedade" name="Region/Estate"/> </menu> @@ -46,8 +47,8 @@ <menu_item_check label="Coordenadas" name="Coordinates"/> <menu_item_check label="Propriedades do lote" name="Parcel Properties"/> </menu> - <menu_item_call label="Teletransportar para inÃcio" name="Teleport Home"/> - <menu_item_call label="Definir como casa" name="Set Home to Here"/> + <menu_item_call label="Teletransportar para meu inÃcio" name="Teleport Home"/> + <menu_item_call label="Definir como InÃcio" name="Set Home to Here"/> <menu label="Sol" name="Environment Settings"> <menu_item_call label="Amanhecer" name="Sunrise"/> <menu_item_call label="Meio-dia" name="Noon"/> @@ -66,17 +67,6 @@ <menu_item_call label="Ferramenta criar" name="Create"/> <menu_item_call label="Ferramenta de terrenos" name="Land"/> </menu> - <menu label="Editar" name="Edit"> - <menu_item_call label="Desfazer" name="Undo"/> - <menu_item_call label="Repetir" name="Redo"/> - <menu_item_call label="Cortar" name="Cut"/> - <menu_item_call label="Copiar" name="Copy"/> - <menu_item_call label="Colar" name="Paste"/> - <menu_item_call label="Excluir" name="Delete"/> - <menu_item_call label="Replicar" name="Duplicate"/> - <menu_item_call label="Selecionar tudo" name="Select All"/> - <menu_item_call label="Desfazer seleção" name="Deselect"/> - </menu> <menu_item_call label="Link" name="Link"/> <menu_item_call label="Desconectar links" name="Unlink"/> <menu_item_check label="Edit Linked Parts" name="Edit Linked Parts"/> @@ -121,8 +111,10 @@ <menu_item_call label="[SECOND_LIFE] Ajuda" name="Second Life Help"/> <menu_item_call label="Denunciar abuso" name="Report Abuse"/> <menu_item_call label="Relatar bug" name="Report Bug"/> + <menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avançado" name="Advanced"> + <menu_item_check label="Exibir menu avançado" name="Show Advanced Menu"/> <menu_item_call label="Parar minha animação" name="Stop Animating My Avatar"/> <menu_item_call label="Recarregar texturas" name="Rebake Texture"/> <menu_item_call label="Interface tamanho padrão" name="Set UI Size to Default"/> @@ -144,7 +136,6 @@ <menu_item_check label="Realçar transparentes" name="Highlight Transparent"/> <menu_item_check label="Mostrar anexos HUD" name="Show HUD Attachments"/> <menu_item_check label="Mostrar retÃculo na vista subjetiva" name="ShowCrosshairs"/> - <menu_item_check label="Mostrar dicas de terreno" name="Land Tips"/> </menu> <menu label="Tipos de renderização" name="Rendering Types"> <menu_item_check label="Simples" name="Simple"/> @@ -306,7 +297,7 @@ <menu_item_call label="Force Owner To Me" name="Force Owner To Me"/> <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> <menu_item_call label="Excluir" name="Delete"/> - <menu_item_call label="Lock" name="Lock"/> + <menu_item_call label="Bloquear" name="Lock"/> </menu> <menu label="Lote" name="Parcel"> <menu_item_call label="Force Owner To Me" name="Owner To Me"/> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 5f91ff09e5..462dcf2b21 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -199,7 +199,7 @@ Convite outros membros dentro de 48 horas. Por favor, selecione um indivÃduo para realizar a venda se o valor for 0 L$. </notification> <notification name="ConfirmLandSaleChange"> - [LAND_SIZE] m² selecionados de terra estão sendo configurados para venda. + [LAND_SIZE] m² selecionados de terreno estão sendo configurados para venda. Seu preço de venda será L$[SALE_PRICE] e está autorizado para venda para [NAME]. Gostaria de continuar a fazer essa alteração? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Continuar"/> </notification> @@ -211,24 +211,24 @@ O preço será L$[SALE_PRICE] e [NAME] pode comprar o terreno. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="ReturnObjectsDeededToGroup"> - Você tem certeza de que quer retornar todos os objetos compartilhados com o grupo '[NAME]' neste lote de terra, para o inventário do seu antigo Proprietário? + Tem certeza de que quer devolver todos os objetos compartilhados com o grupo '[NAME]' neste lote, para o inventário do seu antigo Proprietário? *AVISO* Isso irá deletar os objetos não transferÃveis doados ao grupo! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsOwnedByUser"> - Você tem certeza de que deseja retornar todos os objetos do residente '[NAME]' neste lote para o inventário dele? + Você tem certeza de que deseja devolver todos os objetos do residente '[NAME]' neste lote para o inventário dele? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsOwnedBySelf"> Você tem certeza de que deseja retornar todos os objetos de sua propriedade neste lote para seu inventário? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsNotOwnedBySelf"> Você tem certeza de que deseja retornar todos os objetos que NÃO são seus para o inventário de seus proprietários? @@ -237,7 +237,7 @@ Objetos transferÃveis doados ao grupo retornarão para seu proprietários. *AVISO* Isso fará com que os objetos não-transferÃveis sejam deletados! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnObjectsNotOwnedByUser"> Você tem certeza de que deseja retornar todos os objetos deste lote NÃO pertencentes a [NAME] para o inventário do proprietário? @@ -245,11 +245,11 @@ Objetos: [N] *AVISO* Esta ação irá apagar os objetos não transferÃveis doados ao grupo! Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="ReturnAllTopObjects"> Você tem certeza de que deseja enviar todos os objetos listados de volta aos inventários de seus proprietários? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="DisableAllTopObjects"> Você tem certeza que deseja desativar todos os objetos desta região? @@ -259,10 +259,10 @@ Objetos: [N] Retornar os objetos deste lote que NÃO são compartilhados com o grupo [NAME] de volta para seus proprietários? Objetos: [N] - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Retornar"/> + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Devolver"/> </notification> <notification name="UnableToDisableOutsideScripts"> - Não é possÃvel desabilitar scripts externos. + Não é possÃvel desativar scripts externos. Toda esta região possui dano habilitado. Scripts devem ser permitidos para fazer as armas funcionarem. </notification> @@ -301,7 +301,7 @@ Para colocar a mÃdia em só uma face, selecione Selecionar face e clique na fac Você deve concordar com os Termos de Serviço para continuar a entrar no [SECOND_LIFE]. </notification> <notification name="CouldNotPutOnOutfit"> - Não foi possÃvel vestir o conjunto. A pasta do conjunto não contém roupas, partes do corpo ou acessórios. + Não foi possÃvel vestir o look. A pasta do look não contém roupas, partes do corpo ou acessórios. </notification> <notification name="CannotWearTrash"> Não é possÃvel usar roupas ou partes do corpo que estão no lixo. @@ -311,17 +311,17 @@ Para colocar a mÃdia em só uma face, selecione Selecionar face e clique na fac Ele ultrapassa o limite de anexos, de [MAX_ATTACHMENTS] objetos. Remova um objeto para poder anexar outro. </notification> <notification name="CannotWearInfoNotComplete"> - Você não pode vestir este item porque ele ainda não carregou. Por favor, tente novamente em um minuto. + Você não pode vestir este item porque ele ainda não carregou. Tente novamente em um minuto. </notification> <notification name="MustHaveAccountToLogIn"> Oops! Alguma coisa foi deixada em branco. Você precisa entrar com ambos os Nome e Sobrenome do seu avatar. -Você precisa de uma conta para entrar no [SECOND_LIFE]. Você gostaria de criar uma conta agora? +Você precisa de uma conta para entrar no [SECOND_LIFE]. Você gostaria de abrir uma conta agora? <url name="url"> https://join.secondlife.com/index.php?lang=pt-BR </url> - <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Criar uma nova conta"/> + <usetemplate name="okcancelbuttons" notext="Tentar novamente" yestext="Abrir conta"/> </notification> <notification name="AddClassified"> Os anúncios serão publicados na seção 'Classificados' das buscas e em [http://secondlife.com/community/classifieds secondlife.com] durante uma semana. @@ -349,8 +349,8 @@ Tem certeza de que quer prosseguir? <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="DeleteAvatarPick"> - Apagar pegar [PICK]? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Delete"/> + Excluir destaque <nolink>[PICK]</nolink>? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Apagar"/> </notification> <notification name="PromptGoToEventsPage"> Ir até a página web de enventos [SECOND_LIFE] ? @@ -360,10 +360,10 @@ Tem certeza de que quer prosseguir? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ir à página"/> </notification> <notification name="SelectProposalToView"> - Por favor, selecione uma proposta para visualizar. + Selecione uma proposta para visualizar. </notification> <notification name="SelectHistoryItemToView"> - Por favor, selecione um item do histórico para exibÃ-lo. + Selecione um item do histórico para exibi-lo. </notification> <notification name="CacheWillClear"> O cache será limpo quando o [APP_NAME] for iniciado. @@ -406,7 +406,7 @@ O objeto pode estar fora de alcance ou foi deletado. O objeto pode estar fora de alcance ou foi deletado. </notification> <notification name="SaveNotecardFailReason"> - Houve um problema em salvar uma nota devido a seguinte razão: [REASON]. Por favor, tente salvar a nota novamente mais tarde. + Houve um problema em salvar uma nota devido a seguinte razão: [REASON]. Tente salvar a nota novamente mais tarde. </notification> <notification name="ScriptCannotUndo"> Não foi possÃvel desfazer todas as mudanças na sua versão de script. @@ -415,7 +415,7 @@ Gostaria de carregar a última versão salva? <usetemplate name="okcancelbuttons" notext="Não" yestext="Sim"/> </notification> <notification name="SaveScriptFailReason"> - Houve um problema em salvar um script devido à seguinte razão: [REASON]. Por favor, tente salvar novamente o script mais tarde. + Houve um problema em salvar um script devido à seguinte razão: [REASON]. Tente salvar novamente o script mais tarde. </notification> <notification name="SaveScriptFailObjectNotFound"> Não foi possÃvel salvar o script pois o objeto em que ele está não pôde ser encontrado. @@ -426,7 +426,7 @@ O objeto pode estar fora de alcance ou ter sido deletado. </notification> <notification name="StartRegionEmpty"> Oops, você ainda não definiu sua região de partida. -Digite o nome da região na caixa 'Ponto de partida' ou selecione 'Última localização' ou 'Minha casa' como ponto de partida. +Digite o nome da região na caixa 'Ponto de partida' ou selecione 'Última localização' ou 'Meu inÃcio' como ponto de partida. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="CouldNotStartStopScript"> @@ -500,15 +500,15 @@ Ele ou ela vai ficar temporariamente incapaz de se mover, usar o bate-papo ou in <usetemplate canceltext="Cancelar" name="yesnocancelbuttons" notext="Descongelar" yestext="Congelar"/> </notification> <notification name="EjectAvatarFullname"> - Ejetar [AVATAR_NAME] da sua terra? + Ejetar [AVATAR_NAME] do seu terreno? <usetemplate canceltext="Cancelar" name="yesnocancelbuttons" notext="Ejetar e Banir" yestext="Ejetar"/> </notification> <notification name="EjectAvatarNoBan"> - Ejetar este avatar da sua terra? + Ejetar este avatar do seu terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ejetar"/> </notification> <notification name="EjectAvatarFullnameNoBan"> - Ejetar [AVATAR_NAME] da sua terra? + Ejetar [AVATAR_NAME] do seu terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ejetar"/> </notification> <notification name="EjectAvatarFromGroup"> @@ -519,7 +519,7 @@ Ele ou ela vai ficar temporariamente incapaz de se mover, usar o bate-papo ou in </notification> <notification name="AcquireErrorObjectSpan"> Erro de aquisição: Objetos criados em mais de uma região. -Por favor, mova todos os objetos a serem adquiridos para uma mesma região. +Mova todos os objetos a serem adquiridos para uma mesma região. </notification> <notification name="PromptGoToCurrencyPage"> [EXTRA] @@ -766,29 +766,29 @@ Nenhum grupo selecionado. A região do terreno não pôde ser localizada. </notification> <notification name="CannotDeedLandMultipleSelected"> - Impossibilitado de passar a propriedade da terra: -Selecionados vários lotes. + Não é possÃvel doar o terreno: +Vários lotes foram selecionados. Tente selecionar um único lote. </notification> <notification name="CannotDeedLandWaitingForServer"> - Impossibilitado de passar a propriedade da terra: -Esperando pelo servidor informar de quem é a propriedade. + Não é possÃvel doar o terreno: +Esperando o servidor informar de quem é a propriedade. Por favor, tente novamente. </notification> <notification name="CannotDeedLandNoTransfer"> - Não é possÃvel transferir posse do terreno: -A região [REGION] não permite transferência do terreno. + Não é possÃvel doar o terreno: +A região [REGION] não permite transferências de terreno. </notification> <notification name="CannotReleaseLandWatingForServer"> - Impossibilitado de abandonar a terra: + Não é possÃvel abandonar o terreno: Esperando o servidor atualizar as informações do lote. Tente novamente em alguns segundos. </notification> <notification name="CannotReleaseLandSelected"> - Impossibilitado de abandonar a terra: + Não é possÃvel abandonar o terreno: Você não é dono de todos os lotes selecionados. Por favor, selecione um único lote. @@ -807,25 +807,25 @@ A região do terreno não pôde ser localizada. A região [REGION] não permite transferência de terreno. </notification> <notification name="CannotReleaseLandPartialSelection"> - Impossibilitado de abandonar a terra: -Você deve selecionar um lote inteiro para liberá-lo. + Não é possÃvel abandonar o terreno: +Selecione um lote inteiro e abra mão dele. Selecione um lote inteiro ou primeiro divida seu lote. </notification> <notification name="ReleaseLandWarning"> - Você está para liberar [AREA] m² de terra. -Liberando este terreno, o liberará de suas posses, mas não lhe concederá quaisquer L$. + Você está prestes a abrir mão de [AREA] m². +Ao abrir mão deste terreno, ele deixa de ser uma propriedade. Note que você não receberá nenhum L$. -Liberar esta terra? +Abrir mão deste terreno? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Renunciar"/> </notification> <notification name="CannotDivideLandNothingSelected"> - Impossibilitado de dividir a terra: + Não é possÃvel dividir o terreno: -Nenhum lote selecionado. +Nenhum lote foi selecionado. </notification> <notification name="CannotDivideLandPartialSelection"> - Impossibilitado de dividir a terra: + Não é possÃvel dividir o terreno: Você selecionou um lote inteiro. Tente selecionar uma parte do lote. @@ -841,34 +841,34 @@ Quer dividir o terreno? A região do terreno não pôde ser localizada. </notification> <notification name="CannotJoinLandNoRegion"> - Houve um problema ao processar a junção dos terrenos: + Houve um problema ao processar a união dos terrenos: A região do terreno não pôde ser localizada. </notification> <notification name="CannotJoinLandNothingSelected"> - Não é possÃvel unir terreno: + Não é possÃvel unir os terrenos: Nenhum lote selecionado. </notification> <notification name="CannotJoinLandEntireParcelSelected"> - Impossibilitado de unir a terra: + Não é possÃvel unir os terrenos: Você selecionou apenas um lote. Selecione a terra através de ambos os lotes. </notification> <notification name="CannotJoinLandSelection"> - Impossibilitado de unir a terra: + Não é possÃvel unir os terrenos: Você deve selecionar mais de um lote. -Selecione a terra através de ambos os lotes. +Selecione terrenos localizados em dois lotes. </notification> <notification name="JoinLandWarning"> - Unir esta terra vai criar um grande lote que envolve todos os lotes que intersectam o retângulo selecionado. + Unir os terrenos vai criar um grande lote, formado por todos os lotes que intersectam o retângulo selecionado. Você vai ter que redefinir nome e as opções do novo lote. -Unir a terra? +Unir os terrenos? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Unir"/> </notification> <notification name="ConfirmNotecardSave"> - Esta nota precisa ser salva antes do item ser copiado ou visualizado. Salvar nota? + Esta anotação precisa ser salva antes de o item ser copiado ou visualizado. Salvar anotação? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Salvar"/> </notification> <notification name="ConfirmItemCopy"> @@ -918,6 +918,16 @@ Oferecer amizade para [NAME]? <button name="Cancel" text="Cancelar"/> </form> </notification> + <notification label="Salvar este look" name="SaveOutfitAs"> + Veja o meu novo visual: + <form name="form"> + <input name="message"> + [DESC] (novo) + </input> + <button name="Offer" text="OK"/> + <button name="Cancel" text="Cancelar"/> + </form> + </notification> <notification name="RemoveFromFriends"> Você quer remover [FIRST_NAME] [LAST_NAME] da sua lista de amigos? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Remover"/> @@ -1017,24 +1027,23 @@ Tem certeza de que deseja pegar estes itens? <usetemplate name="okcancelbuttons" notext="Não" yestext="Sim"/> </notification> <notification name="CantBuyLandAcrossMultipleRegions"> - Não foi possÃvel comprar terreno, pois a seleção abrange várias regiões. + Não foi possÃvel comprar o terreno, pois a seleção abrange várias regiões. Por favor, selecione uma área menor e tente novamente. </notification> <notification name="DeedLandToGroup"> - Na transferência de propriedade deste lote, o grupo deverá ter e manter créditos suficientes de uso da terra. -O preço de aquisição dos terrenos não é restituÃdo ao o proprietário. Se uma parcela transferida é vendida, o preço de venda é dividido igualmente entre os membros do grupo. + No ato da doação deste lote, o grupo deverá ter e manter créditos suficientes para ter o terreno. +O preço de aquisição dos terrenos não é restituÃdo ao proprietário. Se uma parcela doada for vendida, o preço de venda é dividido igualmente entre os membros do grupo. -Transferir propriedade de [AREA] m² de terra ao grupo '[GROUP_NAME]'? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Acionar"/> +Doar [AREA] m² ao grupo '[GROUP_NAME]'? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="DeedLandToGroupWithContribution"> - Na transferência de propriedade deste lote, o grupo deverá ter e manter créditos suficientes de uso da terra. -A Transferência incluirá uma contribuição de terra simultanea para o grupo de '[FIRST_NAME] [LAST_NAME]'. -O preço da compra não será restituÃdo ao proprietário. Se um lote for vendido, o preço da venda será dividido igualmente entre os membros do grupo. + No ato da doação deste lote, o grupo deverá ter e manter créditos suficientes para ter o terreno. A doação inclui uma contribuição simultânea para o grupo de '[FIRST_NAME] [LAST_NAME]'. +O preço de aquisição dos terrenos não é restituÃdo ao proprietário. Se uma parcela doada for vendida, o preço de venda é dividido igualmente entre os membros do grupo. -Transferir propriedade destes [AREA] m² de terreno para o grupo '[GROUP_NAME]'? - <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Acionar"/> +Doar [AREA] m² para o grupo '[GROUP_NAME]'? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="DisplaySetToSafe"> Configurações de display foram ajustadas para nÃveis de segurança porque você especificou -- opção de segurança. @@ -1057,7 +1066,7 @@ Você chegou a uma região próxima. <notification name="AvatarMovedHome"> Esse destino não está disponÃvel no momento. Você chegou a uma região próxima. -Pense em usar outra região como casa. +Pense em usar outra região como seu inÃcio. </notification> <notification name="ClothingLoading"> As suas roupas estão sendo transferidas. @@ -1117,7 +1126,7 @@ Isso é realmente útil apenas para depuração. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="KickUsersFromRegion"> - Teletransportar para casa todos os residentes nesta região? + Teletransportar para o inÃcio todos os residentes nesta região? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="EstateObjectReturn"> @@ -1398,6 +1407,10 @@ O bate-papo e MIs não serão exibidos. MIs enviadas para você receberão sua Teletransportar para [CLASSIFIED]? <usetemplate ignoretext="Confirmar se eu quero ser teletransportado lugar do anúncio" name="okcancelignore" notext="Cancelar" yestext="Teletransportar"/> </notification> + <notification name="TeleportToHistoryEntry"> + Teletransportar para [HISTORY_ENTRY]? + <usetemplate ignoretext="Confirmar se eu quero ser teletransportado para marcos" name="okcancelignore" notext="Cancelar" yestext="Teletransportar"/> + </notification> <notification label="Mensagem para todos na sua Propriedade" name="MessageEstate"> Digite um breve anúncio que será enviado para todos que estejam atualmente na sua propriedade. <form name="form"> @@ -1489,6 +1502,9 @@ Clique em 'Mudar preferência' para aumentar o nÃvel de maturidade e <ignore name="ignore" text="Minha preferência de maturidade impede que eu vá a uma região"/> </form> </notification> + <notification name="PreferredMaturityChanged"> + Sua opção de nÃvel de maturidade é [RATING]. + </notification> <notification name="LandClaimAccessBlocked"> Você não pode reclamar esta terra devido à sua Classificação de maturidade. Isto pode ser o resultado de falta de informação na validação de sua idade. @@ -1904,6 +1920,9 @@ Inclua um link para facilitar o acesso para visitantes. Teste o link na barra de <notification name="SystemMessageTip"> [MESSAGE] </notification> + <notification name="IMSystemMessageTip"> + [MESSAGE] + </notification> <notification name="Cancelled"> Cancelado </notification> @@ -1932,6 +1951,11 @@ Inclua um link para facilitar o acesso para visitantes. Teste o link na barra de Fazendo o upload das fotos do site da web e do mundo... (Leva cerca de 5 minutos) </notification> + <notification name="UploadConfirmation"> + O upload custa L$ [AMOUNT]. +Deseja continuar? + <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Upload"/> + </notification> <notification name="UploadPayment"> Você paga L$[AMOUNT] para fazer o upload. </notification> @@ -2125,7 +2149,7 @@ Objetos não transferÃveis dados ao grupo foram deletados. </notification> <notification name="NotSafe"> A opção 'danos' desta região está ativada. -Você pode se dar mal aqui. Se você morre, você será teletransportado de volta para casa. +Você pode se dar mal aqui. Se você morrer, você será teletransportado de volta para seu inÃcio. </notification> <notification name="NoFly"> Esta área desativou a opção de voar. @@ -2270,9 +2294,9 @@ Por favor, tente novamente em alguns instantes. </form> </notification> <notification name="TeleportOffered"> - [NAME] quer te teletransportar para a região deles: + [NAME_SLURL] quer teletransportar você para a região deles: -[MESSAGE] +[MESSAGE] - [MATURITY_STR] <icon>[MATURITY_ICON]</icon> <form name="form"> <button name="Teleport" text="Teletransporte"/> <button name="Cancel" text="Cancelar"/> @@ -2290,11 +2314,11 @@ Por favor, tente novamente em alguns instantes. </form> </notification> <notification name="OfferFriendship"> - [NAME] está lhe oferecendo sua amizade + [NAME_SLURL] quer a sua amizade. [MESSAGE] -(Por definição vocês serão capazes de ver um ao outro online) +Cada um pode ver o status do outro (definição padrão). <form name="form"> <button name="Accept" text="Aceitar"/> <button name="Decline" text="Recusar"/> @@ -2357,6 +2381,9 @@ Do objeto: [OBJECTNAME], dono: [NAME]? <notification name="FailedToFindWearable"> Falhou ao procurar [TYPE] nomeado [DESC] no banco de dados. </notification> + <notification name="ShareToWebFailed"> + Falha de upload da imagem na web. + </notification> <notification name="InvalidWearable"> O item que você está tentando usar tem um recurso que seu Visualizador não consegue ler. Atualize o [APP_NAME] para poder vestir esse item. </notification> @@ -2553,6 +2580,12 @@ Para sua segurança, os SLurls serão bloqueados por alguns instantes. O botão selecionado não pode ser exibido no momento. O botão será exibido quando houver espaço suficente. </notification> + <notification name="ShareNotification"> + Arraste itens do inventário para uma pessoa no seletor de residentes + </notification> + <notification name="AvatarRezNotification"> + O avatar de '[NAME]' renderizou em [TIME] s. + </notification> <global name="UnsupportedCPU"> - A velocidade da sua CPU não suporta os requisitos mÃnimos exigidos. </global> @@ -2574,7 +2607,7 @@ Se você continuar a receber esta mensagem, consulte o [SUPPORT_SITE]. - A memória do seu sistema não suporta os requisitos mÃnimos exigidos. </global> <global name="You can only set your 'Home Location' on your land or at a mainland Infohub."> - Se você tem um terreno, seu terreno pode ser sua casa. + Se você tem um terreno, seu terreno pode ser seu inÃcio. Outra opção é procurar por lugares com a tag 'Infohub' no mapa. </global> </notifications> diff --git a/indra/newview/skins/default/xui/pt/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/pt/outfit_accordion_tab.xml new file mode 100644 index 0000000000..b1ffa0d2e5 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/outfit_accordion_tab.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder--> +<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtume--> +<accordion_tab name="Mockup Tab" title="Guia Protótipo"/> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_eyes.xml b/indra/newview/skins/default/xui/pt/panel_edit_eyes.xml index 2c73e67c4a..f21656d526 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_eyes.xml @@ -3,7 +3,9 @@ <panel name="avatar_eye_color_panel"> <texture_picker label="Ãris" name="Iris" tool_tip="Selecionar imagem"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="eyes_main_tab" title="Olhos"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="eyes_main_tab" title="Olhos"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml b/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml index 6b4141e4a7..a94716e659 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="gloves_main_tab" title="Luvas"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="gloves_main_tab" title="Luvas"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_hair.xml b/indra/newview/skins/default/xui/pt/panel_edit_hair.xml index b49f5850aa..13f1f892f9 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_hair.xml @@ -3,10 +3,12 @@ <panel name="avatar_hair_color_panel"> <texture_picker label="Texture" name="Texture" tool_tip="Selecionar imagem"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="hair_color_tab" title="Cor"/> - <accordion_tab name="hair_style_tab" title="Estilo"/> - <accordion_tab name="hair_eyebrows_tab" title="Sombrancelhas"/> - <accordion_tab name="hair_facial_tab" title="Faciais"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="hair_color_tab" title="Cor"/> + <accordion_tab name="hair_style_tab" title="Estilo"/> + <accordion_tab name="hair_eyebrows_tab" title="Sombrancelhas"/> + <accordion_tab name="hair_facial_tab" title="Faciais"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml b/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml index dcccf76c26..f555bd9ac7 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml @@ -5,7 +5,9 @@ <texture_picker label="Tecido de baixo" name="Lower Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="jacket_main_tab" title="Jaqueta"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="jacket_main_tab" title="Jaqueta"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_pants.xml b/indra/newview/skins/default/xui/pt/panel_edit_pants.xml index 8cfa6933eb..67c300cc8d 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_pants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="pants_main_tab" title="Calças"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="pants_main_tab" title="Calças"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shape.xml b/indra/newview/skins/default/xui/pt/panel_edit_shape.xml index 6a03c2e2ff..504486c3bb 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_shape.xml @@ -9,15 +9,17 @@ <radio_item label="Masculino" name="radio2"/> </radio_group> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shape_body_tab" title="Corpo"/> - <accordion_tab name="shape_head_tab" title="Cabeça"/> - <accordion_tab name="shape_eyes_tab" title="Olhos"/> - <accordion_tab name="shape_ears_tab" title="Orelhas"/> - <accordion_tab name="shape_nose_tab" title="Nariz"/> - <accordion_tab name="shape_mouth_tab" title="Boca"/> - <accordion_tab name="shape_chin_tab" title="Queixo"/> - <accordion_tab name="shape_torso_tab" title="Tronco"/> - <accordion_tab name="shape_legs_tab" title="Pernas"/> - </accordion> + <panel label="Camisa" name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shape_body_tab" title="Corpo"/> + <accordion_tab name="shape_head_tab" title="Cabeça"/> + <accordion_tab name="shape_eyes_tab" title="Olhos"/> + <accordion_tab name="shape_ears_tab" title="Orelhas"/> + <accordion_tab name="shape_nose_tab" title="Nariz"/> + <accordion_tab name="shape_mouth_tab" title="Boca"/> + <accordion_tab name="shape_chin_tab" title="Queixo"/> + <accordion_tab name="shape_torso_tab" title="Tronco"/> + <accordion_tab name="shape_legs_tab" title="Pernas"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml index e9d4207e49..fb7c4c080c 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml @@ -4,7 +4,9 @@ <texture_picker label="tecido" name="Fabric" tool_tip="Clique para escolher uma foto"/> <color_swatch label="Cor/Matiz" name="Color/Tint" tool_tip="Clique para abrir o selecionador de cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shirt_main_tab" title="Camisa"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shirt_main_tab" title="Camisa"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml b/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml index 79cb641079..d1d30cf46e 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="shoes_main_tab" title="Sapatos"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="shoes_main_tab" title="Sapatos"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_skin.xml b/indra/newview/skins/default/xui/pt/panel_edit_skin.xml index e3caf9f6f7..f3d88123f2 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_skin.xml @@ -5,10 +5,12 @@ <texture_picker label="Tatuagem parte de cima" name="Upper Tattoos" tool_tip="Selecionar imagem"/> <texture_picker label="Tatuagem de baixo" name="Lower Tattoos" tool_tip="Selecionar imagem"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skin_color_tab" title="Cor da pele"/> - <accordion_tab name="skin_face_tab" title="Detalhe do rosto"/> - <accordion_tab name="skin_makeup_tab" title="Maquilagem"/> - <accordion_tab name="skin_body_tab" title="Detalhe do corpo"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skin_color_tab" title="Cor da pele"/> + <accordion_tab name="skin_face_tab" title="Detalhe do rosto"/> + <accordion_tab name="skin_makeup_tab" title="Maquilagem"/> + <accordion_tab name="skin_body_tab" title="Detalhe do corpo"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml index 00ec0691ea..b67cd53a83 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="skirt_main_tab" title="Saia"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="skirt_main_tab" title="Saia"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_socks.xml b/indra/newview/skins/default/xui/pt/panel_edit_socks.xml index 88abc74716..405568abeb 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_socks.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="socks_main_tab" title="Meias"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="socks_main_tab" title="Meias"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml b/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml index 10c34a1c0a..f858dc0495 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="underpants_main_tab" title="Roupa de baixo"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="underpants_main_tab" title="Roupa de baixo"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml index fb7b919365..9c18fc1d6c 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml @@ -4,7 +4,9 @@ <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/> <color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/> </panel> - <accordion name="wearable_accordion"> - <accordion_tab name="undershirt_main_tab" title="Camiseta"/> - </accordion> + <panel name="accordion_panel"> + <accordion name="wearable_accordion"> + <accordion_tab name="undershirt_main_tab" title="Camiseta"/> + </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml index b85d481941..a78539f274 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_wearable.xml @@ -94,6 +94,11 @@ <panel label="Camisa" name="wearable_type_panel"> <text name="description_text" value="Forma:"/> </panel> + <panel label="gear_buttom_panel" name="gear_buttom_panel"> + <button name="friends_viewsort_btn" tool_tip="Opções"/> + <button name="add_btn" tool_tip="TODO"/> + <button name="del_btn" tool_tip="TODO"/> + </panel> <panel name="button_panel"> <button label="Salvar como" name="save_as_button"/> <button label="Reverter" name="revert_button"/> diff --git a/indra/newview/skins/default/xui/pt/panel_group_general.xml b/indra/newview/skins/default/xui/pt/panel_group_general.xml index 0b65b4aade..6060f23bba 100644 --- a/indra/newview/skins/default/xui/pt/panel_group_general.xml +++ b/indra/newview/skins/default/xui/pt/panel_group_general.xml @@ -47,8 +47,11 @@ Para obter mais ajuda, passe o mouse sobre as opções. <check_box label="Taxa de inscrição" name="check_enrollment_fee" tool_tip="Controla a cobrança de uma taxa de associação ao grupo."/> <spinner label="L$" left_delta="120" name="spin_enrollment_fee" tool_tip="Se a opção 'Taxa de associação' estiver marcada, novos membros precisam pagar o valor definido para entrar no grupo." width="60"/> <combo_box name="group_mature_check" tool_tip="Define se os dados do seu grupo são conteúdo moderado." width="170"> - <combo_box.item label="Conteúdo PG" name="pg"/> + <combo_item name="select_mature"> + - Selecione Maduro - + </combo_item> <combo_box.item label="Conteúdo Mature" name="mature"/> + <combo_box.item label="Conteúdo PG" name="pg"/> </combo_box> <check_box initial_value="true" label="Mostre na busca" name="show_in_group_list" tool_tip="Incluir o grupo nos resultados de busca"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_im_control_panel.xml b/indra/newview/skins/default/xui/pt/panel_im_control_panel.xml index 2535340f4c..91b7d1b7cd 100644 --- a/indra/newview/skins/default/xui/pt/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/pt/panel_im_control_panel.xml @@ -20,7 +20,7 @@ <button label="Ligar" name="call_btn"/> </layout_panel> <layout_panel name="end_call_btn_panel"> - <button label="Desligar" name="end_call_btn"/> + <button label="Encerrar ligação" name="end_call_btn"/> </layout_panel> <layout_panel name="voice_ctrls_btn_panel"> <button label="Controles de voz" name="voice_ctrls_btn"/> diff --git a/indra/newview/skins/default/xui/pt/panel_inventory_item.xml b/indra/newview/skins/default/xui/pt/panel_inventory_item.xml new file mode 100644 index 0000000000..d18047fbcf --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_inventory_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="inventory_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml index 61cdbaef13..588b8deaa3 100644 --- a/indra/newview/skins/default/xui/pt/panel_login.xml +++ b/indra/newview/skins/default/xui/pt/panel_login.xml @@ -25,7 +25,7 @@ </text> <combo_box name="start_location_combo"> <combo_box.item label="Última posição" name="MyLastLocation"/> - <combo_box.item label="Minha casa" name="MyHome"/> + <combo_box.item label="Meu inÃcio" name="MyHome"/> </combo_box> <button label="conectar" name="connect_btn"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/pt/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/pt/panel_media_settings_permissions.xml index 009dd0d752..55226db274 100644 --- a/indra/newview/skins/default/xui/pt/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/pt/panel_media_settings_permissions.xml @@ -11,10 +11,19 @@ Mini </combo_item> </combo_box> + <text name="owner_label"> + Proprietário + </text> <check_box initial_value="false" label="Permitir navegação & interatividade" name="perms_owner_interact"/> <check_box initial_value="false" label="Exibir barra de controle" name="perms_owner_control"/> + <text name="group_label"> + Grupo: + </text> <check_box initial_value="false" label="Permitir navegação & interatividade" name="perms_group_interact"/> <check_box initial_value="false" label="Exibir barra de controle" name="perms_group_control"/> + <text name="anyone_label"> + Todos + </text> <check_box initial_value="false" label="Permitir navegação & interatividade" name="perms_anyone_interact"/> <check_box initial_value="false" label="Exibir barra de controle" name="perms_anyone_control"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml b/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml index 511c4426bb..01930bf3b3 100644 --- a/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_navigation_bar.xml @@ -3,7 +3,7 @@ <panel name="navigation_panel"> <pull_button name="back_btn" tool_tip="Voltar para região anterior"/> <pull_button name="forward_btn" tool_tip="Avançar uma região"/> - <button name="home_btn" tool_tip="Teletransportar para minha casa"/> + <button name="home_btn" tool_tip="Teletransportar para meu inÃcio"/> <location_input label="Onde" name="location_combo"/> <search_combo_box label="Busca" name="search_combo_box" tool_tip="Busca"> <combo_editor label="Buscar no [SECOND_LIFE]" name="search_combo_editor"/> diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_media.xml b/indra/newview/skins/default/xui/pt/panel_nearby_media.xml index 34db606d8b..8d08177eed 100644 --- a/indra/newview/skins/default/xui/pt/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/pt/panel_nearby_media.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> + <string name="media_item_count_format"> + (%ld itens de mÃdia) + </string> <string name="empty_item_text"> <vazio> </string> @@ -16,15 +19,10 @@ <button label="Parar tudo" name="all_nearby_media_disable_btn" tool_tip="Desligar mÃdias por perto"/> <button label="Executar tudo" name="all_nearby_media_enable_btn" tool_tip="Ligar mÃdias por perto"/> <button name="open_prefs_btn" tool_tip="Preferências de mÃdia"/> - <button label="Mais >>" label_selected="Menos <<" name="more_less_btn" tool_tip="Controles avançados"/> + <button label="Mais >>" label_selected="Menos <<" name="more_btn" tool_tip="Controles avançados"/> + <button label="Mais >>" label_selected="Menos <<" name="less_btn" tool_tip="Controles avançados"/> </panel> <panel name="nearby_media_panel"> - <text name="nearby_media"> - MÃdia por perto - </text> - <text name="show"> - Mostrar: - </text> <combo_box name="show_combo"> <combo_box.item label="Tudo" name="All"/> <combo_box.item label="Neste lote" name="WithinParcel"/> @@ -38,7 +36,7 @@ <scroll_list.columns label="Nome" name="media_name"/> <scroll_list.columns label="Depurar" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Parar mÃdia selecionada"/> diff --git a/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml b/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml new file mode 100644 index 0000000000..3dc8b4cc75 --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_outfit_edit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- Side tray Outfit Edit panel --> +<panel label="Editar look" name="outfit_edit"> + <string name="No Outfit" value="Nenhum"/> + <panel.string name="not_available"> + (N\A) + </panel.string> + <panel.string name="unknown"> + (Desconhecido) + </panel.string> + <string name="Filter.All" value="Tudo"/> + <string name="Filter.Clothes/Body" value="Roupas/Corpo"/> + <string name="Filter.Objects" value="Objects"/> + <button label="Editar" name="edit_wearable_btn"/> + <text name="title" value="Editar look"/> + <panel label="bottom_panel" name="header_panel"> + <panel label="bottom_panel" name="outfit_name_and_status"> + <text name="status" value="Editando..."/> + <text name="curr_outfit_name" value="[Look atual]"/> + </panel> + </panel> + <layout_stack name="im_panels"> + <layout_panel label="Painel de controle de MIs" name="outfit_wearables_panel"> + <scroll_list name="look_items_list"> + <scroll_list.columns label="Ver item" name="look_item"/> + <scroll_list.columns label="Ordenar itens" name="look_item_sort"/> + </scroll_list> + <panel label="bottom_panel" name="edit_panel"/> + </layout_panel> + <layout_panel name="add_wearables_panel"> + <filter_editor label="Filtro" name="look_item_filter"/> + <layout_stack name="filter_panels"> + <layout_panel label="Painel de controle de MIs" name="filter_button_panel"> + <text name="add_to_outfit_label" value="Adicionar ao look:"/> + <button label="O" name="filter_button"/> + </layout_panel> + </layout_stack> + <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> + <button label="F" name="folder_view_btn"/> + <button label="L" name="list_view_btn"/> + </panel> + </layout_panel> + </layout_stack> + <panel name="save_revert_button_bar"> + <button label="Salvar" name="save_btn"/> + <button label="Reverter" name="revert_btn"/> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/pt/panel_outfits_inventory.xml index 8d648a98fa..c8f33f85a9 100644 --- a/indra/newview/skins/default/xui/pt/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/pt/panel_outfits_inventory.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Coisas" name="Outfits"> <tab_container name="appearance_tabs"> - <inventory_panel label="MEUS LOOKS" name="outfitslist_tab"/> + <panel label="MEUS LOOKS" name="outfitslist_tab"/> <inventory_panel label="EM USO" name="cof_tab"/> </tab_container> <panel name="bottom_panel"> @@ -9,6 +9,6 @@ <dnd_button name="trash_btn" tool_tip="Remover item selecionado"/> <button label="Salvar este look" name="make_outfit_btn" tool_tip="Salvar aparência como um look"/> <button label="Vestir" name="wear_btn" tool_tip="Vestir look selecionado"/> - <button label="M" name="look_edit_btn"/> + <button label="Editar look" name="edit_current_outfit_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml index 1516a2bb65..17f5b6cbac 100644 --- a/indra/newview/skins/default/xui/pt/panel_people.xml +++ b/indra/newview/skins/default/xui/pt/panel_people.xml @@ -1,14 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray panel --> <panel label="Pessoas" name="people_panel"> - <string name="no_people" value="Nenhuma pessoa"/> - <string name="no_one_near" value="Ninguém por perto"/> + <string name="no_recent_people" value="Ninguém, recentemente. Em busca de alguém para conversar? Use a [secondlife:///app/search/people Busca] ou o [secondlife:///app/worldmap Mapa-Múndi]."/> + <string name="no_filtered_recent_people" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> + <string name="no_one_near" value="Ninguém por perto Em busca de alguém para conversar? Use a [secondlife:///app/search/people Busca] ou o [secondlife:///app/worldmap Mapa-Múndi]."/> + <string name="no_one_filtered_near" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> <string name="no_friends_online" value="Nenhum amigo online"/> <string name="no_friends" value="Nenhum amigo"/> + <string name="no_friends_msg"> + Encontre amigos fazendo uma [secondlife:///app/search/people busca de pessoas] ou clique em um residente para adicioná-lo. +Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa-Múndi]. + </string> + <string name="no_filtered_friends_msg"> + Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]. + </string> <string name="people_filter_label" value="Filtro de pessoas"/> <string name="groups_filter_label" value="Filtro de grupos"/> - <string name="no_filtered_groups_msg" value="[secondlife:///app/search/groups Tente encontrar o grupo na Busca]"/> - <string name="no_groups_msg" value="[secondlife:///app/search/groups Tente procurar grupos que lhe interessam]"/> + <string name="no_filtered_groups_msg" value="Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]."/> + <string name="no_groups_msg" value="À procura de grupos interessantes? Tente fazer uma [secondlife:///app/search/groups Busca]."/> <filter_editor label="Filtro" name="filter_input"/> <tab_container name="tabs"> <panel label="PROXIMIDADE" name="nearby_panel"> @@ -27,10 +36,6 @@ <button name="add_btn" tool_tip="Oferecer amizade para um residente"/> <button name="del_btn" tool_tip="Remover a pessoa selecionada da sua lista de amigos"/> </panel> - <text name="no_friends_msg"> - Para adicionar amigos, use a [secondlife:///app/search/people busca de pessoas] ou clique em um residente para adicioná-lo. -Para conhecer mais gente, use [secondlife:///app/worldmap o Mapa]. - </text> </panel> <panel label="MEUS GRUPOS" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> @@ -47,11 +52,11 @@ Para conhecer mais gente, use [secondlife:///app/worldmap o Mapa]. </panel> </tab_container> <panel name="button_bar"> - <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes"/> - <button label="MI" name="im_btn" tool_tip="Iniciar MI"/> - <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente"/> - <button label="Compartilhar" name="share_btn"/> - <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte"/> + <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes" width="50"/> + <button label="MI" name="im_btn" tool_tip="Iniciar MI" width="24"/> + <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente" width="61"/> + <button label="Compartilhar" name="share_btn" width="82"/> + <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte" width="86"/> <button label="Perfil do grupo" name="group_info_btn" tool_tip="Exibir informação de grupo"/> <button label="Bate-papo de grupo" name="chat_btn" tool_tip="Iniciar bate-papo"/> <button label="Ligar para o grupo" name="group_call_btn" tool_tip="Ligar para este grupo"/> diff --git a/indra/newview/skins/default/xui/pt/panel_places.xml b/indra/newview/skins/default/xui/pt/panel_places.xml index 9da4201c85..f7b6f54dea 100644 --- a/indra/newview/skins/default/xui/pt/panel_places.xml +++ b/indra/newview/skins/default/xui/pt/panel_places.xml @@ -11,5 +11,6 @@ <button label="Salvar" name="save_btn"/> <button label="Cancelar" name="cancel_btn"/> <button label="Fechar" name="close_btn"/> + <button label="Perfil" name="profile_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml index f30c218c81..6f2cae0476 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml @@ -11,7 +11,7 @@ <text name="heading2"> Posicionamento automático da: </text> - <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/> + <check_box label="Construção/Edição" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/> <check_box label="Aparência" name="appearance_camera_movement" tool_tip="Use o posicionamento automático da câmera quando em modo de edição"/> <check_box label="Mostre-me em visão de mouse" name="first_person_avatar_visible"/> <check_box label="Teclas de seta sempre me movem" name="arrow_keys_move_avatar_check"/> @@ -20,6 +20,9 @@ <check_box label="Balão de bate-papo" name="bubble_text_chat"/> <slider label="Opacidade" name="bubble_chat_opacity"/> <color_swatch name="background" tool_tip="Cor do balão de bate-papo"/> + <text name="UI Size:"> + Interface + </text> <check_box label="Mostrar erros de script" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Bate-papo local" name="0"/> @@ -29,4 +32,5 @@ <line_editor label="Botão apertar e falar" name="modifier_combo"/> <button label="Definir tecla" name="set_voice_hotkey_button"/> <button label="Botão do meio do mouse" name="set_voice_middlemouse_button" tool_tip="Redefinir como botão do meio do mouse"/> + <button label="Outros dispositivos" name="joystick_setup_button"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml index 5c69fa8de1..8a34897c9b 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml @@ -17,7 +17,7 @@ <combo_box.item label="日本語 (Japonês) - Beta" name="(Japanese)"/> </combo_box> <text name="language_textbox2"> - (Reinicie para mostrar o novo idioma) + (Reinicie para trocar de idioma) </text> <text name="maturity_desired_prompt"> Quero acessar conteúdo: diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml index 2119a06e55..f2cc9f644d 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml @@ -6,15 +6,15 @@ <text name="region_text"> desconhecido </text> - <check_box label="Desabilitar Scripts" name="disable_scripts_check" tool_tip="Desabilitar todos os scripts nesta região"/> + <check_box label="Desativar scripts" name="disable_scripts_check" tool_tip="Desativar todos os scripts nesta região"/> <button label="?" name="disable_scripts_help"/> - <check_box label="Desabilitar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/> + <check_box label="Desativar colisões" name="disable_collisions_check" tool_tip="Desabilitar colisões de não-avatares nessa região"/> <button label="?" name="disable_collisions_help"/> - <check_box label="Desabilitar fÃsica" name="disable_physics_check" tool_tip="Desabilitar toda a fÃsÃca nesta região"/> + <check_box label="Desativar fÃsica" name="disable_physics_check" tool_tip="Desativar toda a fÃsÃca nesta região"/> <button label="?" name="disable_physics_help"/> <button label="Aplicar" name="apply_btn"/> <text name="objret_text_lbl" width="130"> - Retornar objeto + Devolver objeto </text> <text name="resident_text_lbl"> Residente: @@ -27,14 +27,14 @@ Opções: </text> <check_box label="Com scripts" name="return_scripts" tool_tip="Só devolver objetos com scripts"/> - <check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Retornar apenas objetos que estejam na terra pertencente a alguém"/> - <check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Retornar objetos em todas as regiões que constituem esta propriedade"/> - <button label="Retornar" name="return_btn"/> - <button label="Pegar os principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos que experimentam as mais potenciais colisões" width="280"/> + <check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Devolver apenas objetos que estejam em terrenos de outra pessoa"/> + <check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Devolver objetos em todas as regiões que constituem esta propriedade"/> + <button label="Devolver" name="return_btn"/> + <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="280"/> <button label="?" left="297" name="top_colliders_help"/> - <button label="Pegar Principais Scripts..." name="top_scripts_btn" tool_tip="Lista de objetos gastando mais tempo rodando scripts" width="280"/> + <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="280"/> <button label="?" left="297" name="top_scripts_help"/> - <button label="Reiniciar a Região" name="restart_btn" tool_tip="Dar 2 minutos de contagem regressiva e reiniciar a região"/> + <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região"/> <button label="?" name="restart_help"/> - <button label="Atrasar o Reinicio" name="cancel_restart_btn" tool_tip="Atrasar o reinicio da região por uma hora"/> + <button label="Adiar reinÃcio" name="cancel_restart_btn" tool_tip="Adiar o reinÃcio da região por uma hora"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml b/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml index d2d5fb649c..534b2826af 100644 --- a/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_general_layout.xml @@ -18,12 +18,12 @@ <text name="region_type"> (Desconhecido) </text> - <check_box label="Bloquear terraplanagem" name="block_terraform_check"/> + <check_box label="Bloquear terraplanagens" name="block_terraform_check"/> <check_box label="Bloquear voos" name="block_fly_check"/> <check_box label="Permitir danos" name="allow_damage_check"/> <check_box label="Limitar empurrões" name="restrict_pushobject"/> <check_box label="Permitir revenda de terrenos" name="allow_land_resell_check"/> - <check_box label="Permitir junção e divisão de terrenos" name="allow_parcel_changes_check"/> + <check_box label="Permitir união e divisão de terrenos" name="allow_parcel_changes_check"/> <check_box label="Não mostrar nos resultados de pesquisa" name="block_parcel_search_check" tool_tip="Mostrar esta região e lotes nos resultados de pesquisa"/> <spinner label="Limite do agente" name="agent_limit_spin"/> <spinner label="Bônus do objeto" name="object_bonus_spin"/> diff --git a/indra/newview/skins/default/xui/pt/panel_side_tray.xml b/indra/newview/skins/default/xui/pt/panel_side_tray.xml index 09ac074b5a..1a424fb7f1 100644 --- a/indra/newview/skins/default/xui/pt/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/pt/panel_side_tray.xml @@ -3,27 +3,27 @@ partially on screen to hold tab buttons. --> <side_tray name="sidebar"> <sidetray_tab description="Exibir ou não barra lateral" name="sidebar_openclose" tab_title="Exibir ou não barra lateral"/> - <sidetray_tab description="Casa." name="sidebar_home" tab_title="Home"> - <panel label="casa" name="panel_home"/> + <sidetray_tab description="InÃcio" name="sidebar_home" tab_title="InÃcio"> + <panel label="InÃcio" name="panel_home"/> </sidetray_tab> - <sidetray_tab description="Editar seu perfil público e destaques ." name="sidebar_me" tab_title="My Profile"> + <sidetray_tab description="Edite seu perfil público e destaques." name="sidebar_me" tab_title="Meu perfil"> <panel_container name="panel_container"> <panel label="Eu" name="panel_me"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encontre seus amigos, contatos e pessoas nas proximidades." name="sidebar_people" tab_title="People"> + <sidetray_tab description="Encontre seus amigos, contatos e pessoas nas proximidades." name="sidebar_people" tab_title="Pessoas"> <panel_container name="panel_container"> <panel label="Perfil do grupo" name="panel_group_info_sidetray"/> <panel label="Residentes& Objetos bloqueados" name="panel_block_list_sidetray"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encontre lugares para ir e lugares que você ja visitou." label="Lugares" name="sidebar_places" tab_title="Places"> + <sidetray_tab description="Encontre lugares para ir e lugares que você ja visitou." label="Lugares" name="sidebar_places" tab_title="Lugares"> <panel label="Lugares" name="panel_places"/> </sidetray_tab> - <sidetray_tab description="Busca no seu inventário." name="sidebar_inventory" tab_title="My Inventory"> + <sidetray_tab description="Abra seu inventário." name="sidebar_inventory" tab_title="Meu inventário"> <panel label="Editar inventário" name="sidepanel_inventory"/> </sidetray_tab> - <sidetray_tab description="Muda sua aparência e visual atual." name="sidebar_appearance" tab_title="My Appearance"> + <sidetray_tab description="Muda sua aparência e seu visual atual." name="sidebar_appearance" tab_title="Minha aparência"> <panel label="Editar aparência" name="sidepanel_appearance"/> </sidetray_tab> </side_tray> diff --git a/indra/newview/skins/default/xui/pt/panel_world_map.xml b/indra/newview/skins/default/xui/pt/panel_world_map.xml index 584ef8a666..accab068fd 100644 --- a/indra/newview/skins/default/xui/pt/panel_world_map.xml +++ b/indra/newview/skins/default/xui/pt/panel_world_map.xml @@ -30,6 +30,12 @@ <panel.string name="world_map_northwest"> NO </panel.string> + <panel.string name="world_map_person"> + 1 pessoa + </panel.string> + <panel.string name="world_map_people"> + [NUMBER] pessoas + </panel.string> <text label="N" name="floater_map_north" text="N"> N </text> diff --git a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml index 75b737b8bd..f634236cd2 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_inventory.xml @@ -3,6 +3,7 @@ <panel label="" name="sidepanel__inventory_panel"> <panel name="button_panel"> <button label="Perfil" name="info_btn"/> + <button label="Compartilhar" name="share_btn"/> <button label="Vestir" name="wear_btn"/> <button label="Tocar" name="play_btn"/> <button label="Teletransportar" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 773aea5848..51b6581d42 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -249,6 +249,9 @@ <string name="BUTTON_CLOSE_WIN"> Fechar (Ctrl+W) </string> + <string name="BUTTON_CLOSE_CHROME"> + Fechar + </string> <string name="BUTTON_RESTORE"> Restaurar </string> @@ -288,6 +291,9 @@ <string name="GroupNameNone"> (nenhum) </string> + <string name="AvalineCaller"> + Interlocutor Avaline [ORDER] + </string> <string name="AssetErrorNone"> Nenhum erro </string> @@ -883,7 +889,7 @@ Pressione ESC para retornar para visão do mundo </string> <string name="InventoryNoMatchingItems"> - Nenhum item correspondente foi encontrado no inventário. Tente fazer uma [secondlife:///app/search/groups "Busca"]. + Não encontrou o que procura? Tente fazer uma [secondlife:///app/search/groups Busca]. </string> <string name="FavoritesNoMatchingItems"> Arraste um marco para adicioná-lo aos seus favoritos. @@ -1542,9 +1548,7 @@ <string name="RegionNoCovenantOtherOwner"> Não foi definido um contrato para essa Região. O terreno nesta região está sendo vendido pelo Proprietário, não pela Linden Lab. Favor contatar o Proprietário da região para detalhes de venda. </string> - <string name="covenant_last_modified"> - Última modificação: - </string> + <string name="covenant_last_modified" value="Última modificação:"/> <string name="none_text" value="(nenhum)"/> <string name="never_text" value="(nunca)"/> <string name="GroupOwned"> @@ -3220,6 +3224,15 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlComboBtnTooltip"> Histórico de localizações </string> + <string name="LocationCtrlAdultIconTooltip"> + Região Adulta + </string> + <string name="LocationCtrlModerateIconTooltip"> + Região Moderada + </string> + <string name="LocationCtrlGeneralIconTooltip"> + Região em geral + </string> <string name="UpdaterWindowTitle"> [APP_NAME] Atualização </string> @@ -3250,6 +3263,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="UpdaterFailStartTitle"> Falha ao iniciar o visualizador </string> + <string name="ItemsComingInTooFastFrom"> + [APP_NAME]: Entrada de itens rápida demais de [FROM_NAME], visualização automática suspensa por [TIME] segundos + </string> + <string name="ItemsComingInTooFast"> + [APP_NAME]: Entrada de itens rápida demais, visualização automática suspensa por [TIME] segundos + </string> <string name="IM_logging_string"> -- Log de mensagem instantânea habilitado -- </string> @@ -3277,6 +3296,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_moderator_label"> (Moderador) </string> + <string name="answered_call"> + Ligação atendida + </string> <string name="started_call"> Iniciou uma ligação de voz </string> @@ -3358,12 +3380,18 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] disseram alguma coisa </string> + <string name="session_initialization_timed_out_error"> + A inicialização da sessão expirou + </string> <string name="paid_you_ldollars"> [NAME] lhe pagou L$ [AMOUNT] </string> <string name="you_paid_ldollars"> You pagou L$[AMOUNT] por [REASON] a [NAME]. </string> + <string name="you_paid_ldollars_no_info"> + Você acaba de pagar L$[AMOUNT]. + </string> <string name="you_paid_ldollars_no_reason"> You pagou L$[AMOUNT] a [NAME]. </string> @@ -3474,4 +3502,13 @@ Denunciar abuso <string name="Contents"> Conteúdo </string> + <string name="AvatarBirthDateFormat"> + [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] + </string> + <string name="DefaultMimeType"> + nenhum/nehum + </string> + <string name="texture_load_dimensions_error"> + A imagem excede o limite [WIDTH]*[HEIGHT] + </string> </strings> diff --git a/indra/newview/skins/default/xui/pt/teleport_strings.xml b/indra/newview/skins/default/xui/pt/teleport_strings.xml index 92ffee0233..11ea0f4195 100644 --- a/indra/newview/skins/default/xui/pt/teleport_strings.xml +++ b/indra/newview/skins/default/xui/pt/teleport_strings.xml @@ -51,7 +51,7 @@ Se você continuar a receber esta mensagem, por favor consulte o [SUPPORT_SITE]. Transferindo para o destino. </message> <message name="sending_home"> - Enviando solicitação de localização da casa. + Enviando solicitação de localização de inÃcio. </message> <message name="sending_landmark"> Enviando solicitação de localização de landmark. diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index ef93586c6e..1c29feec5f 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -10,7 +10,10 @@ // Precompiled header #include "../llviewerprecompiledheaders.h" // Own header +#include "../llsecapi.h" +#include "../llviewernetwork.h" #include "../lllogininstance.h" + // STL headers // std headers // external library headers @@ -33,7 +36,12 @@ const std::string APPVIEWER_SERIALNUMBER("appviewer_serialno"); //----------------------------------------------------------------------------- static LLEventStream gTestPump("test_pump"); +#include "../llslurl.h" +#include "../llstartup.h" +LLSLURL LLStartUp::sStartSLURL; + #include "lllogin.h" + static std::string gLoginURI; static LLSD gLoginCreds; static bool gDisconnectCalled = false; @@ -54,17 +62,75 @@ void LLLogin::disconnect() gDisconnectCalled = true; } +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + + // legacy credential + result["passwd"] = "$1$testpasssd"; + result["first"] = "myfirst"; + result["last"] ="mylast"; + return result; +} +void LLCredential::identifierType(std::string &idType) +{ +} + +void LLCredential::authenticatorType(std::string &idType) +{ +} + //----------------------------------------------------------------------------- #include "../llviewernetwork.h" -unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; +LLGridManager::~LLGridManager() +{ +} + +void LLGridManager::addGrid(LLSD& grid_data) +{ +} +LLGridManager::LLGridManager() +{ +} -LLViewerLogin::LLViewerLogin() : mGridChoice(GRID_INFO_NONE) {} -LLViewerLogin::~LLViewerLogin() {} -void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const +void LLGridManager::getLoginURIs(std::vector<std::string>& uris) { uris.push_back(VIEWERLOGIN_URI); } -std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL; } + +void LLGridManager::addSystemGrid(const std::string& label, + const std::string& name, + const std::string& login, + const std::string& helper, + const std::string& login_page, + const std::string& login_id) +{ +} +std::map<std::string, std::string> LLGridManager::getKnownGrids(bool favorite_only) +{ + std::map<std::string, std::string> result; + return result; +} + +void LLGridManager::setGridChoice(const std::string& grid_name) +{ +} + +bool LLGridManager::isInProductionGrid() +{ + return false; +} + +void LLGridManager::saveFavorites() +{} +std::string LLGridManager::getSLURLBase(const std::string& grid_name) +{ + return "myslurl"; +} +std::string LLGridManager::getAppSLURLBase(const std::string& grid_name) +{ + return "myappslurl"; +} //----------------------------------------------------------------------------- #include "../llviewercontrol.h" @@ -86,10 +152,6 @@ BOOL LLControlGroup::declareString(const std::string& name, const std::string &i #include "lluicolortable.h" void LLUIColorTable::saveUserSettings(void)const {} -//----------------------------------------------------------------------------- -#include "../llurlsimstring.h" -LLURLSimString LLURLSimString::sInstance; -bool LLURLSimString::parse() { return true; } //----------------------------------------------------------------------------- #include "llnotifications.h" @@ -197,15 +259,29 @@ namespace tut gSavedSettings.declareString("NextLoginLocation", "", "", FALSE); gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE); - credentials["first"] = "testfirst"; - credentials["last"] = "testlast"; - credentials["passwd"] = "testpass"; + LLSD authenticator = LLSD::emptyMap(); + LLSD identifier = LLSD::emptyMap(); + identifier["type"] = "agent"; + identifier["first_name"] = "testfirst"; + identifier["last_name"] = "testlast"; + authenticator["passwd"] = "testpass"; + agentCredential = new LLCredential(); + agentCredential->setCredentialData(identifier, authenticator); + + authenticator = LLSD::emptyMap(); + identifier = LLSD::emptyMap(); + identifier["type"] = "account"; + identifier["username"] = "testuser"; + authenticator["secret"] = "testsecret"; + accountCredential = new LLCredential(); + accountCredential->setCredentialData(identifier, authenticator); logininstance->setNotificationsInterface(¬ifications); } LLLoginInstance* logininstance; - LLSD credentials; + LLPointer<LLCredential> agentCredential; + LLPointer<LLCredential> accountCredential; MockNotifications notifications; }; @@ -219,7 +295,7 @@ namespace tut set_test_name("Test Simple Success And Disconnect"); // Test default connect. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -260,7 +336,7 @@ namespace tut const std::string test_uri = "testing-uri"; // Test default connect. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); // connect should call LLLogin::connect to init gLoginURI and gLoginCreds. ensure_equals("Default connect uri", gLoginURI, "testing-uri"); @@ -282,7 +358,7 @@ namespace tut ensure("No TOS, failed auth", logininstance->authFailure()); // Start again. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); gTestPump.post(response); // Fail for tos again. gTOSReplyPump->post(true); // Accept tos, should reconnect w/ agree_to_tos. ensure_equals("Accepted agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), true); @@ -294,11 +370,11 @@ namespace tut gTestPump.post(response); ensure("TOS auth failure", logininstance->authFailure()); - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); ensure_equals("Reset to default for agree to tos", gLoginCreds["params"]["agree_to_tos"].asBoolean(), false); // Critical Message failure response. - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); response["data"]["reason"] = "critical"; // Change response to "critical message" gTestPump.post(response); @@ -312,7 +388,7 @@ namespace tut response["data"]["reason"] = "key"; // bad creds. gTestPump.post(response); ensure("TOS auth failure", logininstance->authFailure()); - logininstance->connect(test_uri, credentials); + logininstance->connect(test_uri, agentCredential); ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false); } @@ -323,7 +399,7 @@ namespace tut // Part 1 - Mandatory Update, with User accepts response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -349,7 +425,7 @@ namespace tut set_test_name("Test Mandatory Update User Decline"); // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -375,7 +451,7 @@ namespace tut // Part 3 - Mandatory Update, with bogus response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); @@ -401,7 +477,7 @@ namespace tut // Part 3 - Mandatory Update, with bogus response. // Test connect with update needed. - logininstance->connect(credentials); + logininstance->connect(agentCredential); ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp new file mode 100644 index 0000000000..caa1461987 --- /dev/null +++ b/indra/newview/tests/llsecapi_test.cpp @@ -0,0 +1,188 @@ +/** + * @file llsecapi_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the sec api functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden LregisterSecAPIab + * 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 "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../llsecapi.h" +#include "../../llxml/llcontrol.h" + + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: 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) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) +{ + return ""; +} + + +LLControlGroup gSavedSettings("test"); +class LLSecAPIBasicHandler : public LLSecAPIHandler +{ +protected: + LLPointer<LLCertificateChain> mCertChain; + LLPointer<LLCertificate> mCert; + LLPointer<LLCertificateStore> mCertStore; + LLSD mLLSD; + +public: + LLSecAPIBasicHandler() {} + + virtual ~LLSecAPIBasicHandler() {} + + // instantiate a certificate from a pem string + virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert) + { + return mCert; + } + + + // instiate a certificate from an openssl X509 structure + virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert) + { + return mCert; + } + + + // instantiate a chain from an X509_STORE_CTX + virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain) + { + return mCertChain; + } + + // instantiate a cert store given it's id. if a persisted version + // exists, it'll be loaded. If not, one will be created (but not + // persisted) + virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id) + { + return mCertStore; + } + + // persist data in a protected store + virtual void setProtectedData(const std::string& data_type, + const std::string& data_id, + const LLSD& data) {} + + // retrieve protected data + virtual LLSD getProtectedData(const std::string& data_type, + const std::string& data_id) + { + return mLLSD; + } + + virtual void deleteProtectedData(const std::string& data_type, + const std::string& data_id) + { + } + + virtual LLPointer<LLCredential> createCredential(const std::string& grid, + const LLSD& identifier, + const LLSD& authenticator) + { + LLPointer<LLCredential> cred = NULL; + return cred; + } + + virtual LLPointer<LLCredential> loadCredential(const std::string& grid) + { + LLPointer<LLCredential> cred = NULL; + return cred; + } + + virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {} + + virtual void deleteCredential(LLPointer<LLCredential> cred) {} +}; + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct secapiTest + { + + secapiTest() + { + } + ~secapiTest() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<secapiTest> secapiTestFactory; + typedef secapiTestFactory::object secapiTestObject; + tut::secapiTestFactory tut_test("llsecapi"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // registration + template<> template<> + void secapiTestObject::test<1>() + { + // retrieve an unknown handler + + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + LLPointer<LLSecAPIHandler> test1_handler = new LLSecAPIBasicHandler(); + registerSecHandler("sectest1", test1_handler); + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + LLPointer<LLSecAPIHandler> retrieved_test1_handler = getSecHandler("sectest1"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test1_handler == test1_handler); + + // insert a second handler + LLPointer<LLSecAPIHandler> test2_handler = new LLSecAPIBasicHandler(); + registerSecHandler("sectest2", test2_handler); + ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + retrieved_test1_handler = getSecHandler("sectest1"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test1_handler == test1_handler); + + LLPointer<LLSecAPIHandler> retrieved_test2_handler = getSecHandler("sectest2"); + ensure("Retrieved sectest1 handler should be the same", + retrieved_test2_handler == test2_handler); + + } +} diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp new file mode 100644 index 0000000000..fd680b24f0 --- /dev/null +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -0,0 +1,1051 @@ +/** + * @file llsechandler_basic_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the 'basic' sec handler functions + * + * $LicenseInfo:firstyear=2005&license=viewergpl$ + * + * Copyright (c) 2005-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 "../test/lltut.h" +#include "../llsecapi.h" +#include "../llsechandler_basic.h" +#include "../../llxml/llcontrol.h" +#include "../llviewernetwork.h" +#include "lluuid.h" +#include "llxorcipher.h" +#include "apr_base64.h" +#include <vector> +#include <ios> +#include <llsdserialize.h> +#include <openssl/pem.h> +#include <openssl/err.h> +#include <openssl/evp.h> +#include "llxorcipher.h" +#include <openssl/ossl_typ.h> +#include <openssl/x509.h> +#include <openssl/x509v3.h> +#include <openssl/pem.h> +#include <openssl/asn1.h> +#include <openssl/rand.h> +#include <openssl/err.h> + + +#define ensure_throws(str, exc_type, cert, func, ...) \ +try \ +{ \ +func(__VA_ARGS__); \ +fail("throws, " str); \ +} \ +catch(exc_type& except) \ +{ \ +ensure("Exception cert is incorrect for " str, except.getCert() == cert); \ +} + +extern bool _cert_hostname_wildcard_match(const std::string& hostname, const std::string& wildcard_string); + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +std::string gFirstName; +std::string gLastName; +LLControlGroup::LLControlGroup(const std::string& name) +: 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) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) +{ + + if (name == "FirstName") + return gFirstName; + else if (name == "LastName") + return gLastName; + return ""; +} + +LLSD LLCredential::getLoginParams() +{ + LLSD result = LLSD::emptyMap(); + + // legacy credential + result["passwd"] = "$1$testpasssd"; + result["first"] = "myfirst"; + result["last"] ="mylast"; + return result; +} + +void LLCredential::identifierType(std::string &idType) +{ +} + +void LLCredential::authenticatorType(std::string &idType) +{ +} + + +LLControlGroup gSavedSettings("test"); +unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {77,21,46,31,89,2}; + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct sechandler_basic_test + { + std::string mPemTestCert, mPemRootCert, mPemIntermediateCert, mPemChildCert, mSha1RSATestCert, mSha1RSATestCA; + std::string mDerFormat; + X509 *mX509TestCert, *mX509RootCert, *mX509IntermediateCert, *mX509ChildCert; + + sechandler_basic_test() + { + OpenSSL_add_all_algorithms(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); + ERR_load_crypto_strings(); + gFirstName = ""; + gLastName = ""; + LLFile::remove("test_password.dat"); + LLFile::remove("sechandler_settings.tmp"); + mPemTestCert = "-----BEGIN CERTIFICATE-----\n" + "MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIx\n" + "EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h\n" + "bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJy\n" + "YXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UEAxMoQXV0b3JpZGFkZSBDZXJ0aWZp\n" + "Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYTAeFw0wMTExMzAxMjU4MDBaFw0xMTExMzAy\n" + "MzU5MDBaMIG0MQswCQYDVQQGEwJCUjETMBEGA1UEChMKSUNQLUJyYXNpbDE9MDsG\n" + "A1UECxM0SW5zdGl0dXRvIE5hY2lvbmFsIGRlIFRlY25vbG9naWEgZGEgSW5mb3Jt\n" + "YWNhbyAtIElUSTERMA8GA1UEBxMIQnJhc2lsaWExCzAJBgNVBAgTAkRGMTEwLwYD\n" + "VQQDEyhBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgUmFpeiBCcmFzaWxlaXJhMIIB\n" + "IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwPMudwX/hvm+Uh2b/lQAcHVA\n" + "isamaLkWdkwP9/S/tOKIgRrL6Oy+ZIGlOUdd6uYtk9Ma/3pUpgcfNAj0vYm5gsyj\n" + "Qo9emsc+x6m4VWwk9iqMZSCK5EQkAq/Ut4n7KuLE1+gdftwdIgxfUsPt4CyNrY50\n" + "QV57KM2UT8x5rrmzEjr7TICGpSUAl2gVqe6xaii+bmYR1QrmWaBSAG59LrkrjrYt\n" + "bRhFboUDe1DK+6T8s5L6k8c8okpbHpa9veMztDVC9sPJ60MWXh6anVKo1UcLcbUR\n" + "yEeNvZneVRKAAU6ouwdjDvwlsaKydFKwed0ToQ47bmUKgcm+wV3eTRk36UOnTwID\n" + "AQABo4HSMIHPME4GA1UdIARHMEUwQwYFYEwBAQAwOjA4BggrBgEFBQcCARYsaHR0\n" + "cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0RQQ2FjcmFpei5wZGYwPQYDVR0f\n" + "BDYwNDAyoDCgLoYsaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0xDUmFj\n" + "cmFpei5jcmwwHQYDVR0OBBYEFIr68VeEERM1kEL6V0lUaQ2kxPA3MA8GA1UdEwEB\n" + "/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAZA5c1\n" + "U/hgIh6OcgLAfiJgFWpvmDZWqlV30/bHFpj8iBobJSm5uDpt7TirYh1Uxe3fQaGl\n" + "YjJe+9zd+izPRbBqXPVQA34EXcwk4qpWuf1hHriWfdrx8AcqSqr6CuQFwSr75Fos\n" + "SzlwDADa70mT7wZjAmQhnZx2xJ6wfWlT9VQfS//JYeIc7Fue2JNLd00UOSMMaiK/\n" + "t79enKNHEA2fupH3vEigf5Eh4bVAN5VohrTm6MY53x7XQZZr1ME7a55lFEnSeT0u\n" + "mlOAjR2mAbvSM5X5oSZNrmetdzyTj2flCM8CC7MLab0kkdngRIlUBGHF1/S5nmPb\n" + "K+9A46sd33oqK8n8\n" + "-----END CERTIFICATE-----\n"; + + mPemRootCert = "-----BEGIN CERTIFICATE-----\n" + "MIIB0TCCATqgAwIBAgIJANaTqrzEvHaRMA0GCSqGSIb3DQEBBAUAMBsxGTAXBgNV\n" + "BAMTEFJveGllcyB0ZXN0IHJvb3QwHhcNMDkwNDE1MjEwNzQ3WhcNMTAwNDE1MjEw\n" + "NzQ3WjAbMRkwFwYDVQQDExBSb3hpZXMgdGVzdCByb290MIGfMA0GCSqGSIb3DQEB\n" + "AQUAA4GNADCBiQKBgQCpo5nDW6RNz9IHUVZd7Tw2XAQiBniDF4xH0N1w7sUYTiFq\n" + "21mABsnOPJD3ra+MtOsXPHcaljm661JjTD8L40v5sfEbqDUPcOw76ClrPqnuAeyT\n" + "38qk8DHku/mT8YdprevGZdVcUXQg3vosVzOL93HOOHK+u61mEEoM9W5xoNVEdQID\n" + "AQABox0wGzAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQQF\n" + "AAOBgQAzn0aW/+zWPmcTbvxonyiYYUr9b4SOB/quhAkT8KT4ir1dcZAXRR59+kEn\n" + "HSTu1FAodV0gvESqyobftF5hZ1XMxdJqGu//xP+YCwlv244G/0pp7KLI8ihNO2+N\n" + "lPBUJgbo++ZkhiE1jotZi9Ay0Oedh3s/AfbMZPyfpJ23ll6+BA==\n" + "-----END CERTIFICATE-----\n"; + + + + mPemIntermediateCert = "-----BEGIN CERTIFICATE-----\n" + "MIIBzzCCATigAwIBAgIBATANBgkqhkiG9w0BAQQFADAbMRkwFwYDVQQDExBSb3hp\n" + "ZXMgdGVzdCByb290MB4XDTA5MDQxNTIxMzE1NloXDTEwMDQxNTIxMzE1NlowITEf\n" + "MB0GA1UEAxMWUm94aWVzIGludGVybWVkaWF0ZSBDQTCBnzANBgkqhkiG9w0BAQEF\n" + "AAOBjQAwgYkCgYEA15MM0W1R37rx/24Q2Qkb5bSiQZxTUcQAhJ2pA8mwUucXuCVt\n" + "6ayI2TuN32nkjmsCgUkiT/bdXWp0OJo7/MXRIFeUNMCRxrpeFnxuigYEqbIXAdN6\n" + "qu/vdG2X4PRv/v9Ijrju4cBEiKIldIgOurWEIfXEsVSFP2XmFQHesF04qDcCAwEA\n" + "AaMdMBswDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQAD\n" + "gYEAYljikYgak3W1jSo0vYthNHUy3lBVAKzDhpM96lY5OuXFslpCRX42zNL8X3kN\n" + "U/4IaJUVtZqx8WsUXl1eXHzBCaXCftapV4Ir6cENLIsXCdXs8paFYzN5nPJA5GYU\n" + "zWgkSEl1MEhNIc+bJW34vwi29EjrAShAhsIZ84Mt/lvD3Pc=\n" + "-----END CERTIFICATE-----\n"; + + mPemChildCert = "-----BEGIN CERTIFICATE-----\n" + "MIIB5DCCAU0CBEnm9eUwDQYJKoZIhvcNAQEEBQAwITEfMB0GA1UEAxMWUm94aWVz\n" + "IGludGVybWVkaWF0ZSBDQTAeFw0wOTA0MTYwMDAzNDlaFw0xMDA0MTYwMDAzNDla\n" + "MCAxHjAcBgNVBAMTFWVuaWFjNjMubGluZGVubGFiLmNvbTCBnzANBgkqhkiG9w0B\n" + "AQEFAAOBjQAwgYkCgYEAp9I5rofEzbjNht+9QejfnsIlEPqSxskoWKCG255TesWR\n" + "RTmw9wafHQQkJk/VIsaU4RMBYHkknGbHX2dGvMHmKZoWUPSQ/8FZz09o0Qx3TNUZ\n" + "l7KlGOD2d1c7ZxXDPqlLC6QW8DrE1/8zfwJ5cbYBXc8e7OKdSZeRrnwHyw4Q8r8C\n" + "AwEAAaMvMC0wEwYDVR0lBAwwCgYIKwYBBQUHAwEwCQYDVR0TBAIwADALBgNVHQ8E\n" + "BAMCBaAwDQYJKoZIhvcNAQEEBQADgYEAIG0M5tqYlXyMiGKPZfXy/R3M3ZZOapDk\n" + "W0dsXJYXAc35ftwtn0VYu9CNnZCcli17/d+AKhkK8a/oGPazqudjFF6WLJLTXaY9\n" + "NmhkJcOPADXkbyQPUPXzLe4YRrkEQeGhzMb4rKDQ1TKAcXfs0Y068pTpsixNSxja\n" + "NhAUUcve5Is=\n" + "-----END CERTIFICATE-----\n"; + + mDerFormat = "MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIxEzARBgNVBAoT" +"CklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25hbCBkZSBUZWNub2xvZ2lhIGRh" +"IEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJyYXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UE" +"AxMoQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3JhIFJhaXogQnJhc2lsZWlyYTAeFw0wMTExMzAxMjU4" +"MDBaFw0xMTExMzAyMzU5MDBaMIG0MQswCQYDVQQGEwJCUjETMBEGA1UEChMKSUNQLUJyYXNpbDE9" +"MDsGA1UECxM0SW5zdGl0dXRvIE5hY2lvbmFsIGRlIFRlY25vbG9naWEgZGEgSW5mb3JtYWNhbyAt" +"IElUSTERMA8GA1UEBxMIQnJhc2lsaWExCzAJBgNVBAgTAkRGMTEwLwYDVQQDEyhBdXRvcmlkYWRl" +"IENlcnRpZmljYWRvcmEgUmFpeiBCcmFzaWxlaXJhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB" +"CgKCAQEAwPMudwX/hvm+Uh2b/lQAcHVAisamaLkWdkwP9/S/tOKIgRrL6Oy+ZIGlOUdd6uYtk9Ma" +"/3pUpgcfNAj0vYm5gsyjQo9emsc+x6m4VWwk9iqMZSCK5EQkAq/Ut4n7KuLE1+gdftwdIgxfUsPt" +"4CyNrY50QV57KM2UT8x5rrmzEjr7TICGpSUAl2gVqe6xaii+bmYR1QrmWaBSAG59LrkrjrYtbRhF" +"boUDe1DK+6T8s5L6k8c8okpbHpa9veMztDVC9sPJ60MWXh6anVKo1UcLcbURyEeNvZneVRKAAU6o" +"uwdjDvwlsaKydFKwed0ToQ47bmUKgcm+wV3eTRk36UOnTwIDAQABo4HSMIHPME4GA1UdIARHMEUw" +"QwYFYEwBAQAwOjA4BggrBgEFBQcCARYsaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0RQ" +"Q2FjcmFpei5wZGYwPQYDVR0fBDYwNDAyoDCgLoYsaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292" +"LmJyL0xDUmFjcmFpei5jcmwwHQYDVR0OBBYEFIr68VeEERM1kEL6V0lUaQ2kxPA3MA8GA1UdEwEB" +"/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAZA5c1U/hgIh6OcgLA" +"fiJgFWpvmDZWqlV30/bHFpj8iBobJSm5uDpt7TirYh1Uxe3fQaGlYjJe+9zd+izPRbBqXPVQA34E" +"Xcwk4qpWuf1hHriWfdrx8AcqSqr6CuQFwSr75FosSzlwDADa70mT7wZjAmQhnZx2xJ6wfWlT9VQf" +"S//JYeIc7Fue2JNLd00UOSMMaiK/t79enKNHEA2fupH3vEigf5Eh4bVAN5VohrTm6MY53x7XQZZr" +"1ME7a55lFEnSeT0umlOAjR2mAbvSM5X5oSZNrmetdzyTj2flCM8CC7MLab0kkdngRIlUBGHF1/S5" +"nmPbK+9A46sd33oqK8n8"; + + mSha1RSATestCert = "-----BEGIN CERTIFICATE-----\n" + "MIIDFDCCAn2gAwIBAgIDDqqYMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT\n" + "MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0\n" + "aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTAwMTA1MDAzNjMwWhcNMTEwMTA3MjAyMTE0\n" + "WjCBnjEpMCcGA1UEBRMgQmNmc0RBRkl1U0YwdFpWVm5vOFJKbjVUbW9hNGR2Wkgx\n" + "CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g\n" + "RnJhbmNpc2NvMR0wGwYDVQQKExRMaW5kZW4gUmVzZWFyY2ggSW5jLjEYMBYGA1UE\n" + "AxQPKi5saW5kZW5sYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2\n" + "14Jdko8v6GB33hHbW+lNQyloFQtc2h4ykjf+fYPJ27dw6tQO2if7N3k/5XDkwC1N\n" + "krGgE9vt3iecCPgasue6k67Zyfj9HbEP2D+j38eROudrsxLaRFDQx50BvZ5YMNl3\n" + "4zQCj8/gCMsuq8cvaP9/rbJTUpgYWFGLsm8yAYOgWwIDAQABo4GuMIGrMA4GA1Ud\n" + "DwEB/wQEAwIE8DAdBgNVHQ4EFgQUIBK/JB9AyqquSEbkzt2Zux6v9sYwOgYDVR0f\n" + "BDMwMTAvoC2gK4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9zZWN1cmVj\n" + "YS5jcmwwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gjIBBPM5iQn9QwHQYDVR0lBBYw\n" + "FAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAKKR84+hvLuB\n" + "pop9VG7HQPIyEKtZq3Nnk+UlJGfjGY3csLWSFmxU727r5DzdEP1W1PwF3rxuoKcZ\n" + "4nJJpKdzoGVujgBMP2U/J0PJvU7D8U3Zqu7nrXAjOHj7iVnvJ3EKJ1bvwXaisgPN\n" + "wt21kKfGnA4OlhJtJ6VQvUkcF12I3pTP\n" + "-----END CERTIFICATE-----\n"; + + mSha1RSATestCA = "-----BEGIN CERTIFICATE-----\n" + "MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV\n" + "UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy\n" + "dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1\n" + "MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx\n" + "dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B\n" + "AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f\n" + "BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A\n" + "cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC\n" + "AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ\n" + "MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm\n" + "aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw\n" + "ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj\n" + "IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF\n" + "MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA\n" + "A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y\n" + "7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh\n" + "1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4\n" + "-----END CERTIFICATE-----\n"; + + + + + mX509TestCert = NULL; + mX509RootCert = NULL; + mX509IntermediateCert = NULL; + mX509ChildCert = NULL; + + BIO * validation_bio = BIO_new_mem_buf((void*)mPemTestCert.c_str(), mPemTestCert.length()); + PEM_read_bio_X509(validation_bio, &mX509TestCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemRootCert.c_str(), mPemRootCert.length()); + PEM_read_bio_X509(validation_bio, &mX509RootCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemIntermediateCert.c_str(), mPemIntermediateCert.length()); + PEM_read_bio_X509(validation_bio, &mX509IntermediateCert, 0, NULL); + BIO_free(validation_bio); + validation_bio = BIO_new_mem_buf((void*)mPemChildCert.c_str(), mPemChildCert.length()); + PEM_read_bio_X509(validation_bio, &mX509ChildCert, 0, NULL); + BIO_free(validation_bio); + } + ~sechandler_basic_test() + { + LLFile::remove("test_password.dat"); + LLFile::remove("sechandler_settings.tmp"); + LLFile::remove("mycertstore.pem"); + X509_free(mX509TestCert); + X509_free(mX509RootCert); + X509_free(mX509IntermediateCert); + X509_free(mX509ChildCert); + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<sechandler_basic_test> sechandler_basic_test_factory; + typedef sechandler_basic_test_factory::object sechandler_basic_test_object; + tut::sechandler_basic_test_factory tut_test("llsechandler_basic"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // test cert data retrieval + template<> template<> + void sechandler_basic_test_object::test<1>() + + { + char buffer[4096]; + LLPointer<LLCertificate> test_cert = new LLBasicCertificate(mPemTestCert); + + ensure_equals("Resultant pem is correct", + mPemTestCert, test_cert->getPem()); + std::vector<U8> binary_cert = test_cert->getBinary(); + + apr_base64_encode(buffer, (const char *)&binary_cert[0], binary_cert.size()); + + ensure_equals("Der Format is correct", memcmp(buffer, mDerFormat.c_str(), mDerFormat.length()), 0); + + LLSD llsd_cert = test_cert->getLLSD(); + std::ostringstream llsd_value; + llsd_value << LLSDOStreamer<LLSDNotationFormatter>(llsd_cert) << std::endl; + std::string llsd_cert_str = llsd_value.str(); + ensure_equals("Issuer Name/commonName", + (std::string)llsd_cert["issuer_name"]["commonName"], "Autoridade Certificadora Raiz Brasileira"); + ensure_equals("Issure Name/countryName", (std::string)llsd_cert["issuer_name"]["countryName"], "BR"); + ensure_equals("Issuer Name/localityName", (std::string)llsd_cert["issuer_name"]["localityName"], "Brasilia"); + ensure_equals("Issuer Name/org name", (std::string)llsd_cert["issuer_name"]["organizationName"], "ICP-Brasil"); + ensure_equals("IssuerName/org unit", + (std::string)llsd_cert["issuer_name"]["organizationalUnitName"], "Instituto Nacional de Tecnologia da Informacao - ITI"); + ensure_equals("IssuerName/state", (std::string)llsd_cert["issuer_name"]["stateOrProvinceName"], "DF"); + ensure_equals("Issuer name string", + (std::string)llsd_cert["issuer_name_string"], "CN=Autoridade Certificadora Raiz Brasileira,ST=DF," + "L=Brasilia,OU=Instituto Nacional de Tecnologia da Informacao - ITI,O=ICP-Brasil,C=BR"); + ensure_equals("subject Name/commonName", + (std::string)llsd_cert["subject_name"]["commonName"], "Autoridade Certificadora Raiz Brasileira"); + ensure_equals("subject Name/countryName", (std::string)llsd_cert["subject_name"]["countryName"], "BR"); + ensure_equals("subject Name/localityName", (std::string)llsd_cert["subject_name"]["localityName"], "Brasilia"); + ensure_equals("subject Name/org name", (std::string)llsd_cert["subject_name"]["organizationName"], "ICP-Brasil"); + ensure_equals("subjectName/org unit", + (std::string)llsd_cert["subject_name"]["organizationalUnitName"], "Instituto Nacional de Tecnologia da Informacao - ITI"); + ensure_equals("subjectName/state", (std::string)llsd_cert["subject_name"]["stateOrProvinceName"], "DF"); + ensure_equals("subject name string", + (std::string)llsd_cert["subject_name_string"], "CN=Autoridade Certificadora Raiz Brasileira,ST=DF," + "L=Brasilia,OU=Instituto Nacional de Tecnologia da Informacao - ITI,O=ICP-Brasil,C=BR"); + + ensure_equals("md5 digest", (std::string)llsd_cert["md5_digest"], "96:89:7d:61:d1:55:2b:27:e2:5a:39:b4:2a:6c:44:6f"); + ensure_equals("serial number", (std::string)llsd_cert["serial_number"], "04"); + // sha1 digest is giving a weird value, and I've no idea why...feh + //ensure_equals("sha1 digest", (std::string)llsd_cert["sha1_digest"], "8e:fd:ca:bc:93:e6:1e:92:5d:4d:1d:ed:18:1a:43:20:a4:67:a1:39"); + ensure_equals("valid from", (std::string)llsd_cert["valid_from"], "2001-11-30T12:58:00Z"); + ensure_equals("valid to", (std::string)llsd_cert["valid_to"], "2011-11-30T23:59:00Z"); + LLSD expectedKeyUsage = LLSD::emptyArray(); + expectedKeyUsage.append(LLSD((std::string)"certSigning")); + expectedKeyUsage.append(LLSD((std::string)"crlSigning")); + ensure("key usage", valueCompareLLSD(llsd_cert["keyUsage"], expectedKeyUsage)); + ensure("basic constraints", (bool)llsd_cert["basicConstraints"]["CA"]); + + ensure("x509 is equal", !X509_cmp(mX509TestCert, test_cert->getOpenSSLX509())); + } + + + // test protected data + template<> template<> + void sechandler_basic_test_object::test<2>() + + { + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + + std::string protected_data = "sUSh3wj77NG9oAMyt3XIhaej3KLZhLZWFZvI6rIGmwUUOmmelrRg0NI9rkOj8ZDpTPxpwToaBT5u" + "GQhakdaGLJznr9bHr4/6HIC1bouKj4n2rs4TL6j2WSjto114QdlNfLsE8cbbE+ghww58g8SeyLQO" + "nyzXoz+/PBz0HD5SMFDuObccoPW24gmqYySz8YoEWhSwO0pUtEEqOjVRsAJgF5wLAtJZDeuilGsq" + "4ZT9Y4wZ9Rh8nnF3fDUL6IGamHe1ClXM1jgBu10F6UMhZbnH4C3aJ2E9+LiOntU+l3iCb2MpkEpr" + "82r2ZAMwIrpnirL/xoYoyz7MJQYwUuMvBPToZJrxNSsjI+S2Z+I3iEJAELMAAA=="; + + std::vector<U8> binary_data(apr_base64_decode_len(protected_data.c_str())); + apr_base64_decode_binary(&binary_data[0], protected_data.c_str()); + + LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES); + cipher.decrypt(&binary_data[0], 16); + LLXORCipher cipher2(MACAddress, MAC_ADDRESS_BYTES); + cipher2.encrypt(&binary_data[0], 16); + std::ofstream temp_file("sechandler_settings.tmp", std::ofstream::binary); + temp_file.write((const char *)&binary_data[0], binary_data.size()); + temp_file.close(); + + LLPointer<LLSecAPIBasicHandler> handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", + "test_password.dat"); + handler->init(); + // data retrieval for existing data + LLSD data = handler->getProtectedData("test_data_type", "test_data_id"); + + + ensure_equals("retrieve existing data1", (std::string)data["data1"], "test_data_1"); + ensure_equals("retrieve existing data2", (std::string)data["data2"], "test_data_2"); + ensure_equals("retrieve existing data3", (std::string)data["data3"]["elem1"], "test element1"); + + // data storage + LLSD store_data = LLSD::emptyMap(); + store_data["store_data1"] = "test_store_data1"; + store_data["store_data2"] = 27; + store_data["store_data3"] = LLSD::emptyMap(); + store_data["store_data3"]["subelem1"] = "test_subelem1"; + + handler->setProtectedData("test_data_type", "test_data_id1", store_data); + data = handler->getProtectedData("test_data_type", "test_data_id"); + + data = handler->getProtectedData("test_data_type", "test_data_id"); + // verify no overwrite of existing data + ensure_equals("verify no overwrite 1", (std::string)data["data1"], "test_data_1"); + ensure_equals("verify no overwrite 2", (std::string)data["data2"], "test_data_2"); + ensure_equals("verify no overwrite 3", (std::string)data["data3"]["elem1"], "test element1"); + + // verify written data is good + data = handler->getProtectedData("test_data_type", "test_data_id1"); + ensure_equals("verify stored data1", (std::string)data["store_data1"], "test_store_data1"); + ensure_equals("verify stored data2", (int)data["store_data2"], 27); + ensure_equals("verify stored data3", (std::string)data["store_data3"]["subelem1"], "test_subelem1"); + + // verify overwrite works + handler->setProtectedData("test_data_type", "test_data_id", store_data); + data = handler->getProtectedData("test_data_type", "test_data_id"); + ensure_equals("verify overwrite stored data1", (std::string)data["store_data1"], "test_store_data1"); + ensure_equals("verify overwrite stored data2", (int)data["store_data2"], 27); + ensure_equals("verify overwrite stored data3", (std::string)data["store_data3"]["subelem1"], "test_subelem1"); + + // verify other datatype doesn't conflict + store_data["store_data3"] = "test_store_data3"; + store_data["store_data4"] = 28; + store_data["store_data5"] = LLSD::emptyMap(); + store_data["store_data5"]["subelem2"] = "test_subelem2"; + + handler->setProtectedData("test_data_type1", "test_data_id", store_data); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure_equals("verify datatype stored data3", (std::string)data["store_data3"], "test_store_data3"); + ensure_equals("verify datatype stored data4", (int)data["store_data4"], 28); + ensure_equals("verify datatype stored data5", (std::string)data["store_data5"]["subelem2"], "test_subelem2"); + + // test data not found + + data = handler->getProtectedData("test_data_type1", "test_data_not_found"); + ensure("not found", data.isUndefined()); + + // cause a 'write' by using 'LLPointer' to delete then instantiate a handler + handler = NULL; + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure_equals("verify datatype stored data3a", (std::string)data["store_data3"], "test_store_data3"); + ensure_equals("verify datatype stored data4a", (int)data["store_data4"], 28); + ensure_equals("verify datatype stored data5a", (std::string)data["store_data5"]["subelem2"], "test_subelem2"); + + // rewrite the initial file to verify reloads + handler = NULL; + std::ofstream temp_file2("sechandler_settings.tmp", std::ofstream::binary); + temp_file2.write((const char *)&binary_data[0], binary_data.size()); + temp_file2.close(); + + // cause a 'write' + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure("not found", data.isUndefined()); + + handler->deleteProtectedData("test_data_type", "test_data_id"); + ensure("Deleted data not found", handler->getProtectedData("test_data_type", "test_data_id").isUndefined()); + + LLFile::remove("sechandler_settings.tmp"); + handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + data = handler->getProtectedData("test_data_type1", "test_data_id"); + ensure("not found", data.isUndefined()); + handler = NULL; + + ensure(LLFile::isfile("sechandler_settings.tmp")); + } + + // test credenitals + template<> template<> + void sechandler_basic_test_object::test<3>() + { + LLPointer<LLSecAPIBasicHandler> handler = new LLSecAPIBasicHandler("sechandler_settings.tmp", "test_password.dat"); + handler->init(); + + LLSD my_id = LLSD::emptyMap(); + LLSD my_authenticator = LLSD::emptyMap(); + my_id["type"] = "test_type"; + my_id["username"] = "testuser@lindenlab.com"; + my_authenticator["type"] = "test_auth"; + my_authenticator["creds"] = "12345"; + + // test creation of credentials + LLPointer<LLCredential> my_cred = handler->createCredential("my_grid", my_id, my_authenticator); + + // test retrieval of credential components + ensure_equals("basic credential creation: identifier", my_id, my_cred->getIdentifier()); + ensure_equals("basic credential creation: authenticator", my_authenticator, my_cred->getAuthenticator()); + ensure_equals("basic credential creation: grid", "my_grid", my_cred->getGrid()); + + // test setting/overwriting of credential components + my_id["first_name"] = "firstname"; + my_id.erase("username"); + my_authenticator.erase("creds"); + my_authenticator["hash"] = "6563245"; + + my_cred->setCredentialData(my_id, my_authenticator); + ensure_equals("set credential data: identifier", my_id, my_cred->getIdentifier()); + ensure_equals("set credential data: authenticator", my_authenticator, my_cred->getAuthenticator()); + ensure_equals("set credential data: grid", "my_grid", my_cred->getGrid()); + + // test loading of a credential, that hasn't been saved, without + // any legacy saved credential data + LLPointer<LLCredential> my_new_cred = handler->loadCredential("my_grid2"); + ensure("unknown credential load test", my_new_cred->getIdentifier().isMap()); + ensure("unknown credential load test", !my_new_cred->getIdentifier().has("type")); + ensure("unknown credential load test", my_new_cred->getAuthenticator().isMap()); + ensure("unknown credential load test", !my_new_cred->getAuthenticator().has("type")); + // test saving of a credential + handler->saveCredential(my_cred, true); + + // test loading of a known credential + my_new_cred = handler->loadCredential("my_grid"); + ensure_equals("load a known credential: identifier", my_id, my_new_cred->getIdentifier()); + ensure_equals("load a known credential: authenticator",my_authenticator, my_new_cred->getAuthenticator()); + ensure_equals("load a known credential: grid", "my_grid", my_cred->getGrid()); + + // test deletion of a credential + handler->deleteCredential(my_new_cred); + + ensure("delete credential: identifier", my_new_cred->getIdentifier().isUndefined()); + ensure("delete credentialt: authenticator", my_new_cred->getIdentifier().isUndefined()); + ensure_equals("delete credential: grid", "my_grid", my_cred->getGrid()); + // load unknown cred + + my_new_cred = handler->loadCredential("my_grid"); + ensure("deleted credential load test", my_new_cred->getIdentifier().isMap()); + ensure("deleted credential load test", !my_new_cred->getIdentifier().has("type")); + ensure("deleted credential load test", my_new_cred->getAuthenticator().isMap()); + ensure("deleted credential load test", !my_new_cred->getAuthenticator().has("type")); + + // test loading of an unknown credential with legacy saved username, but without + // saved password + gFirstName = "myfirstname"; + gLastName = "mylastname"; + my_new_cred = handler->loadCredential("my_legacy_grid"); + ensure_equals("legacy credential with no password: type", + (const std::string)my_new_cred->getIdentifier()["type"], "agent"); + ensure_equals("legacy credential with no password: first_name", + (const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname"); + ensure_equals("legacy credential with no password: last_name", + (const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname"); + + ensure("legacy credential with no password: no authenticator", my_new_cred->getAuthenticator().isUndefined()); + + // test loading of an unknown credential with legacy saved password and username + + std::string hashed_password = "fSQcLG03eyIWJmkzfyYaKm81dSweLmsxeSAYKGE7fSQ="; + int length = apr_base64_decode_len(hashed_password.c_str()); + std::vector<char> decoded_password(length); + apr_base64_decode(&decoded_password[0], hashed_password.c_str()); + unsigned char MACAddress[MAC_ADDRESS_BYTES]; + LLUUID::getNodeID(MACAddress); + LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES); + cipher.decrypt((U8*)&decoded_password[0], length); + LLXORCipher cipher2(MACAddress, MAC_ADDRESS_BYTES); + cipher2.encrypt((U8*)&decoded_password[0], length); + llofstream password_file("test_password.dat", std::ofstream::binary); + password_file.write(&decoded_password[0], length); + password_file.close(); + + my_new_cred = handler->loadCredential("my_legacy_grid2"); + ensure_equals("legacy credential with password: type", + (const std::string)my_new_cred->getIdentifier()["type"], "agent"); + ensure_equals("legacy credential with password: first_name", + (const std::string)my_new_cred->getIdentifier()["first_name"], "myfirstname"); + ensure_equals("legacy credential with password: last_name", + (const std::string)my_new_cred->getIdentifier()["last_name"], "mylastname"); + + LLSD legacy_authenticator = my_new_cred->getAuthenticator(); + ensure_equals("legacy credential with password: type", + (std::string)legacy_authenticator["type"], + "hash"); + ensure_equals("legacy credential with password: algorithm", + (std::string)legacy_authenticator["algorithm"], + "md5"); + ensure_equals("legacy credential with password: algorithm", + (std::string)legacy_authenticator["secret"], + "01234567890123456789012345678901"); + + // test creation of credentials + my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator); + // test save without saving authenticator. + handler->saveCredential(my_cred, FALSE); + my_new_cred = handler->loadCredential("mysavedgrid"); + ensure_equals("saved credential without auth", + (const std::string)my_new_cred->getIdentifier()["type"], "test_type"); + ensure("no authenticator values were saved", my_new_cred->getAuthenticator().isUndefined()); + } + + // test cert vector + template<> template<> + void sechandler_basic_test_object::test<4>() + { + + // validate create from empty vector + LLPointer<LLBasicCertificateVector> test_vector = new LLBasicCertificateVector(); + ensure_equals("when loading with nothing, we should result in no certs in vector", test_vector->size(), 0); + + test_vector->add(new LLBasicCertificate(mPemTestCert)); + ensure_equals("one element in vector", test_vector->size(), 1); + test_vector->add(new LLBasicCertificate(mPemChildCert)); + ensure_equals("two elements in vector after add", test_vector->size(), 2); + + test_vector->add(new LLBasicCertificate(mPemChildCert)); + ensure_equals("two elements in vector after re-add", test_vector->size(), 2); + // validate order + X509* test_cert = (*test_vector)[0]->getOpenSSLX509(); + ensure("first cert added remains first cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + + test_cert = (*test_vector)[1]->getOpenSSLX509(); + ensure("adding a duplicate cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // + // validate iterator + // + LLBasicCertificateVector::iterator current_cert = test_vector->begin(); + LLBasicCertificateVector::iterator copy_current_cert = current_cert; + // operator++(int) + ensure("validate iterator++ element in vector is expected cert", *current_cert++ == (*test_vector)[0]); + ensure("validate 2nd iterator++ element in vector is expected cert", *current_cert++ == (*test_vector)[1]); + ensure("validate end iterator++", current_cert == test_vector->end()); + + // copy + ensure("validate copy iterator element in vector is expected cert", *copy_current_cert == (*test_vector)[0]); + + // operator--(int) + current_cert--; + ensure("validate iterator-- element in vector is expected cert", *current_cert-- == (*test_vector)[1]); + ensure("validate iterator-- element in vector is expected cert", *current_cert == (*test_vector)[0]); + + ensure("begin iterator is equal", current_cert == test_vector->begin()); + + // operator++ + ensure("validate ++iterator element in vector is expected cert", *++current_cert == (*test_vector)[1]); + ensure("end of cert vector after ++iterator", ++current_cert == test_vector->end()); + // operator-- + ensure("validate --iterator element in vector is expected cert", *--current_cert == (*test_vector)[1]); + ensure("validate 2nd --iterator element in vector is expected cert", *--current_cert == (*test_vector)[0]); + + // validate remove + // validate create from empty vector + test_vector = new LLBasicCertificateVector(); + test_vector->add(new LLBasicCertificate(mPemTestCert)); + test_vector->add(new LLBasicCertificate(mPemChildCert)); + test_vector->erase(test_vector->begin()); + ensure_equals("one element in store after remove", test_vector->size(), 1); + test_cert = (*test_vector)[0]->getOpenSSLX509(); + ensure("validate cert was removed", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // validate insert + test_vector->insert(test_vector->begin(), new LLBasicCertificate(mPemChildCert)); + test_cert = (*test_vector)[0]->getOpenSSLX509(); + + ensure("validate cert was inserted", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + //validate find + LLSD find_info = LLSD::emptyMap(); + test_vector->insert(test_vector->begin(), new LLBasicCertificate(mPemRootCert)); + find_info["issuer_name"] = LLSD::emptyMap(); + find_info["issuer_name"]["commonName"] = "Roxies intermediate CA"; + find_info["md5_digest"] = "97:24:c7:4c:d4:ba:2d:0e:9c:a1:18:8e:3a:c6:1f:c3"; + current_cert = test_vector->find(find_info); + ensure("found", current_cert != test_vector->end()); + ensure("found cert", (*current_cert).get() == (*test_vector)[1].get()); + find_info["sha1_digest"] = "bad value"; + current_cert =test_vector->find(find_info); + ensure("didn't find cert", current_cert == test_vector->end()); + } + + // test cert store + template<> template<> + void sechandler_basic_test_object::test<5>() + { + // validate load with nothing + LLFile::remove("mycertstore.pem"); + LLPointer<LLBasicCertificateStore> test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("when loading with nothing, we should result in no certs in store", test_store->size(), 0); + + // validate load with empty file + test_store->save(); + test_store = NULL; + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("when loading with nothing, we should result in no certs in store", test_store->size(), 0); + test_store=NULL; + + // instantiate a cert store from a file + llofstream certstorefile("mycertstore.pem", std::ios::out); + certstorefile << mPemChildCert << std::endl << mPemTestCert << std::endl; + certstorefile.close(); + // validate loaded certs + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("two elements in store", test_store->size(), 2); + + // operator[] + X509* test_cert = (*test_store)[0]->getOpenSSLX509(); + + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_store)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + + + // validate save + LLFile::remove("mycertstore.pem"); + test_store->save(); + test_store = NULL; + test_store = new LLBasicCertificateStore("mycertstore.pem"); + ensure_equals("two elements in store after save", test_store->size(), 2); + LLCertificateStore::iterator current_cert = test_store->begin(); + test_cert = (*current_cert)->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + current_cert++; + X509_free(test_cert); + test_cert = (*current_cert)->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509TestCert)); + X509_free(test_cert); + current_cert++; + ensure("end of cert store", current_cert == test_store->end()); + + } + + // cert name wildcard matching + template<> template<> + void sechandler_basic_test_object::test<6>() + { + ensure("simple name match", + _cert_hostname_wildcard_match("foo", "foo")); + + ensure("simple name match, with end period", + _cert_hostname_wildcard_match("foo.", "foo.")); + + ensure("simple name match, with begin period", + _cert_hostname_wildcard_match(".foo", ".foo")); + + ensure("simple name match, with mismatched period cn", + _cert_hostname_wildcard_match("foo.", "foo")); + + ensure("simple name match, with mismatched period hostname", + _cert_hostname_wildcard_match("foo", "foo.")); + + ensure("simple name match, with subdomain", + _cert_hostname_wildcard_match("foo.bar", "foo.bar")); + + ensure("stutter name match", + _cert_hostname_wildcard_match("foobbbbfoo", "foo*bbbfoo")); + + ensure("simple name match, with beginning wildcard", + _cert_hostname_wildcard_match("foobar", "*bar")); + + ensure("simple name match, with ending wildcard", + _cert_hostname_wildcard_match("foobar", "foo*")); + + ensure("simple name match, with beginning null wildcard", + _cert_hostname_wildcard_match("foobar", "*foobar")); + + ensure("simple name match, with ending null wildcard", + _cert_hostname_wildcard_match("foobar", "foobar*")); + + ensure("simple name match, with embedded wildcard", + _cert_hostname_wildcard_match("foobar", "f*r")); + + ensure("simple name match, with embedded null wildcard", + _cert_hostname_wildcard_match("foobar", "foo*bar")); + + ensure("simple name match, with dual embedded wildcard", + _cert_hostname_wildcard_match("foobar", "f*o*ar")); + + ensure("simple name mismatch", + !_cert_hostname_wildcard_match("bar", "foo")); + + ensure("simple name mismatch, with end period", + !_cert_hostname_wildcard_match("foobar.", "foo.")); + + ensure("simple name mismatch, with begin period", + !_cert_hostname_wildcard_match(".foobar", ".foo")); + + ensure("simple name mismatch, with subdomain", + !_cert_hostname_wildcard_match("foobar.bar", "foo.bar")); + + ensure("simple name mismatch, with beginning wildcard", + !_cert_hostname_wildcard_match("foobara", "*bar")); + + ensure("simple name mismatch, with ending wildcard", + !_cert_hostname_wildcard_match("oobar", "foo*")); + + ensure("simple name mismatch, with embedded wildcard", + !_cert_hostname_wildcard_match("oobar", "f*r")); + + ensure("simple name mismatch, with dual embedded wildcard", + !_cert_hostname_wildcard_match("foobar", "f*d*ar")); + + ensure("simple wildcard", + _cert_hostname_wildcard_match("foobar", "*")); + + ensure("long domain", + _cert_hostname_wildcard_match("foo.bar.com", "foo.bar.com")); + + ensure("long domain with multiple wildcards", + _cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com")); + + ensure("end periods", + _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com.")); + + ensure("match end period", + _cert_hostname_wildcard_match("foo.bar.com.", "*.b*r.com")); + + ensure("match end period2", + _cert_hostname_wildcard_match("foo.bar.com", "*.b*r.com.")); + + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.bar.com")); + + ensure("wildcard match", + _cert_hostname_wildcard_match("foo.foo.bar.com", "*.*.com")); + + ensure("wildcard mismatch", + !_cert_hostname_wildcard_match("foo.foo.bar.com", "*.foo.com")); + } + + // test cert chain + template<> template<> + void sechandler_basic_test_object::test<7>() + { + // validate create from empty chain + LLPointer<LLBasicCertificateChain> test_chain = new LLBasicCertificateChain(NULL); + ensure_equals("when loading with nothing, we should result in no certs in chain", test_chain->size(), 0); + + // Single cert in the chain. + X509_STORE_CTX *test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = NULL; + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 1); + X509* test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // cert + CA + + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 2); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + // cert + nonrelated + + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509TestCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 1); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + + // cert + CA + nonrelated + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + sk_X509_push(test_store->untrusted, mX509TestCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("two elements in store", test_chain->size(), 2); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + // cert + intermediate + CA + test_store = X509_STORE_CTX_new(); + test_store->cert = mX509ChildCert; + test_store->untrusted = sk_X509_new_null(); + sk_X509_push(test_store->untrusted, mX509IntermediateCert); + sk_X509_push(test_store->untrusted, mX509RootCert); + test_chain = new LLBasicCertificateChain(test_store); + X509_STORE_CTX_free(test_store); + ensure_equals("three elements in store", test_chain->size(), 3); + test_cert = (*test_chain)[0]->getOpenSSLX509(); + ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert)); + X509_free(test_cert); + test_cert = (*test_chain)[1]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509IntermediateCert)); + X509_free(test_cert); + + test_cert = (*test_chain)[2]->getOpenSSLX509(); + ensure("validate second element in store is expected cert", !X509_cmp(test_cert, mX509RootCert)); + X509_free(test_cert); + } + // test cert validation + template<> template<> + void sechandler_basic_test_object::test<8>() + { + // start with a trusted store with our known root cert + LLFile::remove("mycertstore.pem"); + LLPointer<LLBasicCertificateStore> test_store = new LLBasicCertificateStore("mycertstore.pem"); + test_store->add(new LLBasicCertificate(mX509RootCert)); + LLSD validation_params; + + // validate basic trust for a chain containing only the intermediate cert. (1 deep) + LLPointer<LLBasicCertificateChain> test_chain = new LLBasicCertificateChain(NULL); + + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + + test_chain->validate(0, test_store, validation_params); + + // add the root certificate to the chain and revalidate + test_chain->add(new LLBasicCertificate(mX509RootCert)); + test_chain->validate(0, test_store, validation_params); + + // add the child cert at the head of the chain, and revalidate (3 deep chain) + test_chain->insert(test_chain->begin(), new LLBasicCertificate(mX509ChildCert)); + test_chain->validate(0, test_store, validation_params); + + // basic failure cases + test_chain = new LLBasicCertificateChain(NULL); + //validate with only the child cert + test_chain->add(new LLBasicCertificate(mX509ChildCert)); + ensure_throws("no CA, with only a child cert", + LLCertValidationTrustException, + (*test_chain)[0], + test_chain->validate, + VALIDATION_POLICY_TRUSTED, + test_store, + validation_params); + + + // validate without the trust flag. + test_chain->validate(0, test_store, validation_params); + + // clear out the store + test_store = new LLBasicCertificateStore("mycertstore.pem"); + // append the intermediate cert + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + ensure_throws("no CA, with child and intermediate certs", + LLCertValidationTrustException, + (*test_chain)[1], + test_chain->validate, + VALIDATION_POLICY_TRUSTED, + test_store, + validation_params); + // validate without the trust flag + test_chain->validate(0, test_store, validation_params); + + // Test time validity + LLSD child_info = (*test_chain)[0]->getLLSD(); + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0); + test_chain->validate(VALIDATION_POLICY_TIME, test_store, validation_params); + + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = child_info[CERT_VALID_FROM].asDate(); + + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() - 1.0); + + // test not yet valid + ensure_throws("Child cert not yet valid" , + LLCertValidationExpirationException, + (*test_chain)[0], + test_chain->validate, + VALIDATION_POLICY_TIME, + test_store, + validation_params); + validation_params = LLSD::emptyMap(); + validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_TO].asDate().secondsSinceEpoch() + 1.0); + + // test cert expired + ensure_throws("Child cert expired", + LLCertValidationExpirationException, + (*test_chain)[0], + test_chain->validate, + VALIDATION_POLICY_TIME, + test_store, + validation_params); + + // test SSL KU + // validate basic trust for a chain containing child and intermediate. + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mX509ChildCert)); + test_chain->add(new LLBasicCertificate(mX509IntermediateCert)); + test_chain->validate(VALIDATION_POLICY_SSL_KU, test_store, validation_params); + + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mX509TestCert)); + + ensure_throws("Cert doesn't have ku", + LLCertKeyUsageValidationException, + (*test_chain)[0], + test_chain->validate, + VALIDATION_POLICY_SSL_KU, + test_store, + validation_params); + + // test sha1RSA validation + test_chain = new LLBasicCertificateChain(NULL); + test_chain->add(new LLBasicCertificate(mSha1RSATestCert)); + test_chain->add(new LLBasicCertificate(mSha1RSATestCA)); + + test_chain->validate(0, test_store, validation_params); + } + +}; + diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp new file mode 100644 index 0000000000..803020dc7a --- /dev/null +++ b/indra/newview/tests/llslurl_test.cpp @@ -0,0 +1,258 @@ +/** + * @file llsecapi_test.cpp + * @author Roxie + * @date 2009-02-10 + * @brief Test the sec api functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 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 maps.secondlife.com2.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 "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../llslurl.h" +#include "../../llxml/llcontrol.h" +#include "llsdserialize.h" +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: 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) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} + +std::string gCmdLineLoginURI; +std::string gCmdLineGridChoice; +std::string gCmdLineHelperURI; +std::string gLoginPage; +std::string gCurrentGrid; +std::string LLControlGroup::getString(const std::string& name) +{ + if (name == "CmdLineGridChoice") + return gCmdLineGridChoice; + else if (name == "CmdLineHelperURI") + return gCmdLineHelperURI; + else if (name == "LoginPage") + return gLoginPage; + else if (name == "CurrentGrid") + return gCurrentGrid; + return ""; +} + +LLSD LLControlGroup::getLLSD(const std::string& name) +{ + if (name == "CmdLineLoginURI") + { + if(!gCmdLineLoginURI.empty()) + { + return LLSD(gCmdLineLoginURI); + } + } + return LLSD(); +} + + +LLControlGroup gSavedSettings("test"); + +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct slurlTest + { + slurlTest() + { + LLGridManager::getInstance()->initialize(std::string("")); + } + ~slurlTest() + { + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<slurlTest> slurlTestFactory; + typedef slurlTestFactory::object slurlTestObject; + tut::slurlTestFactory tut_test("llslurl"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // construction from slurl string + template<> template<> + void slurlTestObject::test<1>() + { + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + + LLSLURL slurl = LLSLURL(""); + ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION); + + slurl = LLSLURL("http://slurl.com/secondlife/myregion"); + ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3"); + ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("secondlife://myregion"); + ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("secondlife://myregion/1/2/3"); + ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("/myregion"); + ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/region slurl, region ", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + + slurl = LLSLURL("/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/ slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + + slurl = LLSLURL("my region/1/2/3"); + ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" slurl, region + coords", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + + slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); + ensure_equals("grid slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid slurl, region + coords", slurl.getSLURLString(), + "https://my.grid.com/region/my%20region/1/2/3"); + + slurl = LLSLURL("https://my.grid.com/region/my region"); + ensure_equals("grid slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid slurl, region + coords", slurl.getSLURLString(), + "https://my.grid.com/region/my%20region/128/128/0"); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com"); + slurl = LLSLURL("/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("/ slurl, region + coords", slurl.getSLURLString(), + "https://foo.bar.com/region/myregion/1/2/3"); + + slurl = LLSLURL("myregion/1/2/3"); + ensure_equals(": slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" slurl, region + coords", slurl.getSLURLString(), + "https://foo.bar.com/region/myregion/1/2/3"); + + slurl = LLSLURL(LLSLURL::SIM_LOCATION_HOME); + ensure_equals("home", slurl.getType(), LLSLURL::HOME_LOCATION); + + slurl = LLSLURL(LLSLURL::SIM_LOCATION_LAST); + ensure_equals("last", slurl.getType(), LLSLURL::LAST_LOCATION); + + slurl = LLSLURL("secondlife:///app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + ensure_equals("grid1", "foo.bar.com", slurl.getGrid()); + + slurl = LLSLURL("secondlife://Aditi/app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + ensure_equals("grid2", "util.aditi.lindenlab.com", slurl.getGrid()); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com"); + slurl = LLSLURL("secondlife:///secondlife/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("location", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("region" , "myregion", slurl.getRegion()); + ensure_equals("grid3", "util.agni.lindenlab.com", slurl.getGrid()); + + slurl = LLSLURL("secondlife://Aditi/secondlife/myregion/1/2/3"); + ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("location", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("region" , "myregion", slurl.getRegion()); + ensure_equals("grid4", "util.aditi.lindenlab.com", slurl.getGrid()); + + slurl = LLSLURL("https://my.grid.com/app/foo/bar?12345"); + ensure_equals("app", slurl.getType(), LLSLURL::APP); + ensure_equals("appcmd", slurl.getAppCmd(), "foo"); + ensure_equals("apppath", slurl.getAppPath().size(), 1); + ensure_equals("apppath2", slurl.getAppPath()[0].asString(), "bar"); + ensure_equals("appquery", slurl.getAppQuery(), "12345"); + + } + + // construction from grid/region/vector combos + template<> template<> + void slurlTestObject::test<2>() + { + LLSLURL slurl = LLSLURL("mygrid.com", "my region"); + ensure_equals("grid/region - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals("grid/region", slurl.getSLURLString(), + "https://mygrid.com/region/my%20region/128/128/0"); + + slurl = LLSLURL("mygrid.com", "my region", LLVector3(1,2,3)); + ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" grid/region/vector", slurl.getSLURLString(), + "https://mygrid.com/region/my%20region/1/2/3"); + + LLGridManager::getInstance()->setGridChoice("foo.bar.com.bar"); + slurl = LLSLURL("my region", LLVector3(1,2,3)); + ensure_equals("grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" grid/region/vector", slurl.getSLURLString(), + "https://foo.bar.com.bar/region/my%20region/1/2/3"); + + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + slurl = LLSLURL("my region", LLVector3(1,2,3)); + ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); + ensure_equals(" default grid/region/vector", slurl.getSLURLString(), + "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + + } + // Accessors + template<> template<> + void slurlTestObject::test<3>() + { + LLSLURL slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); + ensure_equals("login string", slurl.getLoginString(), "uri:my region&1&2&3"); + ensure_equals("location string", slurl.getLocationString(), "my region/1/2/3"); + ensure_equals("grid", slurl.getGrid(), "my.grid.com"); + ensure_equals("region", slurl.getRegion(), "my region"); + ensure_equals("position", slurl.getPosition(), LLVector3(1, 2, 3)); + + } +} diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp new file mode 100644 index 0000000000..025b570be2 --- /dev/null +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -0,0 +1,456 @@ +/** + * @file llviewernetwork_test.cpp + * @author Roxie + * @date 2009-03-9 + * @brief Test the viewernetwork functionality + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden LregisterSecAPIab + * 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 "../llviewernetwork.h" +#include "../test/lltut.h" +#include "../../llxml/llcontrol.h" +#include "llfile.h" + +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing + +LLControlGroup::LLControlGroup(const std::string& name) +: 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) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} + +std::string gCmdLineLoginURI; +std::string gCmdLineGridChoice; +std::string gCmdLineHelperURI; +std::string gLoginPage; +std::string gCurrentGrid; +std::string LLControlGroup::getString(const std::string& name) +{ + if (name == "CmdLineGridChoice") + return gCmdLineGridChoice; + else if (name == "CmdLineHelperURI") + return gCmdLineHelperURI; + else if (name == "LoginPage") + return gLoginPage; + else if (name == "CurrentGrid") + return gCurrentGrid; + return ""; +} + +LLSD LLControlGroup::getLLSD(const std::string& name) +{ + if (name == "CmdLineLoginURI") + { + if(!gCmdLineLoginURI.empty()) + { + return LLSD(gCmdLineLoginURI); + } + } + return LLSD(); +} + + +LLControlGroup gSavedSettings("test"); + +const char *gSampleGridFile = "<llsd><map>" +"<key>grid1</key><map>" +" <key>favorite</key><integer>1</integer>" +" <key>helper_uri</key><string>https://helper1/helpers/</string>" +" <key>label</key><string>mylabel</string>" +" <key>login_page</key><string>loginpage</string>" +" <key>login_uri</key><array><string>myloginuri</string></array>" +" <key>name</key><string>grid1</string>" +" <key>visible</key><integer>1</integer>" +" <key>credential_type</key><string>agent</string>" +" <key>grid_login_id</key><string>MyGrid</string>" +"</map>" +"<key>util.agni.lindenlab.com</key><map>" +" <key>favorite</key><integer>1</integer>" +" <key>helper_uri</key><string>https://helper1/helpers/</string>" +" <key>label</key><string>mylabel</string>" +" <key>login_page</key><string>loginpage</string>" +" <key>login_uri</key><array><string>myloginuri</string></array>" +" <key>name</key><string>util.agni.lindenlab.com</string>" +"</map></map></llsd>"; +// ------------------------------------------------------------------------------------------- +// TUT +// ------------------------------------------------------------------------------------------- +namespace tut +{ + // Test wrapper declaration : wrapping nothing for the moment + struct viewerNetworkTest + { + viewerNetworkTest() + { + LLFile::remove("grid_test.xml"); + gCmdLineLoginURI.clear(); + gCmdLineGridChoice.clear(); + gCmdLineHelperURI.clear(); + gLoginPage.clear(); + gCurrentGrid.clear(); + } + ~viewerNetworkTest() + { + LLFile::remove("grid_test.xml"); + } + }; + + // Tut templating thingamagic: test group, object and test instance + typedef test_group<viewerNetworkTest> viewerNetworkTestFactory; + typedef viewerNetworkTestFactory::object viewerNetworkTestObject; + tut::viewerNetworkTestFactory tut_test("llviewernetwork"); + + // --------------------------------------------------------------------------------------- + // Test functions + // --------------------------------------------------------------------------------------- + // initialization without a grid file + template<> template<> + void viewerNetworkTestObject::test<1>() + { + + LLGridManager *manager = LLGridManager::getInstance(); + // grid file doesn't exist + manager->initialize("grid_test.xml"); + // validate that some of the defaults are available. + std::map<std::string, std::string> known_grids = manager->getKnownGrids(); + ensure_equals("Known grids is a string-string map of size 18", known_grids.size(), 18); + ensure_equals("Agni has the right name and label", + known_grids[std::string("util.agni.lindenlab.com")], std::string("Agni")); + ensure_equals("None exists", known_grids[""], "None"); + + LLSD grid = LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com"); + ensure("Grid info for agni is a map", grid.isMap()); + ensure_equals("name is correct for agni", + grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com")); + ensure_equals("label is correct for agni", + grid[GRID_LABEL_VALUE].asString(), std::string("Agni")); + ensure("Login URI is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Agni login uri is correct", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Agni helper uri is correct", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("Agni login page is correct", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + ensure("Agni is a favorite", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("Agni is a system grid", + grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + ensure("Grid file wasn't greated as it wasn't saved", + !LLFile::isfile("grid_test.xml")); + } + + // initialization with a grid file + template<> template<> + void viewerNetworkTestObject::test<2>() + { + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("adding a grid via a grid file increases known grid size", + known_grids.size(), 19); + ensure_equals("Agni is still there after we've added a grid via a grid file", + known_grids["util.agni.lindenlab.com"], std::string("Agni")); + + + // assure Agni doesn't get overwritten + LLSD grid = LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com"); + + ensure_equals("Agni grid label was not modified by grid file", + grid[GRID_LABEL_VALUE].asString(), std::string("Agni")); + + ensure_equals("Agni name wasn't modified by grid file", + grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com")); + ensure("Agni grid URI is still an array after grid file", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Agni login uri still the same after grid file", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + ensure_equals("Agni helper uri still the same after grid file", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("Agni login page the same after grid file", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://secondlife.com/app/login/")); + ensure("Agni still a favorite after grid file", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("Agni system grid still set after grid file", + grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + + ensure_equals("Grid file adds to name<->label map", + known_grids["grid1"], std::string("mylabel")); + grid = LLGridManager::getInstance()->getGridInfo("grid1"); + ensure_equals("grid file grid name is set", + grid[GRID_VALUE].asString(), std::string("grid1")); + ensure_equals("grid file label is set", + grid[GRID_LABEL_VALUE].asString(), std::string("mylabel")); + ensure("grid file login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("grid file login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("myloginuri")); + ensure_equals("grid file helper uri is set", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://helper1/helpers/")); + ensure_equals("grid file login page is set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("loginpage")); + ensure("grid file favorite is set", + grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("grid file isn't a system grid", + !grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + ensure("Grid file still exists after loading", + LLFile::isfile("grid_test.xml")); + } + + // Initialize via command line + + template<> template<> + void viewerNetworkTestObject::test<3>() + { + gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi"; + + LLGridManager::getInstance()->initialize("grid_test.xml"); + // with single login uri specified. + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("adding a command line grid increases known grid size", + known_grids.size(), 19); + ensure_equals("Command line grid is added to the list of grids", + known_grids["my.login.uri"], std::string("my.login.uri")); + LLSD grid = LLGridManager::getInstance()->getGridInfo("my.login.uri"); + ensure_equals("Command line grid name is set", + grid[GRID_VALUE].asString(), std::string("my.login.uri")); + ensure_equals("Command line grid label is set", + grid[GRID_LABEL_VALUE].asString(), std::string("my.login.uri")); + ensure("Command line grid login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Command line grid login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://my.login.uri/cgi-bin/login.cgi")); + ensure_equals("Command line grid helper uri is set", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://my.login.uri/helpers/")); + ensure_equals("Command line grid login page is set", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://my.login.uri/app/login/")); + ensure("Command line grid favorite is set", + !grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("Command line grid isn't a system grid", + !grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + + // now try a command line with a custom grid identifier + gCmdLineGridChoice = "mycustomgridchoice"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure_equals("adding a command line grid with custom name increases known grid size", + known_grids.size(), 19); + ensure_equals("Custom Command line grid is added to the list of grids", + known_grids["mycustomgridchoice"], std::string("mycustomgridchoice")); + grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice"); + ensure_equals("Custom Command line grid name is set", + grid[GRID_VALUE].asString(), std::string("mycustomgridchoice")); + ensure_equals("Custom Command line grid label is set", + grid[GRID_LABEL_VALUE].asString(), std::string("mycustomgridchoice")); + ensure("Custom Command line grid login uri is an array", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("Custom Command line grid login uri is set", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://my.login.uri/cgi-bin/login.cgi")); + + // add a helperuri + gCmdLineHelperURI = "myhelperuri"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice"); + ensure_equals("Validate command line helper uri", + grid[GRID_HELPER_URI_VALUE].asString(), std::string("myhelperuri")); + + // add a login page + gLoginPage = "myloginpage"; + LLGridManager::getInstance()->initialize("grid_test.xml"); + grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice"); + ensure_equals("Validate command line helper uri", + grid[GRID_LOGIN_PAGE_VALUE].asString(), std::string("myloginpage")); + } + + // validate grid selection + template<> template<> + void viewerNetworkTestObject::test<4>() + { + LLSD loginURI = LLSD::emptyArray(); + LLSD grid = LLSD::emptyMap(); + // adding a grid with simply a name will populate the values. + grid[GRID_VALUE] = "myaddedgrid"; + + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com"); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Agni")); + ensure_equals("getGrid", LLGridManager::getInstance()->getGrid(), + std::string("util.agni.lindenlab.com")); + ensure_equals("getHelperURI", LLGridManager::getInstance()->getHelperURI(), + std::string("https://secondlife.com/helpers/")); + ensure_equals("getLoginPage", LLGridManager::getInstance()->getLoginPage(), + std::string("http://secondlife.com/app/login/")); + ensure_equals("getLoginPage2", LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"), + std::string("http://secondlife.com/app/login/")); + ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid()); + std::vector<std::string> uris; + LLGridManager::getInstance()->getLoginURIs(uris); + ensure_equals("getLoginURIs size", uris.size(), 1); + ensure_equals("getLoginURIs", uris[0], + std::string("https://login.agni.lindenlab.com/cgi-bin/login.cgi")); + LLGridManager::getInstance()->setGridChoice("myaddedgrid"); + ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("myaddedgrid")); + ensure("Is myaddedgrid a production grid", !LLGridManager::getInstance()->isInProductionGrid()); + + LLGridManager::getInstance()->setFavorite(); + grid = LLGridManager::getInstance()->getGridInfo("myaddedgrid"); + ensure("setting favorite", grid.has(GRID_IS_FAVORITE_VALUE)); + } + + // name based grid population + template<> template<> + void viewerNetworkTestObject::test<5>() + { + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + // adding a grid with simply a name will populate the values. + grid[GRID_VALUE] = "myaddedgrid"; + LLGridManager::getInstance()->addGrid(grid); + grid = LLGridManager::getInstance()->getGridInfo("myaddedgrid"); + + ensure_equals("name based grid has name value", + grid[GRID_VALUE].asString(), + std::string("myaddedgrid")); + ensure_equals("name based grid has label value", + grid[GRID_LABEL_VALUE].asString(), + std::string("myaddedgrid")); + ensure_equals("name based grid has name value", + grid[GRID_HELPER_URI_VALUE].asString(), + std::string("https://myaddedgrid/helpers/")); + ensure_equals("name based grid has name value", + grid[GRID_LOGIN_PAGE_VALUE].asString(), + std::string("http://myaddedgrid/app/login/")); + ensure("name based grid has array loginuri", + grid[GRID_LOGIN_URI_VALUE].isArray()); + ensure_equals("name based grid has single login uri value", + grid[GRID_LOGIN_URI_VALUE].size(), 1); + ensure_equals("Name based grid login uri is correct", + grid[GRID_LOGIN_URI_VALUE][0].asString(), + std::string("https://myaddedgrid/cgi-bin/login.cgi")); + ensure("name based grid is not a favorite yet", + !grid.has(GRID_IS_FAVORITE_VALUE)); + ensure("name based grid does not have system setting", + !grid.has(GRID_IS_SYSTEM_GRID_VALUE)); + + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + } + + // persistence of the grid list with an empty gridfile. + template<> template<> + void viewerNetworkTestObject::test<6>() + { + // try with initial grid list without a grid file, + // without setting the grid to a saveable favorite. + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = std::string("mynewgridname"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->saveFavorites(); + ensure("Grid file exists after saving", + LLFile::isfile("grid_test.xml")); + LLGridManager::getInstance()->initialize("grid_test.xml"); + // should not be there + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list without being marked a favorite", + known_grids.find(std::string("mynewgridname")) == known_grids.end()); + + // mark a grid a favorite to make sure it's persisted + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("mynewgridname"); + LLGridManager::getInstance()->setFavorite(); + LLGridManager::getInstance()->saveFavorites(); + ensure("Grid file exists after saving", + LLFile::isfile("grid_test.xml")); + LLGridManager::getInstance()->initialize("grid_test.xml"); + // should not be there + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("mynewgridname")) != + known_grids.end()); + } + + // persistence of the grid file with existing gridfile + template<> template<> + void viewerNetworkTestObject::test<7>() + { + + llofstream gridfile("grid_test.xml"); + gridfile << gSampleGridFile; + gridfile.close(); + + LLGridManager::getInstance()->initialize("grid_test.xml"); + LLSD grid = LLSD::emptyMap(); + grid[GRID_VALUE] = std::string("mynewgridname"); + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->saveFavorites(); + // validate we didn't lose existing favorites + LLGridManager::getInstance()->initialize("grid_test.xml"); + std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("grid1")) != + known_grids.end()); + + // add a grid + LLGridManager::getInstance()->addGrid(grid); + LLGridManager::getInstance()->setGridChoice("mynewgridname"); + LLGridManager::getInstance()->setFavorite(); + LLGridManager::getInstance()->saveFavorites(); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("grid1")) != + known_grids.end()); + known_grids = LLGridManager::getInstance()->getKnownGrids(); + ensure("New grid wasn't added to persisted list after being marked a favorite", + known_grids.find(std::string("mynewgridname")) != + known_grids.end()); + } +} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 18ac10fe38..2a966f4adf 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -332,6 +332,12 @@ class WindowsManifest(ViewerManifest): self.path("media_plugin_webkit.dll") self.end_prefix() + # winmm.dll shim + if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst="llplugin"): + self.path("winmm.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"): @@ -343,6 +349,7 @@ class WindowsManifest(ViewerManifest): self.path("qtwebkitd4.dll") self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") + self.path("winmm.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): @@ -639,10 +646,14 @@ class DarwinManifest(ViewerManifest): self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app") self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app") + # plugin launcher + self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app") + # our apps dependencies on shared libs if dylibs["llcommon"]: mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources") mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources") + slplugin_res_path = self.dst_path_of("SLPlugin.app/Contents/Resources") for libfile in ("libllcommon.dylib", "libapr-1.0.3.7.dylib", "libaprutil-1.0.3.8.dylib", @@ -656,9 +667,10 @@ class DarwinManifest(ViewerManifest): {'target': target_lib, 'link' : os.path.join(mac_updater_res_path, libfile)} ) - - # plugin launcher - self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin") + self.run_command("ln -sf %(target)r %(link)r" % + {'target': target_lib, + 'link' : os.path.join(slplugin_res_path, libfile)} + ) # plugins if self.prefix(src="", dst="llplugin"): |